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

Empire-breakout

Reconnaissance

I used RustScan for port discovery.

2024-11-07_01-47.png

Five ports were open.

Service identification

I used Nmap for service detection.

2024-11-07_01-50.png

The results indicated Apache, Samba (smbd 4.6.2), and MiniServ web services, including ports 10000 and 20000. The banners suggested Debian.

Enumeration

Port 80 displayed the default Apache page.

2024-11-07_01-53.png

The page source contained an encoded message.

2024-11-07_01-55.png

I decoded the message and retained the resulting string as a credential candidate.

2024-11-07_01-56.png

The decoded value was:

`.2uqPEfj3D<P’a-3

SMB enumeration on ports 139 and 445 followed.

enum4linux identified the accounts cyber and nobody.

The candidate credential failed on port 10000.

The same credential worked on the service at port 20000.

2024-11-07_02-54.png

Initial access

I opened the application’s command shell.

2024-11-07_03-11.png

I prepared a listener for a callback.

I used a Perl callback payload.

2024-11-07_03-13.png

I submitted the payload to the command shell.

2024-11-07_03-19.png

The callback yielded a shell, from which I retrieved local.txt.

Privilege escalation

I investigated a tar binary available in the user directory. 2024-11-07_03-54.png

GTFOBins described a file-read technique for tar.

I tested whether the binary could read restricted files.

2024-11-07_03-55.png

I first requested /etc/passwd.

2024-11-07_04-00.png

The read succeeded, so I examined root’s shell history.

The history pointed to /var/backups/.old_pass.bak.

That backup contained a candidate root password.

2024-11-07_04-09.png

I tested the candidate with su.

It authenticated successfully as root.

2024-11-07_04-12.png

Outcome

The decoded page hint led to access on port 20000; the application shell provided user access; and a readable backup exposed the root password and final flag.