Skip to content

YARA · CAPE Sandbox (CAPEv2)

CAPE_Darkgateloader

DarkGate Loader

MalwareCAPE Sandbox (CAPEv2)GNU General Public License v3.0Compiles with YARA-X
Author
enzok
Date
2023-08-09
Modified
2025-04-07
Score / Quality
75 / 70

What this rule detects

DarkGate Loader

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

Summary generated from the rule's metadata and condition.

Rule source

darkgateloader.yarGNU General Public License v3.0
rule CAPE_Darkgateloader
{
	meta:
		description = "DarkGate Loader"
		author = "enzok"
		id = "feb90ae6-ec01-59da-a3df-217df2133588"
		date = "2023-08-09"
		modified = "2025-04-07"
		reference = "https://github.com/kevoreilly/CAPEv2"
		source_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/DarkGateLoader.yar#L1-L15"
		license_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
		logic_hash = "00692123615d2f7eaf8aea07754fc9439cf58e1fb8eb4f44f0428b362f27e794"
		score = 75
		quality = 70
		tags = ""
		cape_options = "bp0=$decrypt1+30,bp0=$decrypt2+29,action0=dump:eax::ebx,bp1=$decrypt3+80,action1=dumpsize:eax,bp2=$decrypt3+124,hc2=1,action2=dump:eax,count=0"
		packed = "b15e4b4fcd9f0d23d902d91af9cc4e01417c426e55f6e0b4ad7256f72ac0231a"

	strings:
		$loader = "loader"
		$decrypt1 = {B? 01 00 00 00 8B [3] E8 [4] 8B D7 32 54 [4] 88 54 18 FF 4? 4? 75}
		$decrypt2 = {B? 01 00 00 00 8B [2] E8 [4] 8B D7 2B D3 [4] 88 54 18 FF 4? 4? 75}
		$decrypt3 = {89 85 [4] 8B 85 [4] 8B F0 8D BD [4] B? 10 [3] F3 A5 8B 85 [4] 33 D2 [2] 8B 85 [4] 99}

	condition:
		$loader and any of ( $decrypt* )
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$loadertext"loader"
$decrypt1hex{B? 01 00 00 00 8B [3] E8 [4] 8B D7 32 54 [4] 88 54 18 FF 4? 4? 75}
$decrypt2hex{B? 01 00 00 00 8B [2] E8 [4] 8B D7 2B D3 [4] 88 54 18 FF 4? 4? 75}
$decrypt3hex{89 85 [4] 8B 85 [4] 8B F0 8D BD [4] B? 10 [3] F3 A5 8B 85 [4] 33 D2 [2] 8B 85 [4] 99}

Condition

$loader and any of ( $decrypt* )

In plain words (Heuristic)

  • At least one pattern in ( $decrypt* ) must match.
  • Pattern $loader 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

Licence & attribution

Author: enzok

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: feb90ae6-ec01-59da-a3df-217df2133588

Metadata

cape_optionsbp0=$decrypt1+30,bp0=$decrypt2+29,action0=dump:eax::ebx,bp1=$decrypt3+80,action1=dumpsize:eax,bp2=$decrypt3+124,hc2=1,action2=dump:eax,count=0
packedb15e4b4fcd9f0d23d902d91af9cc4e01417c426e55f6e0b4ad7256f72ac0231a