Skip to content
DoS Write-up Advanced

The Infinite Loop: Deconstructing WSHRAT’s Fileless Injection a

A VBScript variant of WSHRAT (Houdini) was analysed; it copies itself to AppData for persistence, beacons to a hardcoded C2 in a loop, and contains dormant fileless PowerShell injection into MSBuild.exe that only runs on a valid C2 command. The analysis also documents a lab DNS routing issue that initially hid the C2 traffic.

Svetoslav Follow

Published on medium.com

Malware analysis is rarely a straightforward sequence of executing a payload and watching the indicators neatly populate your dashboards. Sometimes the malware waits, and sometimes your own laboratory hides the evidence.

Svetoslav, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the malware is designed as a backdoor that waits for C2 commands before executing its fileless injection, and the lab's DNS routing sent queries to a virtual router instead of the analysis sinkhole.

Impact

The malware could establish persistence and beacon to its C2, but the fileless injection and further commands would only execute if the C2 replied with a valid command; in the lab the sinkhole prevented that.

What the attacker needed

Victim runs the VBScript; C2 server reachable; C2 sends a valid command

How it was found

  1. Air-gap the Windows victim host and REMnux analysis gateway.
  2. Extract the password-protected archive and stage the VBScript for static analysis.
  3. Configure INetSim and Wireshark on REMnux, and enable PowerShell Script Block Logging on Windows.
  4. Double-click the VBScript to detonate it.
  5. Observe that the PowerShell injection does not run because the C2 loop receives a generic HTTP 200 from the sinkhole.
  6. Override the Windows Preferred DNS server to point to the REMnux IP and flush the DNS cache to capture C2 traffic.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a malware analysis write-up, not a bug bounty report. The author studied a malicious script (a VBScript) that, when run, copies itself to a hidden folder so it starts again later, then repeatedly contacts a server controlled by the attacker to ask for instructions. The dangerous part that injects code into another program only happens if that server gives the go-ahead, so in the isolated lab it just kept asking.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.