If you are new to TryHackMe, I recommend checking out their Tutorial room to see how the platform works and how you can access the target machine(s). I also highly recommend using your own “attack box”, be it a Kali, Parrot, or some other pentesting oriented Linux distro (in the form of a VM), as opposed to the browser based solution TryHackMe provides. I’ve found that the browser based VM is a lot slower, though others seem to have no issues with it. The only thing using your own attack VM entails is connecting it to THM’s network through VPN, but this is incredibly easy as TryHackMe will supply you with your own OpenVPN configuration file and is outlined below.
Types of Challenges
The TryHackMe platform has multiple types of challenges, each potentially having its own requirements for accessing and completing it. You can identify the type of challenge by looking at the icon on the right-hand side of the collapsible bar for that particular challenge:
Challenges using the “server rack” icon include the use of a deployable machine, and are the most common. Pressing the “Start Machine” button will launch a virtual machine that you have two ways of accessing: using THM’s “attack box”, found at the top of your browser window:
Or, you can instead opt to use your own virtual machine connected to the THM network, which is done (on Linux) by clicking your user icon, “Access”, and then “Download My Configuration File”.
Clicking “Save File”
And by running the following command in a terminal (I might suggest you move the download to another folder, such as “Documents”):
Once you see “Initialization Sequence Completed”, you’ll know you’ve successfully connected to THM’s network. Keep this terminal window open (you can minimize it, however). Return to it and press “Ctrl” + “C” twice once you are ready to disconnect.
After you’ve chosen between THM’s attack box or your own virtual machine, you’ll need the IP address of the target machine, which is what was deployed earlier with the green “Start Machine” button. That information can be seen in a banner at the top of your browser window, or in more detail at the top of the page:
In many cases you’ll be copying that IP address into your attack box/VM’s browser’s address bar, but in other cases you might be accessing it through SSH, RDP, etc. You’ll notice that you can add time to it if needed, or terminate it if you finish early – opening up more resources for other THM users.
Challenges using the “browser” icon will require interaction with a simulated website that can be accessed by pressing the “View Site” seen after expanding the challenge. These challenges will need to be completed from within your browser, and cannot be accessed through a VPN on your own machine due to the fact that they are not true websites.
Challenges with the “download” icon include files – in many cases packet captures (pcaps) or log files to be parsed through using a specific type of software. Where you would like to do this examining is up to you, but you will not be able to use one of TryHackMe’s machines. For examining something like a .pcap file, you will want to install Wireshark on one of your own computers or VMs.
Challenges without an icon focus on either reading material and answering questions, or will include a link to a publicly accessible website that doesn’t require connection to THM’s network, and therefore can be completed from any computer you choose.
TryHackMe; Advent of Cyber 3; Day 9 Walkthrough
Day 9’s challenge focuses on the basics and use of Wireshark with pcaps (packet captures) for forensics and traffic analysis.
Because this lab does not have a deployable machine, you will need to have Wireshark installed in a VM or on your host machine. The downloads page for Wireshark can be found here. After you have gone through the install, you’ll want to download the pcap file from the Day 9 challenge section:
Now we’ll open the file from our downloads folder, or wherever you may have it saved. Wireshark should be set as the default application for .pcap files, but if not, go ahead and choose Wireshark from the list of applications available to open it.
To find the directory gathered from the first HTTP stream in this packet capture, we’ll want to type in “http.request.method == GET” to only display packets relating to an HTTP GET exchange.
To find the username and password used on the login page with a POST method, we’ll change that very same filter from “GET” to “POST”. Right click on the first exchange, then navigate to “Follow” > “TCP Stream”
Now we can see the username and password, as well as the User-Agent used in that web request.
Next, we’ll clear out our display filter and replace it with “dns”. Press enter, and search through the results for a packet containing a request for a “TXT” record. Right click that packet, navigate to “Follow” > “UDP Stream”
This will give us the flag in the message of that DNS query.
We’ll replace our display filter again, this time with “ftp”, and hit “Enter”. We’ll be able to see the FTP login password used in cleartext.
Now we’ll replace our filter with “ftp-data” to see the actual contents of files that were transmitted using the FTP protocol. We’ll only see one packet, in which we can see both the command used to upload the secret.txt file, as well as the content of the secret.txt file.