HackTheBox - Sorcery
Why It Matters
Understanding Neo4j injection and AI‑assisted exploitation equips security teams to detect and mitigate emerging attack surfaces in modern web stacks, especially those leveraging containerized services.
Key Takeaways
- •Identify Neo4j injection via malformed product query parameters.
- •Use AI assistance to craft injection payloads quickly.
- •Exploit passkey authentication to forge credentials and log in.
- •Recognize Docker container hints from TTL differences for exploitation.
- •Combine source code analysis with Burp to extract registration key.
Summary
The video walks through the Hack The Box "Sorcery" machine, beginning with standard enumeration that reveals only SSH and HTTPS services. The HTTPS site runs a minimal Next.js front‑end backed by a Rust Rocket server, hinting at a Neo4j database. Early testing shows error messages on malformed quotes, prompting the author to investigate the source code and discover a Neo4j Cypher query vulnerable to injection. Key insights emerge as the presenter leverages Burp Suite and Claude, an AI assistant, to craft a Cypher UNION payload that extracts the registration key and user password hashes. By manipulating the templating brackets and commenting out the remainder of the query, a full data dump is achieved, demonstrating the power of AI‑augmented exploitation. The walkthrough also covers the newer pass‑key authentication mechanism, showing how to forge a valid pass‑key and log in as an admin user. Notable moments include the TTL analysis that suggests the web server runs in a separate Docker container, affecting available binaries for post‑exploitation. The presenter also highlights the importance of reviewing the repository linked from the site, which contains the full Rust source, enabling precise identification of injection points. Throughout, the video balances manual probing with AI‑driven suggestions, illustrating a hybrid approach to modern CTF challenges. For practitioners, the Sorcery box underscores the need to recognize non‑SQL injection vectors, adapt to emerging authentication schemes, and consider containerization nuances during exploitation. It also showcases how integrating AI tools can accelerate payload development, though human verification remains essential.
Comments
Want to join the conversation?
Loading comments...