Skip to content

Instantly share code, notes, and snippets.

@tlansec
Created January 5, 2022 10:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tlansec/8328c8c60f748ca562cf9a7045d1d0e0 to your computer and use it in GitHub Desktop.
Save tlansec/8328c8c60f748ca562cf9a7045d1d0e0 to your computer and use it in GitHub Desktop.
Casing anomaly YARA rule
rule general_win_runkey_casing_anomaly : General
{
meta:
author = "threatintel@volexity.com"
description = "Looks for files containing to a reference to the HKCU run key where the reference uses unusual casing."
date = "2021-08-03"
hash1 = "c20997c72508bc7340f4ec99fe9eb4f1ccde518e81bda66e7c86632f0748bffa"
memory_suitable = 0
strings:
$legit1 = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" wide ascii
$legit2 = "Software\\Microsoft\\Windows\\CurrentVersion\\run" wide ascii
$legit3 = "software\\microsoft\\windows\\currentVersion\\run" wide ascii
$legit4 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run" wide ascii
$legit5 = "SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\RUN" wide ascii
$legit6 = "SOFTWARE\\MICROSOFT\\Windows\\CurrentVersion\\Run" wide ascii
$legit7 = "SOFTWARE\\MICROSOFT\\Windows\\CurrentVersion\\run" wide ascii
$anycase = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" wide ascii nocase
condition:
$anycase and not
any of ($legit*)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment