---
title: "10. Web attack skill assessment."
date: 2025-01-01
draft: false
---


You are performing a web application penetration test for a software development company, and they task you with testing the latest build of their social networking web application. Try to utilize the various techniques you learned in this module to identify and exploit multiple vulnerabilities found in the web application.

+ 5  Try to escalate your privileges and exploit different vulnerabilities to read the flag at '/flag.php'.

some api behavior happening here where we can idor info about other employees

![](/img/Pasted image 20250101143533.png)

natural inclination here is to find what uid could be an administrator user 

copy'd curl request from Burp and created a very simple bash for-loop to get all uids: 

```bash
┌──(root㉿kali)-[~/cpts/xxe/skills]
└─# for i in {1..100}; do
    curl --path-as-is -s -k -X GET \
        -H "Host: 94.237.61.84:53699" \
        -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" \
        -H "Accept: */*" \
        -H "Accept-Language: en-US,en;q=0.5" \
        -H "Referer: http://94.237.61.84:53699/profile.php" \
        -H "Connection: keep-alive" \
        -b "PHPSESSID=n95jmtbpqbkm4t2l9vcs15s6q8; uid=74" \
        --compressed \
        "http://94.237.61.84:53699/api.php/user/$i" | jq
done > list_of_users.txt

```

![](/img/Pasted image 20250101144409.png)

so we should target uid 52 to see if we can do anything interesting. there's a password reset form on the page and i get an access denied error trying to access other uids. 

two api calls are made when we try to reset password: 
1. get a token for uid
![](/img/Pasted image 20250101144529.png)
2. call reset api using that token 

![](/img/Pasted image 20250101144558.png)

we can get a token for admin: 
![](/img/Pasted image 20250101144648.png)
but we get an access denied error if we try to use it: 

![](/img/Pasted image 20250101144730.png)

so it seems like the question here is whether or not there's other apis we can finagle with 

problem is every api appears to return 200 
gonna try and fuzz endpoints anyway
that didn't work: refer to verb tampering. GET worked. 

![](/img/Pasted image 20250101175203.png)
right click -> change request type 

now that we're here we have additional functionality to create a new event 

![](/img/Pasted image 20250101175255.png)

![](/img/Pasted image 20250101175358.png)

name tag is where our injectable point is. 

![](/img/Pasted image 20250101175625.png)

using php wrapper to b64 encode and read the flag, hopefully! 

![](/img/Pasted image 20250101175816.png)
![](/img/Pasted image 20250101175844.png)
