Skip to content

YARA · CAPE Sandbox (CAPEv2)

CAPE_Emotetpacker

Emotet bypass

MalwareEmotetCAPE Sandbox (CAPEv2)GNU General Public License v3.0Compiles with YARA-X
Author
kevoreilly
Date
2022-03-31
Modified
2022-06-09
Score / Quality
75 / 70

What this rule detects

Emotet bypass

Associated malware family: Emotet.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

emotetpacker.yarGNU General Public License v3.0
rule CAPE_Emotetpacker : FILE
{
	meta:
		description = "Emotet bypass"
		author = "kevoreilly"
		id = "67b8e14c-5fa8-52af-bb9a-1663b084fbf0"
		date = "2022-03-31"
		modified = "2022-06-09"
		reference = "https://github.com/kevoreilly/CAPEv2"
		source_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/EmotetPacker.yar#L1-L13"
		license_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
		hash = "5a95d1d87ce69881b58a0e3aafc1929861e2633cdd960021d7b23e2a36409e0d"
		logic_hash = "5f27d9d18884f7e0805f69960869b332c1577bf8be8ac103285e8bf98cda0ffd"
		score = 75
		quality = 70
		tags = "FILE"
		cape_options = "bp0=$trap1+31,action0=skip,bp1=$trap2+43,action1=jmp:186,count=1"

	strings:
		$trap1 = {8B 45 08 0F 28 0D [4] 0F 57 C0 0F 29 46 30 89 46 40 C7 46 44 00 00 00 00 0F 11 4E 48 E8}
		$trap2 = {F2 0F 10 15 [4] BE 01 00 00 00 0F 01 F9 C7 44 24 60 00 00 00 00 89 4C 24 60 0F 01 F9 C7 44 24 5C 00 00 00 00 89 4C 24 5C 0F 1F 84 00 00 00 00 00}

	condition:
		uint16( 0 ) == 0x5A4D and any of ( $trap* )
}

Strings (2 patterns)

IdentifierTypeValueModifiers
$trap1hex{8B 45 08 0F 28 0D [4] 0F 57 C0 0F 29 46 30 89 46 40 C7 46 44 00 00 00 00 0F 11 4E 48 E8}
$trap2hex{F2 0F 10 15 [4] BE 01 00 00 00 0F 01 F9 C7 44 24 60 00 00 00 00 89 4C 24 60 0F 01 F9 C7 44 24 5C 00 00 00 00 89 4C 24 5C 0F 1F 84 00 00 00 00 00}

Condition

uint16( 0 ) == 0x5A4D and any of ( $trap* )

In plain words (Heuristic)

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

  • 5a95d1d87ce69881b58a0e3aafc1929861e2633cdd960021d7b23e2a36409e0d

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: 67b8e14c-5fa8-52af-bb9a-1663b084fbf0

Metadata

cape_optionsbp0=$trap1+31,action0=skip,bp1=$trap2+43,action1=jmp:186,count=1

Tags:FILE

More Emotet rules