Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://0xdf.gitlab.io/2026/03/14/htb-gavel.html Content Categories: Based on the analysis, this content was categorized under "Pentesting Web -> File Inclusion/Path traversal (add/extend: Exposed /.git source disclosure + git-dumper) AND Pentesting Web -> SQL Injection (add/extend: ORDER BY / identifier-based SQLi with backticks, PDO limitations) AND Pentesting Web -> Command Injection / RCE (PHP) (add: runkit-enabled rule engine code execution) AND Linux Privilege Escalation -> (add: PHP sandbox escape via php.ini overwrite when file write primitives exist)". 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
Scope / attack chain (end-to-end)
HackTheBox Gavel (Linux) hosts a PHP auction website. The post’s full compromise chain is:
/.git/exposure → reconstruct full source with git-dumper.🔧 Technical Details
Exposed
/.git→ full source recovery: If a web server exposes the Git metadata directory, an attacker can reconstruct the repository (often including commit history) and audit the application offline. Tooling example: install git-dumper (e.g.,uv tool install git-dumper) and rungit-dumper http://TARGET/.git OUTDIR/to fetchHEAD,index, refs, andobjects/. This frequently reveals hidden endpoints, SQL query construction, secrets, and privileged functionality.SQLi via user-controlled SQL identifiers despite PDO: PDO parameter binding protects values but not identifiers (table/column names). If an app concatenates a user-controlled identifier into SQL (commonly for
ORDER BY) and only wraps it in backticks (e.g.,ORDER BY `<input>`), this is not true parameterization and may be bypassable, leading to DB d...🤖 Agent Actions
Summary of updates:
/.gitsource disclosure withgit-dumperworkflow tosrc/pentesting-web/file-inclusion/README.mdand added the blog to References.src/pentesting-web/sql-injection/README.mdand added the blog to References.runkit-enabled PHP rule engine RCE notes tosrc/pentesting-web/command-injection.mdand added the blog to References.php.inioverwrite tosrc/linux-hardening/privilege-escalation/write-to-root.mdand added the blog to References.Files modified:
src/pentesting-web/file-inclusion/README.mdsrc/pentesting-web/sql-injection/README.mdsrc/pentesting-web/command-injection.mdsrc/linux-hardening/privilege-escalation/write-to-root.mdTests not run (not requested).
If you want, I can also tighten the new SQLi section with concrete payload examples for MySQL/PostgreSQL identifier escape behavior or add a short detection checklist.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.