T3chnocr4t:~#

Looking 🔭 For Something Hidden....

View on GitHub

RootMe

Difficulty = Easy


Hola 👋, Here is my write-up on RootMe , based on the TryHackMe CTF. It covers learning reconnaissance, privilege escalation, and reverse shell techniques.

root2qqq

Task 1: Deploy the machine

Connect to TryHackMe network and deploy the machine


Task 2: Reconnaissance

First, let’s get information about the target.

Q1: how many ports are open?

# Nmap 7.94SVN scan initiated Sat Mar  2 16:09:04 2024 as: nmap -sC -sV -oN ./myfile.txt 10.10.88.68
Nmap scan report for 10.10.88.68
Host is up (0.20s latency).
Not shown: 998 closed tcp ports (conn-refused)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 4a:b9:16:08:84:c2:54:48:ba:5c:fd:3f:22:5f:22:14 (RSA)
|   256 a9:a6:86:e8:ec:96:c3:f0:03:cd:16:d5:49:73:d0:82 (ECDSA)
|_  256 22:f6:b5:a6:54:d9:78:7c:26:03:5a:95:f3:f9:df:cd (ED25519)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-title: HackIT - Home
| http-cookie-flags: 
|   /: 
|     PHPSESSID: 
|_      httponly flag not set
|_http-server-header: Apache/2.4.29 (Ubuntu)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Sat Mar  2 16:09:42 2024 -- 1 IP address (1 host up) scanned in 37.96 seconds

And we can see that we have 2 ports open from our Nmap scan.

Q2: What version of Apache is running?

rootme1

Q3: What service is running on port 22?

Q4: Find directories on the web server using the GoBuster tool.

Q5: What is the hidden directory?

rootme2


Task 3: Getting a shell

Find a form to upload and get a reverse shell, and find the flag.

rootme4

tes2

rootme5

new1

1

Inkednew1_LI

new2

new4


Task 4: Privilege escalation

Now that we have a shell, let’s escalate our privileges to root

Q1: Search for files with SUID permission, which file is weird?

new5

Q2: Find a form to escalate your privileges.

-Answer: No Answer Needed

Q3: root.txt

suid

new6

We got the flags.

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

tenor