Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Koi_Powershell_Loading_Obfuscatednet

Powershell script loading obfuscated .NET Koi module

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

What this rule detects

Powershell script loading obfuscated .NET Koi module

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

Summary generated from the rule's metadata and condition.

Rule source

koi-powershell-loading-obfuscatednet.yarDetection Rule License 1.1
rule SEKOIA_Koi_Powershell_Loading_Obfuscatednet
{
	meta:
		description = "Powershell script loading obfuscated .NET Koi module"
		author = "Sekoia.io"
		id = "75a7460d-cc28-470e-9841-da8e46ee0101"
		date = "2024-03-20"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/koi_powershell_loading_obfuscatednet.yar#L1-L18"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "82f30c04474ea77af5169771a2c0e75ba792fd32dc559b8c29172b73ace4ef10"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$s1 = "# [Net.ServicePointManager]::SecurityProtocol +='tls12'"
		$s2 = "$binary[$i] = $binary[$i] -bxor $k[$i % $k.Length]"
		$s3 = "\").Split('|')"
		$s4 = "$ep.Invoke($null, "

	condition:
		$s3 and 3 of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$s1text"# [Net.ServicePointManager]::SecurityProtocol +='tls12'"
$s2text"$binary[$i] = $binary[$i] -bxor $k[$i % $k.Length]"
$s3text"\").Split('|')"
$s4text"$ep.Invoke($null, "

Condition

$s3 and 3 of them

In plain words (Heuristic)

  • At least 3 patterns in the rule must match.
  • Pattern $s3 must be present.

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: 75a7460d-cc28-470e-9841-da8e46ee0101

Metadata

version1.0
classificationTLP:CLEAR