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
This post documents an end-to-end compromise chain across a Debian web/mail host and a Windows AD network. It starts with an HTML email delivery path in a public contact form, escalates via a no-click stored XSS in Roundcube (CVE-2024-42009), pivots to a dev dashboard where a stacked-queries SQLi yields PostgreSQL superuser, and finishes with two independent PostgreSQL→OS RCE paths. The write-up includes full HTTP requests, JavaScript payloads, Python/Flask exfil code, SQL payloads, and shell...
🔧 Technical Details
Stored XSS in Roundcube (CVE-2024-42009) via post-sanitization regex corruption: After washtml, Roundcube removes
bgcolor
using/\s?bgcolor=["\']*[a-z0-9#]+["\']*/i
. Placebgcolor
inside another attribute so removal reintroduces executable attributes (e.g.,onanimationstart
). Example payload executes JS on email view, enabling in-origin actions and data theft even with HttpOnly cookies.Reliable HTML payload delivery via contact form: If a site allows client-controlled
recipient
andcontent=html
in a mail-sending endpoint, you can deliver stored-XSS emails to internal users without interaction beyond viewing, making it ideal for Roundcube XSS delivery.Mailbox exfiltration from the victim’s origin: From injected JS, iterate message UIDs and request
?_task=mail&_action=show&_uid=...&_mbox=INBOX&_extwin=1
withmode:'no-cors'
...🤖 Agent Actions
I explored the repository, reviewed existing PostgreSQL content, and identified the best place to incorporate new, practical SQLi-to-RCE techniques. I read and analyzed the following relevant files to ensure consistency and avoid duplication:
Decision and changes made:
Repository updates:
No other pages were modified to avoid duplicated content and to keep references consolidated in the most relevant page.
If you want me to also add a concise WAF-bypass example under the PostgreSQL SQLi “WAF bypass” page, I can, but the critical, actionable details are now present in the primary Postgres pentesting page.
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.