Merged
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://0xdf.gitlab.io/2026/01/26/htb-job.html Content Categories: Based on the analysis, this content was categorized under "Windows Hardening -> Windows Local Privilege Escalation (IIS/AppPool SeImpersonatePrivilege -> GodPotato) AND Network Services Pentesting -> Pentesting Web -> IIS / ASP.NET (Writeable webroot -> ASPX webshell) AND Phishing Methodology / Client-side -> Malicious Documents (LibreOffice macro auto-execution via document events + swaks delivery notes)". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
Collaborator
Author
|
merge |
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
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.