A walkthrough of the HackTheBox machine 'Browsed', a Linux box running a browser extension repository. Uploaded extensions are tested in a headless Chrome instance, and Chrome debug logs reveal an internal Gitea instance and a Python Flask app on localhost. The attack chain involves crafting a malicious Chrome extension with a background service worker to perform SSRF against the internal Flask app, then exploiting a Bash arithmetic evaluation injection in a shell script for RCE. Privilege escalation to root is achieved by poisoning a Python bytecode (.pyc) file in a world-writable __pycache__ directory that is imported by a sudo-allowed script.
Sort: