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

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:
┌──(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

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:
- get a token for uid 
- call reset api using that token

we can get a token for admin:  but we get an access denied error if we try to use it:

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.
 right click -> change request type
now that we're here we have additional functionality to create a new event


name tag is where our injectable point is.

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