V3NU5๐Ÿ’€AL13N:~#

Hack Enumerate Harder!. Eat. Sleep. Repeat.

View on GitHub

โฌ… Back to Homepage

Infosec prep

os = linux

difficulty = easy

Nmap scan

image

lets start the enumeration from port 80.

image

we have a potential username which is oscp

so going over to the /secret.txt directory gotten from the nmap scan shows base64 encoded chars

image

decoding it with cyberchef gives ssh private key

image

so, letโ€™s ssh into the box using the username and the key

image

Privilege escalation

Checking what binaries have SUID permissions, we find that /bin/bash is misconfigured

find / -perm -u=s -type f 2>/dev/null

so we can easily gain root by abusing it using /bin/bash -p

2nd way of gaining root

found out that the machine is vulnerable to pwnkit

so, exploitng it give us root.

image

Thanks.