Skills Assessment
Scenario
Inlanefreight has contacted us to conduct an external penetration test against their web applications. They are launching a groundbreaking PDF creator.
In-Scope Subdomains
library.inlanefreight.local
8001
vault.inlanefreight.local
8002
pdf.inlanefreight.local
8003
webmin.inlanefreight.local
10000
Note: Certain web applications only function properly with the corresponding local port value.
Setup /etc/hosts
sudo tee -a /etc/hosts > /dev/null <<EOT
## inlanefreight hosts
<Target_IP> library.inlanefreight.local vault.inlanefreight.local webmin.inlanefreight.local pdf.inlanefreight.local
EOTQuestion 1: Library Web Application Flag
Vulnerability: WebSocket SQLi
Navigate to
library.inlanefreight.local:8001Search for user messages β Notice WebSocket connections in Burp
Username sent via JSON to
/dbconnectorendpoint
Exploitation
Create sqlmap middleware:
Run middleware:
Confirm SQLi:
Enumerate databases:
Enumerate tables:
Dump flag:
Question 2: htb-stdnt Password
Exploitation
Using same middleware, dump users table:
Result:
Credentials: htb-stdnt:HTB_@cad3my_Stdnt!
Question 3: Vault Admin Password
Vulnerability: Second-Order IDOR
Navigate to
vault.inlanefreight.local:8002Login with
htb-stdnt:HTB_@cad3my_Stdnt!Hover over "My Vault" β Notice URL parameter
id
Exploitation
Intercept request to view vault
Change
idvalue to1(admin's vault)Don't follow redirect
Refresh
/display_data.phpdirectly
Result: Admin's Webmin password: AdM1N@v@uL1
Question 4: PDF Application Flag
Vulnerability: DNS Rebinding SSRF Bypass
The PDF app at pdf.inlanefreight.local:8003 has SSRF filters blocking private IPs.
Step 1: Access Webmin
Login to webmin.inlanefreight.local:10000 with admin:AdM1N@v@uL1
Step 2: Change DNS Settings
Navigate to: Networking β Network Configuration β Hostname and DNS Client
Set DNS server to your tun0 IP:
Step 3: Setup DNSrebinder
Start rogue DNS server:
Step 4: Exploit
Visit pdf.inlanefreight.local:8003 and request:
DNS Rebinding Flow:
First resolution:
google.comβ1.1.1.1(passes SSRF filter)Second resolution:
google.comβ127.0.0.1(bypasses to localhost)
Result: Flag displayed in generated PDF!
Attack Chain Summary
Last updated