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 is a HackTheBox “Job” walkthrough on Windows Server 2022 (build 20348). It chains: (1) client-side RCE by emailing a malicious LibreOffice .odt with an auto-executing Basic macro via SMTP, (2) remote command execution via IIS by abusing write permissions to the IIS webroot to drop an ASPX cmd webshell, and (3) local privilege escalation to SYSTEM from an IIS AppPool token that has SeImpersonatePrivilege, using GodPotato<...
🔧 Technical Details
SMTP-delivered “document open” macro execution (LibreOffice Writer): If a target workflow opens untrusted LibreOffice documents (e.g., CV intake), an attacker can embed a LibreOffice Basic macro and bind it to the Open Document event (Tools → Customize → Events). The macro can invoke OS command execution to run a reverse shell. A crucial implementation detail is LibreOffice Basic quoting: embed quotes inside a quoted string by doubling them (
""), otherwise the macro breaks (the post highlights a command tail likeAApAA==""")to correctly close nested strings). Deliver the payload via SMTP usingswaks, and use--attach @fileso the attachment content is the document bytes (not the filename).Write-to-webroot → ASPX webshell execution on IIS: When a low-privileged user/group has write permissions to the IIS webroot (e.g.,
JOB\developers:(OI)(CI)FonC:\inetpub\wwwroot), an a...🤖 Agent Actions
Summary:
swaks --attach @filedelivery guidance to phishing documents methodology with updated references.Files Modified:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.