Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_APT_RU_Sandworm_PY_May20_2

Detects Sandworm Python loader

APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2020-05-28
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects Sandworm Python loader

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

Summary generated from the rule's metadata and condition.

Rule source

apt-ru-sandworm-py-may20-2.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_RU_Sandworm_PY_May20_2 : FILE
{
	meta:
		description = "Detects Sandworm Python loader"
		author = "Florian Roth (Nextron Systems)"
		id = "5b32ad64-d959-5632-a03c-17aa055b213f"
		date = "2020-05-28"
		modified = "2023-12-05"
		reference = "https://twitter.com/billyleonard/status/1266054881225236482"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_sandworm_exim_expl.yar#L150-L167"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "abfa83cf54db8fa548942acd845b4f34acc94c46d4e1fb5ce7e97cc0c6596676"
		logic_hash = "5fb61a9cef64ecf97adc78bf67db667cfd9e5e6f3e03f1bba8f3cdbf6c257520"
		score = 75
		quality = 85
		tags = "FILE"

	strings:
		$x1 = "import sys;import re, subprocess;cmd" ascii fullword
		$x2 = "UA='Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko';server='http"
		$x3 = "';t='/admin/get.php';req" ascii
		$x4 = "ps -ef | grep Little\\ Snitch | grep " ascii fullword

	condition:
		uint16( 0 ) == 0x6d69 and filesize < 2KB and 1 of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$x1text"import sys;import re, subprocess;cmd"ascii fullword
$x2text"UA='Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko';server='http"
$x3text"';t='/admin/get.php';req"ascii
$x4text"ps -ef | grep Little\\ Snitch | grep "ascii fullword

Condition

uint16( 0 ) == 0x6d69 and filesize < 2KB and 1 of them

In plain words (Heuristic)

  • The file must be smaller than 2KB (a cheap guard that skips large files).
  • At least 1 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

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • abfa83cf54db8fa548942acd845b4f34acc94c46d4e1fb5ce7e97cc0c6596676

Licence & attribution

Author: Florian Roth (Nextron Systems)

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

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: 5b32ad64-d959-5632-a03c-17aa055b213f

Tags:FILE