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

Target
Local Port

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
EOT

Question 1: Library Web Application Flag

Vulnerability: WebSocket SQLi

  1. Navigate to library.inlanefreight.local:8001

  2. Search for user messages β†’ Notice WebSocket connections in Burp

  3. Username sent via JSON to /dbconnector endpoint

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

  1. Navigate to vault.inlanefreight.local:8002

  2. Login with htb-stdnt:HTB_@cad3my_Stdnt!

  3. Hover over "My Vault" β†’ Notice URL parameter id

Exploitation

  1. Intercept request to view vault

  2. Change id value to 1 (admin's vault)

  3. Don't follow redirect

  4. Refresh /display_data.php directly

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:

  1. First resolution: google.com β†’ 1.1.1.1 (passes SSRF filter)

  2. Second resolution: google.com β†’ 127.0.0.1 (bypasses to localhost)

Result: Flag displayed in generated PDF!


Attack Chain Summary

Last updated