Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Pwshloader_Runpe01

Detects PowerShell PE loader / executer. Observed Gorgon TTPs

MalwarePwshloaderditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects PowerShell PE loader / executer. Observed Gorgon TTPs

Associated malware family: Pwshloader.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-pwshloader-runpe01.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Pwshloader_Runpe01
{
	meta:
		description = "Detects PowerShell PE loader / executer. Observed Gorgon TTPs"
		author = "ditekSHen"
		id = "fd44f48c-7a24-512b-8375-c9f978a8b5bd"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L4907-L4920"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "7dd377f6a1cc48ef8ab9d53989755fb967c89d3798b721781bc09043ba3d86f4"
		score = 75
		quality = 75
		tags = ""

	strings:
		$rp1 = "GetType('RunPe.RunPe'" ascii
		$rp2 = "GetType(\"RunPe.RunPe\"" ascii
		$rm1 = "GetMethod('Run'" ascii
		$rm2 = "GetMethod(\"Run\"" ascii
		$s1 = ".Invoke(" ascii
		$s2 = "[Reflection.Assembly]::Load(" ascii

	condition:
		all of ( $s* ) and 1 of ( $rp* ) and 1 of ( $rm* )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$rp1text"GetType('RunPe.RunPe'"ascii
$rp2text"GetType(\"RunPe.RunPe\""ascii
$rm1text"GetMethod('Run'"ascii
$rm2text"GetMethod(\"Run\""ascii
$s1text".Invoke("ascii
$s2text"[Reflection.Assembly]::Load("ascii

Condition

all of ( $s* ) and 1 of ( $rp* ) and 1 of ( $rm* )

In plain words (Heuristic)

  • All patterns in ( $s* ) must match.
  • At least 1 patterns in ( $rp* ) must match.
  • At least 1 patterns in ( $rm* ) 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: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: fd44f48c-7a24-512b-8375-c9f978a8b5bd