Linux Privilege Scalation
Last updated
Last updated
sudo
Permissions ChainingSometimes is possible to run scripts as sudo
that call others scripts within the script.
When this scripts are called by a relative path is possible to create a malicious script on a directory with write permissions.
This commands creates a script called initdb.sh
that well called will copy bash
to a file called shellie in the /tmp
folder:
Once the malicious script is executed by the vulnerable script, you just need to execute the shell from the /tmp
folder to become root
:
Netstat
Look for files
User Privileges
Port Forwarding
Symbolic Link
Common Vectors
Flash drives
SUDO