Skip to content

YARA · CAPE Sandbox (CAPEv2)

CAPE_Stealcstrings

Stealc string decryption

MalwareStealcCAPE Sandbox (CAPEv2)GNU General Public License v3.0Compiles with YARA-X
Author
kevoreilly
Date
2023-02-22
Modified
2025-09-01
Score / Quality
75 / 70

What this rule detects

Stealc string decryption

Associated malware family: Stealc.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

stealcstrings.yarGNU General Public License v3.0
rule CAPE_Stealcstrings : FILE
{
	meta:
		description = "Stealc string decryption"
		author = "kevoreilly"
		id = "087b5532-e1e7-5df9-adb2-bf758c8ba352"
		date = "2023-02-22"
		modified = "2025-09-01"
		reference = "https://github.com/kevoreilly/CAPEv2"
		source_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/Stealc.yar#L15-L26"
		license_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
		logic_hash = "6d402446a979c00b6257ace9924db381d98c530b22968bd2776c66d58c7faefc"
		score = 75
		quality = 70
		tags = "FILE"
		cape_options = "bp0=$decode+17,action0=string:edx,count=0,typestring=Stealc Strings"
		packed = "d0c824e886f14b8c411940a07dc133012b9eed74901b156233ac4cac23378add"

	strings:
		$decode = {51 8B 15 [4] 52 8B 45 ?? 50 E8 [4] 83 C4 0C 6A 04 6A 00 8D 4D ?? 51 FF 15 [4] 83 C4 0C 8B 45 ?? 8B E5 5D C3}

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

Strings (1 patterns)

IdentifierTypeValueModifiers
$decodehex{51 8B 15 [4] 52 8B 45 ?? 50 E8 [4] 83 C4 0C 6A 04 6A 00 8D 4D ?? 51 FF 15 [4] 83 C4 0C 8B 45 ?? 8B E5 5D C3}

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

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: 087b5532-e1e7-5df9-adb2-bf758c8ba352

Metadata

cape_optionsbp0=$decode+17,action0=string:edx,count=0,typestring=Stealc Strings
packedd0c824e886f14b8c411940a07dc133012b9eed74901b156233ac4cac23378add

Tags:FILE

More Stealc rules