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
- 223writeups
- 221boxes rooted
- 5Certification
Latest writeups
All writeups-
Medium
Web shell upload via obfuscated file extension
web shell upload via obfuscated file extension where the validator accepts a filename ending in .jpg but the save layer treats %00 as a string terminator, so filename="exploit.php%00.jpg" passes the image check yet is stored as exploit.php, and requesting it executes the PHP to return carlos's secret
File upload vulnerabilities 2 min -
Medium
Web shell upload via extension blacklist bypass
web shell upload via extension blacklist bypass where .php is blocked but .htaccess is not, so uploading a .htaccess containing AddType application/x-httpd-php .l33t remaps an invented extension to PHP on the Apache/mod_php server, and uploading the shell as exploit.l33t then requesting it executes the PHP to return carlos's secret
File upload vulnerabilities 3 min -
Medium
Web shell upload via path traversal
web shell upload via path traversal where the avatars directory is configured not to execute scripts, but the save path is built from the attacker-controlled filename, so filename="..%2fexploit.php" (the server strips ../ but URL-decodes %2f afterwards) writes the PHP up into the executable /files directory, and requesting GET /files/avatars/..%2fexploit.php runs it to return carlos's secret
File upload vulnerabilities 3 min -
Easy
Web shell upload via Content-Type restriction bypass
web shell upload via Content-Type restriction bypass where the upload only checks the multipart part's Content-Type (attacker-controllable) against image/jpeg or image/png, so relabelling the PHP shell's Content-Type as image/jpeg while keeping the PHP body passes the check, and requesting /files/avatars/exploit.php executes it to return carlos's secret
HTTP Host header 2 min -
Easy
Remote code execution via web shell upload
remote code execution via web shell upload where the avatar function stores files to /files/avatars/ with no validation, so uploading exploit.php containing file_get_contents('/home/carlos/secret') and requesting GET /files/avatars/exploit.php makes the server execute the PHP and return carlos's secret
File upload vulnerabilities 3 min -
Hard
Stealing OAuth access tokens via a proxy page
stealing OAuth access tokens via a proxy page where the prefix-only redirect_uri lets /../ traversal land the implicit-flow token on the blog's comment-form iframe, which postMessages its own window.location.href to any origin (*), so framing that page from the exploit server relays the admin's token to a listener, then replaying it against GET /me as a Bearer token returns their API key
OAuth authentication 4 min -
Medium
Stealing OAuth access tokens via an open redirect
stealing OAuth access tokens via an open redirect where the redirect_uri whitelist only checks a prefix, so /oauth-callback/../post/next?path= traverses to the blog's open redirect and forwards the implicit-flow token off-site, a fragment-exfil script leaks the admin's token, and replaying it against GET /me as a Bearer token returns their API key
OAuth authentication 6 min