mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-07-10 12:48:36 +02:00
Update README.md
This commit is contained in:
@@ -1814,11 +1814,11 @@ mount -o bind,ro /boot/backdoor.cgi /var/www/cgi/blah.cgi
|
||||
|
||||
Needed for taking screenshots of X11 sessions (aka `xwd -root -display :0 | convert - jpg:screenshot.jpg`)
|
||||
```bash
|
||||
NAME="UserName" ### <-- Set UserName
|
||||
# NAME="UserName" ### <-- Set UserName
|
||||
U=$(id -u ${NAME:?}) \
|
||||
&& H="$(grep "$U" /etc/passwd | cut -d: -f6)" \
|
||||
&& HOME="${H:-/tmp}" python3 -c "import os;os.setuid(${U:?});os.execlp('bash', '-bash')"
|
||||
# change -bash to bash to not make this a login shell.
|
||||
&& HOME="${H:-/tmp}" python3 -c "import os;os.setuid(${U:?});os.execlp('bash', 'bash')"
|
||||
# change bash to -bash to make this a login shell.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user