mirror of
https://github.com/hackerschoice/thc-tips-tricks-hacks-cheat-sheet.git
synced 2026-07-10 20:53:43 +02:00
Update README.md
This commit is contained in:
@@ -81,6 +81,7 @@ Got tricks? Join us on Telegram: [https://t.me/thcorg](https://t.me/thcorg)
|
||||
1. [Clean logfile](#shell-clean-logs)
|
||||
1. [Hide files from a User without root privileges](#shell-hide-files)
|
||||
1. [Make a file immutable](#perm-files)
|
||||
1. [Change user without sudo/su]
|
||||
1. [Crypto](#crypto)
|
||||
1. [Generate quick random Password](#gen-password)
|
||||
1. [Linux transportable encrypted filesystems](#crypto-filesystem)
|
||||
@@ -1711,6 +1712,16 @@ touch /var/www/cgi/blah.cgi
|
||||
mount -o bind,ro /boot/backdoor.cgi /var/www/cgi/blah.cgi
|
||||
```
|
||||
|
||||
**8.vi. Change user without sudo/su**
|
||||
|
||||
Needed for taking screenshots of X11 sessions (aka `xwd -root -display :0 | convert - jpg:screenshot.jpg`)
|
||||
```bash
|
||||
U=$(id -u UserName) ### <-- Set UserName
|
||||
H="$(grep "$U" /etc/passwd | cut -d: -f6)"
|
||||
HOME="${H:-/tmp}" python3 -c "import os;os.setuid(${U:?});os.execl('/bin/bash', '-bash')"
|
||||
# change -bash to bash to not make this a login shell.
|
||||
```
|
||||
|
||||
---
|
||||
<a id="crypto"></a>
|
||||
## 9. Crypto
|
||||
|
||||
Reference in New Issue
Block a user