Writeup by wook413

Recon

Nmap

As always, I started the machine with a comprehensive scan covering all 65,535 TCP ports, which identified ports 22, 8090 and 8091.

Next, I performed a targeted service scan on the identified ports using the -sC and -sV options.

Lastly, I conducted a UDP scan on the top 10 most common ports.

Initial Access

HTTP 8090 8091

Whenever an HTTP service is running, I run the Nmap http-enum script for quick wins. This revealed that port 8090 contained /rest/applinks/1.0/manifest , which pointed to Atlassian Confluence 7.13.6 and /webdav .

HTTP 8090

As already indicated by the Nmap output, accessing the target IP at port 8090 via the browser confirmed it was an Atlassian service.

image-20260211222833154

I performed directory brute-forcing with Gobuster , which returned multiple directories, including /webdav . I attempted to connect to /webdav using cadaver , but the connection was unsuccessful.

I looked up Confluence in Searchsploit , but none of the available exploits matched version 7.13.6.

By searching for vulnerabilities for this specific version on Google, I discovered a Github repository containing an exploit. The author noted it had been tested against versions 7.13.5 and 7.18.0, which looked very promising.

https://github.com/jbaines-r7/through_the_wire

I downloaded the exploit to my local machine.

Shell as confluence

Using the exploit, I successfully obtained a shell as the confluence user.

Since the initial shell was unstable, I forwarded the reverse shell to my penelope listener using busybox and nc .

Found local.txt

Privilege Escalation

While searching for privilege escalation vectors, I found a highly unusual script named log-backup.sh in the /opt directory, owned by the confluence user.

The log-backup.sh file appears to be a script that creates backups of the Confluence server’s log files and perform cleanup afterward.

I transferred pspy64 to the target host to monitor running processes.

I discovered that the root user was executing the log-backup.sh script on a regular basis.

image-20260211222854998

I modified the script’s contents to set the SUID bit on the /bin/bash binary.

After a short wait, I confirmed that the /bin/bash binary had the SUID bit set.

Shell as root

I was then able to obtain a root shell by executing the /bin/bash -p command.

Found proof.txt