Skip to content

YARA · CAPE Sandbox (CAPEv2)

CAPE_Qakbotloader

QakBot Export Selection

MalwareQakbotCAPE Sandbox (CAPEv2)GNU General Public License v3.0Compiles with YARA-X
Author
kevoreilly
Date
2022-03-16
Modified
2024-02-16
Score / Quality
75 / 70

What this rule detects

QakBot Export Selection

Associated malware family: Qakbot.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

qakbotloader.yarGNU General Public License v3.0
rule CAPE_Qakbotloader : FILE
{
	meta:
		description = "QakBot Export Selection"
		author = "kevoreilly"
		id = "b2d5ef1c-0651-5249-9c4b-7e83235d4a30"
		date = "2022-03-16"
		modified = "2024-02-16"
		reference = "https://github.com/kevoreilly/CAPEv2"
		source_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/QakBot.yar#L31-L46"
		license_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
		hash = "6f99171c95a8ed5d056eeb9234dbbee123a6f95f481ad0e0a966abd2844f0e1a"
		logic_hash = "00869c0a9bf62cde3f46ca915b0ef689557b09dc58d6de34609e3998abfa7e98"
		score = 75
		quality = 70
		tags = "FILE"
		cape_options = "export=$export1,export=$export2,export=$export3"

	strings:
		$export1 = {55 8B EC 83 EC 50 (3A|66 3B) ?? 74}
		$export2 = {55 8B EC 3A ?? 74 [8-16] 74 [6-16] EB}
		$export3 = {55 8B EC 66 3B ?? 74 [3-5] 74}
		$wind = {(66 3B|3A) ?? 74 [1-14] BB 69 04 00 00 53 E? [5-20] 74}
		$getteb = {EB 00 55 8B EC 66 3B E4 74 ?? [1-5] 64 A1 18 00 00 00 5D EB}

	condition:
		uint16( 0 ) == 0x5A4D and ( any of ( $export* ) ) and ( $wind or $getteb )
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$export1hex{55 8B EC 83 EC 50 (3A|66 3B) ?? 74}
$export2hex{55 8B EC 3A ?? 74 [8-16] 74 [6-16] EB}
$export3hex{55 8B EC 66 3B ?? 74 [3-5] 74}
$windhex{(66 3B|3A) ?? 74 [1-14] BB 69 04 00 00 53 E? [5-20] 74}
$gettebhex{EB 00 55 8B EC 66 3B E4 74 ?? [1-5] 64 A1 18 00 00 00 5D EB}

Condition

uint16( 0 ) == 0x5A4D and ( any of ( $export* ) ) and ( $wind or $getteb )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least one pattern in ( $export* ) must match.
  • Pattern $wind must be present.
  • Pattern $getteb must be present.

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).

  • 6f99171c95a8ed5d056eeb9234dbbee123a6f95f481ad0e0a966abd2844f0e1a

Licence & attribution

Author: kevoreilly

Source repository: CAPE Sandbox (CAPEv2) @ 6b15e76f28

Licence: GNU General Public License v3.0 (repository licence)

Copyright notice: Cuckoo Sandbox is copyrighted by the Cuckoo Foundation.

Original rule

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

Rule id: b2d5ef1c-0651-5249-9c4b-7e83235d4a30

Metadata

cape_optionsexport=$export1,export=$export2,export=$export3

Tags:FILE

More Qakbot rules