Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://0xdf.gitlab.io/2026/03/21/htb-conversor.html Content Categories: Based on the analysis, this content was categorized under "Pentesting Web -> File Upload (arbitrary file write) and/or Pentesting Web -> XXE/XSLT injection (add libxslt/EXSLT exslt:document file-write + processor fingerprinting); plus a cross-reference under Linux Privilege Escalation / Scheduled tasks (cron) as an execution sink for arbitrary file write". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Title / context
Walkthrough of HackTheBox “Conversor” (Linux). Target hosts an Apache-served Flask app that converts uploaded
nmapXML into HTML using user-supplied XSLT processed bylxml(libxslt). The post chains: (1) authenticated file upload → (2) arbitrary file write (two different primitives) → (3) cron-triggered Python execution aswww-data→ (4) credential extraction (MD5 in SQLite) → (5) local privilege escalation to root vianeedr...🔧 Technical Details
Arbitrary file write via unsafe filename-to-path joins (path traversal + absolute path override): If an app constructs destination paths like
os.path.join(base_dir, user_filename)and then writes the upload, an attacker can use../to traverse outsidebase_dir. Additionally, supplying an absolute path (e.g., starting with/) causesos.path.jointo ignore earlier components, letting the attacker write anywhere the process can write. If the app writes the file before parsing/validation, the write succeeds even when the request ultimately errors.Convert arbitrary write to RCE using cron-executed script directories: When a system runs a cron entry like
* * * * * www-data for f in /path/*.py; do python3 "$f"; done, placing any attacker-controlled.pyfile in that globbed directory yields code execution as that cron user. Because it’s a simpleforloop, scripts exec...🤖 Agent Actions
Updated xslt-server-side-injection-extensible-stylesheet-language-transformations.md.
The addition keeps this in a single file and focuses on the actually new technique from the blog: libxslt-specific abuse. I added the
document()XML-only caveat, the XML-vs-XSLT parser asymmetry inlxml, the EXSLTexsl:documentarbitrary file-write primitive, the XML entity encoding gotcha when generating payload files, and a short note on using cron-polled script directories or similar execution sinks after a successful write. I also updated the References section with the blog and primary docs.Verification: checked the final diff and
git status; only that file was modified.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.