Skip to content
AO.GitHub
← All write-ups
FIELD NOTES / PORTFOLIO

Creative

Reconnaissance and service enumeration

I used RustScan for port discovery, then Nmap for service detection.

2025-03-29_22-12.png

Ports 22 and 80 were open.

The service scan used nmap -sCV -p 22,80 -T4 -oG creative <TARGET_IP>. The captured output was:

# Nmap 7.95 scan initiated Sat Mar 29 22:15:16 2025 as: /usr/lib/nmap/nmap --privileged -sCV -p 22,80 -T4 -oG creative 10.10.37.0
Host: 10.10.37.0 ()     Status: Up
Host: 10.10.37.0 ()     Ports: 22/open/tcp//ssh//OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)/, 80/open/tcp//http//nginx 1.18.0 (Ubuntu)/
# Nmap done at Sat Mar 29 22:15:29 2025 -- 1 IP address (1 host up) scanned in 13.10 seconds

Nmap identified OpenSSH on port 22 and nginx on port 80. The banners indicated Ubuntu Linux.

Web enumeration

The web application required a hostname. I mapped the target address and hostname in /etc/hosts before revisiting it.

The site then loaded:

2025-03-29_22-23.png

Source inspection, path discovery, and the contact form did not reveal a useful entry point.

Virtual host discovery identified another hostname:

2025-03-29_22-54.png

I added the hostname to /etc/hosts.

The newly identified site exposed a URL submission feature:

2025-03-29_22-58.png

The initial destination did not respond, while the parent site remained accessible.

2025-03-29_23-00.png

The feature returned content from supplied URLs, including localhost. I used that behavior to check whether the server could reach internal services.

Server-side request probing and initial access

I prepared a list of candidate internal ports for Burp Suite Intruder.

2025-03-29_23-32.png

The candidate list is shown below.

I captured the request and configured Intruder to vary the internal port.

Port 1337 returned a directory listing, indicating an accessible internal service.

2025-03-29_23-36.png

Browsing the exposed directories revealed the user saad.

I inspected that home directory:

2025-03-29_23-41.png

It contained several files, including user.txt.

2025-03-29_23-43.png

The .ssh directory exposed a private key. I copied it locally to test SSH authentication as saad.

The key required a passphrase.

2025-03-29_23-47.png

John the Ripper recovered the key passphrase.

2025-03-29_23-52.png

The recovered key and passphrase provided SSH access.

SSH access

2025-03-29_23-54.png

Privilege escalation

I continued local enumeration for a route to root.

The .bash_history file provided clues about prior commands.2025-03-29_23-58.png

Running sudo -l showed that the account could execute ping with elevated privileges.

The sudo configuration also retained LD_PRELOAD. I investigated whether a shared library loaded through that environment variable could run code in the privileged process.

I used this LD_PRELOAD reference for the technique.

2025-03-30_00-07.png

I compiled the payload into a shared object:

2025-03-30_00-33.png

The invocation used the permitted binary path.

The resulting shell reported UID 0 with id. I retrieved the user and root flags.

2025-03-30_00-30.png

Outcome

An internal URL fetch exposed port 1337 and a private SSH key. The passphrase and the retained LD_PRELOAD setting formed the documented route to root.