Currently for 2025… will reorganize if I do it again.
picoCTF / Web
Cookie Monster Secret Recipe http://verbal-sleep.picoctf.net:56241/ Logging on give hit “Check cookies” value secrent_recipe: cGljb0NURntjMDBrMWVfbTBuc3Rlcl9sMHZlc19jMDBraWVzXzZDMkZCN0YzfQ%3D%3D As evident from the %3d%3d, most likely base64 encoded. Flag: picoCTF{c00k1e_m0nster_l0ves_c00kies_6C2FB7F3} head-dump Need to find enpoint with flag Documentation about API “browser_webshell_solvable” So we have a home page with 4 blog posts of cyber nodejs/swagger ui / API documentation Logging and hacking None of the #links work, except for #API Docuemntation get a Swagger docuemtnation page heapdump gets memory You can open it in text file CTRL+F “picoCTF{” picoCTF{Pat!3nt_15_Th3_K3y_ad7ea5ae n0s4n1ty 1 profile picture upload need to locate file upload area, and inside /root directory. uploading file change image “Update profile” button gives “File x.jpg has be uploaded Path: uplaods.jpg” uploaded webshell.php, find we are in /var/www/html/uploads ls /root gives us Permission Denied Check sudo? We have sudo! sudo ls /root finds /root/flag,txt sudo cat /root/flag.txt picoCTF{wh47_c4n_u_d0_wPHP_d698d800} SSTI1 announcer Whatever submitted in input box is then redirected to a page with jsut that text ca use <script> alert(5)</script> what can we do then… post / with content redirects to /announce Try PHP innject <?php echo "test" ?> It gets automatically commented out -> <?php tunrs into <!---?php In the HTML, we can see a POST request get sent to / Lets open burpsuite Be stupid and lookup what SSTI means Server Side Template injection Using {{}} we can evaluate the command {{7*7}} gives up 49 instead of the output! https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Server%20Side%20Template%20Injection We find it is a Jinja2 injection {{ request.application.__globals__.__builtins__.__import__('os').popen('ls').read() }} {{request.application.__globals__.__builtins__.__import__('os').popen('cat flag').read()}} WebSockFish stockfish chessbot! ...