T3chnocr4t:~#

Looking šŸ”­ For Something Hidden....

View on GitHub

Agent Sudo

Diffcuity: Easy


ā€œWelcome back šŸ‘‹! Here is my write-up on Agent Sudo, based on the TryHackMe CTF. In this challenge, we discovered a secret server hidden deep beneath the sea. Our task was to breach its defenses and uncover the truth within. Throughout the room, we learn into topics such as hash cracking, privilege escalation, and steganography, among others. Letā€™s dive in šŸ•ŗ.

agentsudo


Task 1: Author note

Deploy the machine


Task 2: Enumerate

Enumerate the machine to gather all important information. Enumeration is the process of gathering information about a target system or network.

Q1: How many open ports?

# Nmap 7.94SVN scan initiated Tue Apr 16 23:17:19 2024 as: nmap -sV -A -oN ./nmap_result.txt 10.10.58.229
Nmap scan report for 10.10.58.229
Host is up (0.20s latency).
Not shown: 997 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
21/tcp open  ftp     vsftpd 3.0.3
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
|   2048 ef:1f:5d:04:d4:77:95:06:60:72:ec:f0:58:f2:cc:07 (RSA)
|   256 5e:02:d1:9a:c4:e7:43:06:62:c1:9e:25:84:8a:e7:ea (ECDSA)
|_  256 2d:00:5c:b9:fd:a8:c8:d8:80:e3:92:4f:8b:4f:18:e2 (ED25519)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Annoucement
|_http-server-header: Apache/2.4.29 (Ubuntu)
Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Tue Apr 16 23:17:59 2024 -- 1 IP address (1 host up) scanned in 39.93 seconds

Q2: How you redirect yourself to a secret page?

1

Q3: What is the agent name?

4

3

6

5


Task 2: Hash cracking and brute-force

Time to brute way out.

Q1: FTP password

sudo hydra -L username.txt -P /usr/share/wordlists/rockyou.txt 10.10.58.229 ftp

8

Q2: Zip file password

9

ls

10

11

2024-04-18_10-04

13

15

Q3: steg password

16

Q4: Who is the other agent (in full name)?

Q5: SSH password


Task 4: Capture the user flag

You know the drill.

Q1: What is the user flag?

17

Q2: What is the incident of the photo called?

18

Alien_autospy

19

Task 5: Privilege escalation

Time to get real.

Q1: CVE number for the escalation

20

21

Q2: What is the root flag?

22

final

b53a02f55b57d4439e3341834d70c062

Q3: (Bonus) Who is Agent R?

DesKel

And we are done šŸ‘‹! Thatā€™s all, friends. Thank you for reading up to this point. I would like to hear your feedback on anything not clear here. Here is my Twitter account @T3chnocr4t. Feel free to DM me if you have any issues with my write-up. Thanks!

Go Back Home