nitesh@gupta
Proving Grounds Windows

Squid

Full walkthrough — enumeration, foothold and privilege escalation.

Nmap output

Nmap scan report for 192.168.213.189
Host is up (0.059s latency).
Not shown: 65529 filtered tcp ports (no-response)
PORT      STATE SERVICE       VERSION
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds?
3128/tcp  open  http-proxy    Squid http proxy 4.14
|_http-title: ERROR: The requested URL could not be retrieved
|_http-server-header: squid/4.14
49666/tcp open  msrpc         Microsoft Windows RPC
49667/tcp open  msrpc         Microsoft Windows RPC
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

We have squid proxy running on port 3128. So we setup proxy using foxyproxy

Squid walkthrough, Got NT, screenshot 1
Squid, step 1

We used spose.py to run port scan using proxy and found port 8080 & 3306 open

Squid walkthrough, Got NT, screenshot 2
Squid, step 2

Wampserver is running on port 8080

Squid walkthrough, Got NT, screenshot 3
Squid, step 3

We have phpmyadmin running and we used default creds

Squid walkthrough, Got NT, screenshot 4
Squid, step 4

We are able to login into server

Squid walkthrough, Got NT, screenshot 5
Squid, step 5

From the phpinfo page we got the root directory of the wamp server

Squid walkthrough, Got NT, screenshot 6
Squid, step 6

Then we created a command.php file using phpmyadmin sql query

Squid walkthrough, Got NT, screenshot 7
Squid, step 7

Accessed & ran command and we got command execution

Squid walkthrough, Got NT, screenshot 8
Squid, step 8

Downloaded the reverse shell payload & ran it

Squid walkthrough, Got NT, screenshot 9
Squid, step 9

Got NT

Squid walkthrough, Got NT, screenshot 10
Squid, step 10

Got local.txt (f0e8d5f2c3af412133d043571f3c9a86)

Squid walkthrough, Got NT, screenshot 11
Squid, step 11

Got proof.txt (f94e41859495b9bb6e1e2ef123467cf9)

Squid walkthrough, Got NT, screenshot 12
Squid, step 12

More walkthroughs