πFlatline - CTF Write-Up - TryHackMe
How high are your morals?

Letβs add the target IP in the host file: /etc/host
This machine takes up some time to boot up, be patient, it took me around 20 mins to figure out it wonβt respond to ping.
Enumeration
βI will hunt you downβ
Letβs first start scanning the machine with Nmap first, since it does not respond to ping, we will not use traditional flags for nmap, instead, we shall use TCP scans.
It's intriguing that there are only a few open ports, and they seem to have tight restrictions on their functionality. One of these ports is 3389, where 'ms-bt-server' is running. A simple Google search for 'ms-bt-server' yields a helpful Nmap command that can be employed to assess its potential exploitability.
It performs checks for available encryption, potential DoS vulnerabilities (without causing a DoS), and gathers NTLM Windows information, including versions.
Regarding the RDP service, the password spraying method could be an option, but we lack both a username and password in this lab environment. Caution should be exercised, as using the password spraying method in real-life scenarios without proper credentials can lead to blockages.
Instead, let's explore the FreeSWITCH service running on port 8021. FreeSWITCH is a free and open-source server software designed for real-time communication applications like WebRTC, video, and Voice over Internet Protocol (VoIP). It's versatile, compatible with Linux, Windows, macOS, and FreeBSD.
Weaponization
βLock and Loadβ
A quick search in the msfconsole regarding FreeSWITCH led to some intriguing findings. If you plan to switch to that module, you'll discover that the default password being used is 'ClueCon.' Now, let's attempt to netcat the service. Given that it's a terminal-based service, this approach should work effectively.
Hmmm something is not right to let's try telnet
Letβs try something else, let's use searchsploit
Letβs use the 2nd one :
A quick cat command on exp.py revealed what needs to be done
Since we know that this is a windows machine, let's try to get a shell first
Delivery
βWhere we dropping boys?β
Letβs create an executable that can be used to get a shell on the system, we will use msfvenom for this situation
You can generate the commands from here :
Online - Reverse Shell Generator
Exploitation
βAccess Grantedβ
Letβs get the flag now
Now We need to escalate Privileges else we wonβt be able to get the root flag
Letβs deploy peas-ng for windows
By the way, there is a βprojectsβ folder in C drive that you might want to check
Since we know the user is running openclinic we can search for exploits against it
Privilege Escalation
βI am inevitableβ
Wooho!! let's see if we can get root on this machine, using the methods listed.
After a few moments, you shall receive the connection in your netcat listner
Thank you for reading my post, have a great rest of your day, and good hunting π
Last updated
Was this helpful?