Skip to content

YARA · CAPE Sandbox (CAPEv2)

CAPE_Formconfb

Formbook Config Extraction

MalwareFormbookCAPE Sandbox (CAPEv2)GNU General Public License v3.0Compiles with YARA-X
Author
kevoreilly
Date
2021-03-07
Modified
2026-05-15
Score / Quality
75 / 70

What this rule detects

Formbook Config Extraction

Associated malware family: Formbook.

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

Summary generated from the rule's metadata and condition.

Rule source

formconfb.yarGNU General Public License v3.0
rule CAPE_Formconfb
{
	meta:
		description = "Formbook Config Extraction"
		author = "kevoreilly"
		id = "55fe6f1d-1f60-537c-a763-3ea2659609b1"
		date = "2021-03-07"
		modified = "2026-05-15"
		reference = "https://github.com/kevoreilly/CAPEv2"
		source_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/Formbook.yar#L60-L75"
		license_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
		logic_hash = "c8bf1d3c242a02ae8bee42d570010c8b4a881db64d82b157fc4ac18f71e11f71"
		score = 75
		quality = 70
		tags = ""
		cape_options = "clear,bp0=$c2,action0=string:rcx,bp1=$decoy,action1=string,bp3=$sleep+5,action3=skip,count=0,typestring=Formbook Config"
		packed = "60571b2683e7b753a77029ebe9b5e1cb9f3fbfa8d6a43e4b7239eefd13141ae4"

	strings:
		$c2_1 = {44 0F B6 5D ?? 45 84 DB 74 ?? 48 8D 4D [1-5] 41 80 FB 2F 74 11 0F B6 41 01 48 FF C1 FF C3 44 0F B6 D8 84 C0 75}
		$c2_2 = {40 53 48 83 EC 20 48 8B DA 48 85 C9 74 28 80 39 00 74 23 48 85 D2 74 1E 48 8B D1 41 B8 04 00 00 00 48 8B CB E8}
		$decoy = {44 8D 1C (33|37) [0-13] 48 8D 7D [1-8] 42 C6 44 [2] 00 [0-11] 48 8B CF E8}
		$config = {40 55 53 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 [4] 48 81 EC [2] 00 00 45 33 ?? 33 C0 4C 8B E9 4C 89}
		$sleep = {B9 88 13 00 00 FF D7 44 8B 9B [4] 41 81 FB 00 01 00 00 75 ?? 48 39 B3 [4] 74 ?? 8B 83 [4] 05 00 20 00 00 39 B0}

	condition:
		$decoy and any of ( $c2_* ) and ( $config or $sleep )
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$c2_1hex{44 0F B6 5D ?? 45 84 DB 74 ?? 48 8D 4D [1-5] 41 80 FB 2F 74 11 0F B6 41 01 48 FF C1 FF C3 44 0F B6 D8 84 C0 75}
$c2_2hex{40 53 48 83 EC 20 48 8B DA 48 85 C9 74 28 80 39 00 74 23 48 85 D2 74 1E 48 8B D1 41 B8 04 00 00 00 48 8B CB E8}
$decoyhex{44 8D 1C (33|37) [0-13] 48 8D 7D [1-8] 42 C6 44 [2] 00 [0-11] 48 8B CF E8}
$confighex{40 55 53 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 [4] 48 81 EC [2] 00 00 45 33 ?? 33 C0 4C 8B E9 4C 89}
$sleephex{B9 88 13 00 00 FF D7 44 8B 9B [4] 41 81 FB 00 01 00 00 75 ?? 48 39 B3 [4] 74 ?? 8B 83 [4] 05 00 20 00 00 39 B0}

Condition

$decoy and any of ( $c2_* ) and ( $config or $sleep )

In plain words (Heuristic)

  • At least one pattern in ( $c2_* ) must match.
  • Pattern $decoy must be present.
  • Pattern $config must be present.
  • Pattern $sleep 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: 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: 55fe6f1d-1f60-537c-a763-3ea2659609b1

Metadata

cape_optionsclear,bp0=$c2,action0=string:rcx,bp1=$decoy,action1=string,bp3=$sleep+5,action3=skip,count=0,typestring=Formbook Config
packed60571b2683e7b753a77029ebe9b5e1cb9f3fbfa8d6a43e4b7239eefd13141ae4

More Formbook rules