Learning security in the open :)
I’m a Penetration tester. I write up each topic as I learn it
the Vulnerabilities, the Tools, the Concepts that finally clicked
latest Exploiting server-side parameter pollution in a REST URL
- 223writeups
- 221boxes rooted
- 5Certification
Latest writeups
All writeups-
Hard
Exploiting server-side parameter pollution in a REST URL
server-side parameter pollution in a REST URL where username is placed in the path of an internal request unescaped, so URL-encoded path syntax (#, ?, ./, ../) reshapes the route, traversing to openapi.json reveals /api/internal/v1/users/{username}/field/{field}, and injecting ../../v1/users/administrator/field/passwordResetToken%23 leaks the admin's reset token to reset the password
API 5 min -
Medium
Exploiting a mass assignment vulnerability
exploiting a mass assignment vulnerability where the GET /api/checkout response exposes a chosen_discount field the POST never sends, so adding {"chosen_discount":{"percentage":100}} to the checkout POST binds an attacker-controlled 100% discount and the leather jacket is ordered for free
API 3 min -
Medium
Finding and exploiting an unused API endpoint
finding and exploiting an unused API endpoint where OPTIONS on /api/products/1/price reveals PATCH is allowed though the UI only reads the price, so after authenticating, a PATCH with Content-Type application/json and body {"price":0} rewrites the leather jacket's price to $0.00 and it's checked out for free
API 3 min -
Medium
Exploiting server-side parameter pollution in a query string
server-side parameter pollution where the password reset embeds username into an internal API query string unsanitised, so injecting URL-encoded & and # (username=administrator%26field=reset_token%23) adds and truncates parameters in the hidden backend request, brute-forcing the field parameter to reset_token to leak the administrator's reset token, reset the password
API 4 min -
Easy
Exploiting an API endpoint using documentation
exploiting an API endpoint using documentation where walking up the path from PATCH /api/user/wiener to /api/user to /api returns exposed API documentation, revealing a DELETE /api/user/{username} endpoint the UI never offers
API 3 min -
Hard
Web shell upload via race condition
web shell upload via race condition where the server moves the upload to a web-accessible folder and only deletes it after a virus check, so firing the POST upload and several GET /files/avatars/exploit.php requests simultaneously with Turbo Intruder's gate lands a read in the window before deletion, executing the PHP to return carlos's secret
File upload vulnerabilities 6 min -
Hard
Remote code execution via polyglot web shell upload
remote code execution via polyglot web shell upload where the server verifies the file is a genuine image, so you use ExifTool to embed the PHP payload in a real JPEG's Comment field and save it as polyglot.php, which passes content validation yet executes when requested, returning carlos's secret between START and END markers in the image binary
File upload vulnerabilities 3 min