Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_APT_NK_Scarcruft_Evolved_ROKRAT

Detects RokRAT malware used by ScarCruft APT group

APT / threat actorRokratSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
S2WLAB_TALON_JACK2
Date
2021-07-09
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects RokRAT malware used by ScarCruft APT group

Associated malware family: Rokrat.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-nk-scarcruft-evolved-rokrat.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_NK_Scarcruft_Evolved_ROKRAT : APT FILE
{
	meta:
		description = "Detects RokRAT malware used by ScarCruft APT group"
		author = "S2WLAB_TALON_JACK2"
		id = "53cabf41-0154-5372-b667-60d8a7cb9806"
		date = "2021-07-09"
		modified = "2023-12-05"
		reference = "https://medium.com/s2wlab/matryoshka-variant-of-rokrat-apt37-scarcruft-69774ea7bf48"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_nk_inkysquid.yar#L135-L179"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "01a2f410687c943d6c6e421ffacfe42f9e7b6afb82e43ba03a8d525e075a3a3c"
		score = 75
		quality = 85
		tags = "APT, FILE"
		type = "APT"
		version = "0.1"

	strings:
		$AES_IV_KEY = {
        C7 44 24 ?? 32 31 12 23
        C7 44 24 ?? 34 45 56 67
        C7 44 24 ?? 78 89 9A AB
        C7 44 24 ?? 0C BD CE DF
        C7 45 ?? 2B 7E A5 16
        C7 45 ?? 28 AE D2 A6
        C7 45 ?? AB F7 15 88
        C7 45 ?? 09 CF 4F 3C
        }
		$url_deocde = {
               80 E9 0F
               80 F1 C8
               88 48 ??
               48 83 EA 01  }

	condition:
		uint16( 0 ) == 0x5A4D and any of them
}

Strings (2 patterns)

IdentifierTypeValueModifiers
$AES_IV_KEYhex{ C7 44 24 ?? 32 31 12 23 C7 44 24 ?? 34 45 56 67 C7 44 24 ?? 78 89 9A AB C7 44 24 ?? 0C BD CE DF C7 45 ?? 2B 7E A5 16 …
$url_deocdehex{ 80 E9 0F 80 F1 C8 88 48 ?? 48 83 EA 01 }

Condition

uint16( 0 ) == 0x5A4D and any of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least one pattern 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: S2WLAB_TALON_JACK2

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: 53cabf41-0154-5372-b667-60d8a7cb9806

Metadata

typeAPT
version0.1

Tags:APTFILE

More Rokrat rules