Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MAL_APT_NK_Andariel_Sockstroy_Strings_Opcodes

Detects a variant of the SocksTroy malware family

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
CISA.gov
Date
2024-07-25
Modified
2026-01-29
Score / Quality
80 / 85

What this rule detects

Detects a variant of the SocksTroy malware family

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

mal-apt-nk-andariel-sockstroy-strings-opcodes.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_APT_NK_Andariel_Sockstroy_Strings_Opcodes : FILE
{
	meta:
		description = "Detects a variant of the SocksTroy malware family"
		author = "CISA.gov"
		id = "9e7fb6ba-771e-5cae-a0d5-c0b95ee6d4e9"
		date = "2024-07-25"
		modified = "2026-01-29"
		reference = "https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-207a"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_nk_andariel_jul24.yar#L180-L199"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "6ab31b285d0dba1745a2d8b172bd02931c6138e2b8e541203b88f111d179549b"
		score = 80
		quality = 85
		tags = "FILE"

	strings:
		$strHost = "-host" wide
		$strAuth = "-auth" wide
		$SocksTroy = "SocksTroy"
		$cOpCodeCheck = { 81 E? A0 00 00 00 0F 84 ?? ?? ?? ?? 83 E? 03 74 ?? 83 E? 02 74 ?? 83 F? 0B }

	condition:
		uint16( 0 ) == 0x5a4d and ( 1 of ( $str* ) and all of ( $c* ) or all of ( $Socks* ) )
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$strHosttext"-host"wide
$strAuthtext"-auth"wide
$SocksTroytext"SocksTroy"
$cOpCodeCheckhex{ 81 E? A0 00 00 00 0F 84 ?? ?? ?? ?? 83 E? 03 74 ?? 83 E? 02 74 ?? 83 F? 0B }

Condition

uint16( 0 ) == 0x5a4d and ( 1 of ( $str* ) and all of ( $c* ) or all of ( $Socks* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $c* ) must match.
  • All patterns in ( $Socks* ) must match.
  • At least 1 patterns in ( $str* ) 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: CISA.gov

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: 9e7fb6ba-771e-5cae-a0d5-c0b95ee6d4e9

Tags:FILE