Squid
Privilege Escalation via Scheduled Task Privilege Recovery + SeImpersonatePrivilege Abuse (PrintSpoofer)
Summary
Target exposed a Squid proxy on port
3128
.Proxy was misconfigured, allowing scanning of internal services using
spose.py
.Discovered phpMyAdmin running on port
8080
.Logged in using default MySQL credentials (
root
/ blank password).Used SQL injection to upload a PHP web shell.
From the shell, executed a PowerShell reverse shell payload hosted on my machine.
Successfully gained initial low-privilege shell access on the target system.
🧵Let's Unpack
Enumeration
Squid Proxy exploit
Accessing the site on port 8080
added the proxy in firefox and directly opened 192.168.166.189:8080 on browser
found phpMyAdmin page
Tried the default credentials of mysql
root
as username and left the passwordblank
Found a blog to inject a webshell using SQL Query -
this way you will get Admin user access
Got the webshell embedded!
Now used the below mentioned technique to spawn up reverse shell and catch it using nc
Getting a reverse shell
host the exploit.ps1 on your server
Executing the following command in our webshell
Privilege Escalation:
I was not able to escalate the privielge to root, took help from PG official walkthrough
Here is the hint
You're running as
LOCAL SERVICE
, but some default privileges are missing.Look into how Scheduled Tasks can be used to regain full privileges for service accounts.
If you manage to enable
SeImpersonatePrivilege
, you might want to explore PrintSpoofer 😉
Last updated
Was this helpful?