← Back to SOC feed Coverage →

Detects ShimRat and the ShimRat loader

yara LOW Yara-Rules
backdoorcommunity
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Yara-Rules →
Retrieved: 2026-07-14T23:00:00Z · Confidence: medium

Hunt Hypothesis

This hunt targets adversaries utilizing the ShimRat framework to establish persistent footholds through its specialized loader mechanism within Azure environments. Proactive hunting is essential to identify early-stage implantation of this specific toolset before it escalates into a broader compromise, ensuring timely remediation despite the rule’s current low severity classification.

YARA Rule

rule shimrat: RAT
{
 meta:
  description = "Detects ShimRat and the ShimRat loader"
  author = "Yonathan Klijnsma (yonathan.klijnsma@fox-it.com)"
  date = "20/11/2015"
  ref = "https://blog.fox-it.com/2016/06/15/mofang-a-politically-motivated-information-stealing-adversary/"
  
 strings:
  $dll = ".dll"
  $dat = ".dat"
  $headersig = "QWERTYUIOPLKJHG"
  $datasig = "MNBVCXZLKJHGFDS"
  $datamarker1 = "Data$$00"
  $datamarker2 = "Data$$01%c%sData"
  $cmdlineformat = "ping localhost -n 9 /c %s > nul"
  $demoproject_keyword1 = "Demo"
  $demoproject_keyword2 = "Win32App"
  $comspec = "COMSPEC"
  $shim_func1 = "ShimMain"
  $shim_func2 = "NotifyShims"
  $shim_func3 = "GetHookAPIs"


 condition:
  ($dll and $dat and $headersig and $datasig) or ($datamarker1 and $datamarker2) or ($cmdlineformat and $demoproject_keyword1 and $demoproject_keyword2 and $comspec) or ($dll and $dat and $shim_func1 and $shim_func2 and $shim_func3)
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 13 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the ShimRat detection rule in an enterprise environment, along with suggested filters or exclusions:

Original source: https://github.com/Yara-Rules/rules/blob/main/malware/RAT_Shim.yar