.NET Malware Hides Its Payload in an Embedded Image

· Original article ↗

Summary

Huntress analysts traced a suspicious .NET executable that compiled and loaded a DLL, extracted a payload disguised as an embedded image, and concealed malware capabilities including password theft and keylogging.

Key points

  • A suspicious Internet Shortcut in a user’s startup directory pointed to an executable with a misleading filename; its hash had no VirusTotal hits.
  • The .NET executable XOR-decoded embedded C# source code, compiled it into a DLL, and injected the DLL into a thread.
  • The DLL processed an embedded resource that appeared to be a PNG but contained another payload.
  • Analysts extracted the resource and used dnSpy and de4dot to examine successive layers of obfuscation.
  • The final code exposed capabilities including disabling antivirus applications, stealing passwords, logging keystrokes, and controlling a victim’s webcam.

Article Details

Attack Vectors
  • A suspicious Internet Shortcut in a user's startup directory pointed to a locally stored executable named doc06421,pdf.exe.
  • The executable used XOR obfuscation to conceal C# source code, compiled that code into a DLL, and injected the DLL into a new thread.
  • The DLL loaded and processed an embedded resource disguised as a PNG image, extracting and executing a further payload.
Defensive Notes
  • Inspect suspicious Internet Shortcut files in user startup directories and investigate unexpected local executable targets.
  • Analyze obfuscated .NET samples by decoding their embedded source and resources; the article used dnSpy, Resource Hacker, and de4dot.

MITRE ATT&CK

Products

Tools

Related Articles