Efficiently Distributing RemcosRAT Through Steganography

RemcosRAT is being distributed via steganography, beginning with a Word document that uses template injection, followed by an RTF that exploits a Word equation editor vulnerability to download and execute code. The chain then uses VBScript hosted on a C2 or paste service, obfuscated PowerShell, Base64-encoded payloads hidden in images, reflective loading of a .NET DLL, and ultimately process hollowing to run RemcosRAT. #RemcosRAT #Steganography #PowerShell #ProcessHollowing #ReflectiveCodeLoading #EQNEDT32

Keypoints

  • RemcosRAT is being delivered through steganography, starting with a Word document and a vulnerable RTF path.
  • The RTF stage downloads VBScript files, including one disguised as a “.jpg” from a C2 and another from paste.ee, a Pastebin-like service.
  • The VBScript is heavily obfuscated and triggers a PowerShell script for further payload delivery.
  • The PowerShell payload downloads an image that hides Base64-encoded data representing a .NET DLL, which is loaded reflectively and executed in memory.
  • The final RemcosRAT payload is executed via process hollowing using RegAsm.exe as the suspended host.
  • A set of IOCs (MD5s, C2s, and IPs) and detection names are provided to aid defense against this campaign.

MITRE Techniques

  • [T1566.001] Spear Phishing Attachment – Attacks begin with a Word document that likely appears legitimate to the victim but contains malicious elements. This is indicative of a spear phishing attack using a document as the vector. ‘The attack begins with a Word document that likely appears legitimate to the victim but contains malicious elements. This is indicative of a spear phishing attack using a document as the vector.’
  • [T1221] Template Injection – The initial Word document employs template injection, which manipulates document templates to execute malicious code when the document is opened. ‘The initial Word document employs template injection, which manipulates document templates to execute malicious code when the document is opened.’
  • [T1203] Exploitation for Client Execution – An RTF file is then downloaded and executed, exploiting a vulnerability in the equation editor component of Microsoft Word (EQNEDT32.EXE), leading to code execution. ‘An RTF file is then downloaded and executed, exploiting a vulnerability in the equation editor component of Microsoft Word (EQNEDT32.EXE), leading to code execution.’
  • [T1496] Resource Hijacking – The RTF file downloads a VBScript masquerading as a “.jpg” file from a command and control (C2) server, indicating the use of file name deception to hide malicious scripts. ‘The RTF file downloads a VBScript masquerading as a “.jpg” file from a command and control (C2) server, indicating the use of file name deception to hide malicious scripts.’
  • [T1567.002] Use of Paste Sites for Staging – Another VBScript is downloaded from “paste.ee,” a text sharing service similar to Pastebin, used here for hosting malicious code. ‘Another VBScript is downloaded from “paste.ee,” a text sharing service similar to Pastebin, used here for hosting malicious code.’
  • [T1027] Obfuscated Files or Information – The VBScript is heavily obfuscated with special characters to evade detection. ‘The VBScript is heavily obfuscated with special characters to evade detection.’
  • [T1059.001] PowerShell – The obfuscated script executes a PowerShell script, which is a common scripting language used by attackers for its powerful capabilities and availability on Windows systems. ‘The obfuscated script executes a PowerShell script, which is a common scripting language used by attackers for its powerful capabilities and availability on Windows systems.’
  • [T1027.003] Steganography – The PowerShell script downloads an image containing hidden data encoded in Base64, using steganography to conceal the payload. ‘The PowerShell script downloads an image containing hidden data encoded in Base64, using steganography to conceal the payload.’
  • [T1620] Reflective Code Loading – The PowerShell script then uses reflective code loading to execute a .NET DLL file directly from memory, avoiding traditional file-based execution. ‘The decoded data is “.NET DLL” which is given 6 arguments and executed through reflective code loading.’
  • [T1055.012] Process Hollowing – RemcosRAT, the final payload, is executed using the process hollowing technique, where a legitimate process (RegAsm.exe) is started in a suspended state, its memory is replaced with malicious code, and then resumed to execute the malware. ‘RemcosRAT, the final payload, is executed using the process hollowing technique, where a legitimate process (RegAsm.exe) is started in a suspended state, its memory is replaced with malicious code, and then resumed to execute the malware.’
  • [T1071] Command and Control – Throughout the attack, multiple files are downloaded from a C2 server, indicating ongoing communication with an attacker-controlled server. ‘Throughout the attack, multiple files are downloaded from a C2 server, indicating ongoing communication with an attacker-controlled server.’

Indicators of Compromise

  • [Hash] context – FDFD9E702F54E28DC2CA5F7C04BF1C8F, F5A49410D9EA23DC2CF67D7D3BA8FAD0, and other 3 hashes
  • [URL] context – hxxp://ur8ly.com/asy2xrhxxps://paste.ee/dEh1G4
  • [IP] context – 107.175.31[.]187, 192.210.201[.]57:52748
  • [Domain] context – paste.ee, ur8ly.com
  • [File name] context – EQNEDT32.EXE, RegAsm.exe

Read more: https://www.cyfirma.com/research/exploiting-document-templates-stego-campaign-deploying-remcos-rat-and-agent-tesla/