Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Backdoor_Win_Rokrat

Detect the RokRAT malware

MalwareRokratSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-07-11
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detect the RokRAT malware

Associated malware family: Rokrat.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

backdoor-win-rokrat.yarDetection Rule License 1.1
rule SEKOIA_Backdoor_Win_Rokrat : FILE
{
	meta:
		description = "Detect the RokRAT malware"
		author = "Sekoia.io"
		id = "97a3acc1-4120-4d67-a6ad-fa204f2fd7f5"
		date = "2023-07-11"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/backdoor_win_rokrat.yar#L1-L31"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "84760cac26513915ebfb0a80ad3ddabe62f03ec4fda227d63e764f9c4a118c4e"
		hash = "758348521331bb18241d1cfc90d7e687dbc5bad8d596a2b2d6a9deb6cfc8cb1d"
		hash = "2a253c2aa1db3f809c86f410e4bd21f680b7235d951567f24d614d8e4d041576"
		hash = "ebce34cdeb20bc8c75249ce87a3080054f48b03ef66572fbc9dc40e6c36310d6"
		hash = "a1e4e95a20120f16adacb342672eec1e73bd7826b332096f046bb7e2b7cd80a1"
		hash = "3be58a7a7a25dbceee9e7ef06ef20aa86aef083be19db9e5ffb181d3f9f6615a"
		hash = "fa4df84071b9ae20b321e4d22162d8480f6992206bc046e403c2fbedd1655503"
		hash = "aa76b4db29cf929b4b22457ccb8cd77308191f091cde2f69e578ade9708d7949"
		logic_hash = "42e0b8583570d32a5d6a5bed175a53951e7d68d8471a283ef245686621dc01c4"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "--wwjaughalvncjwiajs--"
		$ = {7b 00 22 00 70 00 61 00 74 00 68 00 22 00 3a 00 22 00 25 00 73 00 22 00 2c 00 22 00 6d 00 6f 00 64 00 65 00 22 00 3a 00 7b 00 22 00 2e 00 74 00 61 00 67 00 22 00 3a 00 22 00 6f 00 76 00 65 00 72 00 77 00 72 00 69 00 74 00 65 00 22 00 7d 00 7d}
		$ = {68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 63 00 6c 00 6f 00 75 00 64 00 2d 00 61 00 70 00 69 00 2e 00 79 00 61 00 6e 00 64 00 65 00 78 00 2e 00 6e 00 65 00 74 00 2f 00 76 00 31 00 2f 00 64 00 69 00 73 00 6b 00 2f 00 72 00 65 00 73 00 6f 00 75 00 72 00 63 00 65 00 73 00 2f 00 75 00 70 00 6c 00 6f 00 61 00 64 00 3f 00 70 00 61 00 74 00 68 00 3d 00 25 00 73 00 26 00 6f 00 76 00 65 00 72 00 77 00 72 00 69 00 74 00 65 00 3d 00 25 00 73}

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

Strings (3 patterns)

IdentifierTypeValueModifiers
$text"--wwjaughalvncjwiajs--"
$hex{7b 00 22 00 70 00 61 00 74 00 68 00 22 00 3a 00 22 00 25 00 73 00 22 00 2c 00 22 00 6d 00 6f 00 64 00 65 00 22 00 3a 00 7b 00 22 00 2e 00 74 00 61 00 67 00 22 …
$hex{68 00 74 00 74 00 70 00 73 00 3a 00 2f 00 2f 00 63 00 6c 00 6f 00 75 00 64 00 2d 00 61 00 70 00 69 00 2e 00 79 00 61 00 6e 00 64 00 65 00 78 00 2e 00 6e 00 65 …

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

Sample hashes

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

  • 84760cac26513915ebfb0a80ad3ddabe62f03ec4fda227d63e764f9c4a118c4e
  • 758348521331bb18241d1cfc90d7e687dbc5bad8d596a2b2d6a9deb6cfc8cb1d
  • 2a253c2aa1db3f809c86f410e4bd21f680b7235d951567f24d614d8e4d041576
  • ebce34cdeb20bc8c75249ce87a3080054f48b03ef66572fbc9dc40e6c36310d6
  • a1e4e95a20120f16adacb342672eec1e73bd7826b332096f046bb7e2b7cd80a1
  • 3be58a7a7a25dbceee9e7ef06ef20aa86aef083be19db9e5ffb181d3f9f6615a
  • fa4df84071b9ae20b321e4d22162d8480f6992206bc046e403c2fbedd1655503
  • aa76b4db29cf929b4b22457ccb8cd77308191f091cde2f69e578ade9708d7949

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: 97a3acc1-4120-4d67-a6ad-fa204f2fd7f5

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE

More Rokrat rules