GrimResource Attack Exploits XSS Flaw in MSC Files, Remains Unpatched

25 Jun 2024

The GrimResource attack begins with a malicious MSC file that attempts to exploit an old DOM-based cross-site scripting (XSS) flaw in the 'apds.dll' library, which allows the execution of arbitrary JavaScript through a crafted URL. The vulnerability was reported to Adobe and Microsoft in October 2018, and while both investigated, Microsoft determined that the case did not meet the criteria for immediate fixing. As of March 2019, the XSS flaw remained unpatched, and it is unclear if it was ever addressed. BleepingComputer contacted Microsoft to confirm if they patched the flaw, but a comment wasn’t immediately available.

The malicious MSC file distributed by attackers contains a reference to the vulnerable APDS resource in the StringTable section, so when the target opens it, MMC processes it and triggers the JS execution in the context of 'mmc.exe'.

Reference to apds.dll Redirect in StringTable

Elastic explains that the XSS flaw can be combined with the 'DotNetToJScript' technique to execute arbitrary .NET code through the JavaScript engine, bypassing any security measures in place. The examined sample uses 'transformNode' obfuscation to evade ActiveX warnings, while the JS code reconstructs a VBScript that uses DotNetToJScript to load a .NET component named 'PASTALOADER'.

PASTALOADER retrieves a Cobalt Strike payload from the environment variables set by the VBScript, spawns a new instance of 'dllhost.exe,' and injects it using the 'DirtyCLR' technique combined with function unhooking and indirect system calls.

Elastic researcher Samir Bousseaden shared a demonstration of the GrimResource attack on X.

Stopping GrimResource

In general, system administrators are advised to be on the lookout for the following:

  • File operations involving apds.dll invoked by mmc.exe.
  • Suspicious executions via MCC, especially processes spawned by mmc.exe with .msc file arguments.
  • RWX memory allocations by mmc.exe that originate from script engines or .NET components.
  • Unusual .NET COM object creation within non-standard script interpreters like JScript or VBScript.
  • Temporary HTML files created in the INetCache folder as a result of APDS XSS redirection.

Elastic Security has also published a complete list of GrimResource indicators on GitHub and provided YARA rules in the report to help defenders detect suspicious MSC files.

Top charts for Desktop Windows

uTorrent

uTorrent

Latest update uTorrent download for free for Windows PC or Android mobile

5
1032 reviews
6467812
downloads
Zona

Zona

Latest update Zona download for free for Windows PC or Android mobile

4
614 reviews
1305260
downloads
WinRAR

WinRAR

Latest update WinRAR download for free for Windows PC or Android mobile

5
735 reviews
501381
downloads
Minecraft

Minecraft

Latest update Minecraft download for free for Windows PC or Android mobile

5
750 reviews
454907
downloads

News and reviews for Desktop Windows

Arc Raiders Players Avoid PvP on Steam

Arc Raiders players show low engagement in PvP on Steam, with 19% never engaging in combat. Many prefer cooperative achievements.

Read more

PlayStation State of Play Highlights PC and Xbox Games

PlayStation State of Play on 2025-11-11 announced titles for PC and Xbox in 2026, including Elden Ring Nightreign DLC.

Read more

Dragon's Dogma Available in Fanatical's Random Game Bundle

Fanatical offers a $12.99 bundle that may include Dragon's Dogma, enhancing game accessibility.

Read more

Delays Release of Military FPS '83' to 2026

Blue Dot Games delays '83' early access to 2026 for game enhancements.

Read more

Google Reboots Cameyo for Windows Apps on ChromeOS

Google relaunches Cameyo for seamless Windows app use on ChromeOS, boosting enterprise adoption.

Read more

Bloodlines 2 Winter Update Reveals New Features and Bug Fixes

The Chinese Room announces a roadmap for Bloodlines 2, featuring winter and Valentine's Day updates, new features, and two DLCs for 2026.

Read more

Anno 117 Set for Release November 2025 on PC and Consoles

Anno 117, a narrative-driven city builder, launches on PC and consoles in November 2025, enhancing gameplay for Roman history enthusiasts.

Read more

Bloodlines 2 Roadmap Adds New Features and Fixes

Bloodlines 2 roadmap released: Patch 1.0.5 adds FOV slider and saves, with more updates in 2026.

Read more

Arc Raiders Update Expands with New Map and Features

Arc Raiders' North Line update launches 2025-11-13, adding Stella Montis map, community events, and new enemies.

Read more

Tiny386 Transforms Microcontroller into i386 PC Emulator

Tiny386, created by He Chunhui, enables ESP32-S3 to run Windows 95, expanding microcontroller capabilities.

Read more