Skip to main content

Enumeration

Run Nmap Scan

View Website

Untitled Untitled Looks like the website contains phpbash. Let’s run gobuster to find it

Directory Bruteforcing (Run Gobuster)

/dev route seems interesting! Untitled We found the phpbash.php ! Untitled

Exploitation

Getting a Reverse Shell

Using a phpbash to get a Reverse Shell (Failed)

I have used reverse shell commands to get the reverse shell, but it wouldn’t let me.

Creating a Reverse Shell and Uploading the Exploit

Checking a Writable permission inside the folder

So I moved to /tmp folder and decided to download the reverse shell

Downloading a Reverse Shell

Give Executable Permission and Execute the Reverse Shell

Spawning a TTY Shell

Privilege Escalation

Find what permissions we have

Escalate privilege to scriptmanager

Enumerating Victim OS Information to look for Vulnerability

Ubuntu 16.04 with linux 4.4.0-62 has kernal vulnerability that we can exploit

Making the Exploit

Download the Exploit (CVE-2017-16995) and compile it locally using the following command

Uploading the Exploit to the Victim

Download the Exploit

Give Permission and Execute Exploit

Give Execution Permission
Execute Exploit in the Victim System