Skip to main content

Enumeration

Run Nmap Scan

View Website

Untitled

Checking listfiles.php

Untitled “pwdbackup.txt” seems interesting!

Checking Password Backup Files

Copy the file and save it as passwd_encoded.txt Untitled

Directory Bruteforcing (Run Gobuster)

Testing Local File Inclusion (LFI)

Untitled Untitled Here we can know that the username is “charix”

Base64 Decoding

User Credentials

Exploitation

SSH to the system

Privilege Escalation

Searching Processes Running in Root Permission

When we search for processes, we use ps aux command -u for showing process status -ax for showing all the processes -w for showing full information that has been cut
The information above (-rfbport 5901 -localhost) tells us that VNC is not accessible outside the local computer (victim’s computer)

Move the Secret.zip to Attacker Side and Decompress the file

If you try unzip secret.zip , it will not ask for password. Instead just raises an error message. Hence, we will move the file to our system and decompress it.
Unzip the file

Using Port Forwarding Technique to pivot the VNC

Configuration for Redirecting Port to Localhost

Dynamic Port Forwarding to the Remote Host

Binds the local port 4445 to the remote host (Port 22).

Access the VNC through Dynamic Port Forwarding

Port 4445 maps the ip to 127.0.0.1(The victim’s localhost for VNC connection). Hence, connection is established through dynamic port forwarding
Untitled