Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Loader_Win_Red0044_Powershell_May24

Finds PowerShell scripts used in a malvertising campaign to deliver NetSupport RAT

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2024-05-03
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Finds PowerShell scripts used in a malvertising campaign to deliver NetSupport RAT

It defines 11 patterns (11 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

loader-win-red0044-powershell-may24.yarDetection Rule License 1.1
rule SEKOIA_Loader_Win_Red0044_Powershell_May24 : FILE
{
	meta:
		description = "Finds PowerShell scripts used in a malvertising campaign to deliver NetSupport RAT"
		author = "Sekoia.io"
		id = "ba3454b4-31cf-458d-8d78-c5cc5fa348ff"
		date = "2024-05-03"
		modified = "2024-12-19"
		reference = "https://twitter.com/crep1x/status/1786150734121120075"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/loader_win_red0044_powershell_may24.yar#L1-L26"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "73939f65b93b320b9e220ee284ea524864a6b05c7608213009ac5f00b3faeedc"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$str01 = "Start-Job -ScriptBlock" ascii
		$str02 = "Get-WmiObject" ascii
		$str03 = "-Class Win32_OperatingSystem" ascii
		$str04 = "-Class AntiVirusProduct" ascii
		$str05 = "$_.Exception.Message" ascii
		$str06 = ".DownloadString" ascii
		$str07 = "New-Object Net.WebClient" ascii
		$str08 = "myUserAgentHere" ascii
		$str09 = "GetFolderPath('Desktop'))\\document.pdf" ascii
		$str10 = "Receive-Job -Job" ascii
		$str11 = "Start-Process" ascii

	condition:
		8 of them and filesize < 20KB
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$str01text"Start-Job -ScriptBlock"ascii
$str02text"Get-WmiObject"ascii
$str03text"-Class Win32_OperatingSystem"ascii
$str04text"-Class AntiVirusProduct"ascii
$str05text"$_.Exception.Message"ascii
$str06text".DownloadString"ascii
$str07text"New-Object Net.WebClient"ascii
$str08text"myUserAgentHere"ascii
$str09text"GetFolderPath('Desktop'))\\document.pdf"ascii
$str10text"Receive-Job -Job"ascii
$str11text"Start-Process"ascii

Condition

8 of them and filesize < 20KB

In plain words (Heuristic)

  • The file must be smaller than 20KB (a cheap guard that skips large files).
  • At least 8 patterns in the rule must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: ba3454b4-31cf-458d-8d78-c5cc5fa348ff

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE