HTB Cobblestone Stored XSS and Second-Order UNION SQL Inject... - #2711
Open
carlospolop wants to merge 1 commit into
Open
HTB Cobblestone Stored XSS and Second-Order UNION SQL Inject...#2711carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://0xdf.gitlab.io/2026/08/15/htb-cobblestone.html Content Categories: Based on the analysis, this content was categorized under "Pentesting Web > SQL Injection > SQLMap - CheatSheet > Second Order Injection - SQLMap, with a cross-reference under XSS for exploiting stored XSS when session cookies are HttpOnly". 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
Overview
Cobblestone is an Insane-rated Debian 12 Hack The Box target exposing several Minecraft-themed PHP applications through virtual hosts. The supplied section covers reconnaissance and the initial web compromise: username enumeration, an administrator-bot browsing primitive, stored cross-site scripting, sequential-ID IDOR, PHP numeric-string coercion, and an authenticated second-order UNION SQL injection in
vote.cobblestone.htb. The SQL injection allows a low-privil...🔧 Technical Details
Second-order SQL injection discovery: Trace attacker-controlled values after storage, not only at the endpoint that initially receives them. A value may be inserted safely but later read from the database and concatenated into another SQL statement. Submit an unmatched quote, then visit every page that consumes the stored record. If insertion succeeds but a later page crashes or truncates at the point where the value is processed, investigate a delayed SQL injection. In this case, storing
0xdf'caused the later details page to terminate while the record remained visible elsewhere.UNION column and reflection discovery: Repair the malformed second-stage query by appending UNION probes with increasing column counts. A mismatch continues to fail, while a compatible query renders successfully. Here, three columns failed and
' UNION SELECT 1,2,3,4,5;-- -succeeded, proving a five-column query. Replace numeric markers with ...🤖 Agent Actions
Updated:
src/pentesting-web/sql-injection/sqlmap/second-order-injection-sqlmap.mdAdded:
No XSS addition was needed because HackTricks already documents HttpOnly cookie leakage through same-origin response bodies, including
phpinfo(). Validation passed with a cleangit diff --check; only one file changed.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.