YARA · CAPE Sandbox (CAPEv2)
CAPE_Stealcv2Strings
StealcV2 string decryption
- Author
- kevoreilly
- Date
- 2023-02-22
- Modified
- 2025-09-01
- Score / Quality
- 75 / 70
What this rule detects
StealcV2 string decryption
Targets: Windows PE.
It defines 4 patterns (0 text, 4 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
stealcv2strings.yarGNU General Public License v3.0
rule CAPE_Stealcv2Strings : FILE
{
meta:
= "StealcV2 string decryption"
= "kevoreilly"
= "d99fcc9c-35cc-5494-a0cd-738f3ae8d367"
= "2023-02-22"
= "2025-09-01"
= "https://github.com/kevoreilly/CAPEv2"
= "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/Stealc.yar#L28-L43"
= "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
= "923f70edb3ad70957576994008729bf7a087479eed1973c42161aa96fa694baa"
= 75
= 70
= "FILE"
= "bp0=$decode32*,action0=string:[esp],bp1=$decode64,action1=string:eax,bp2=$dump,action2=dumpstrings,count=0,typestring=Stealc Strings"
= "2f42dcf05dd87e6352491ff9d4ea3dc3f854df53d548a8da0c323be42df797b6"
= "8301936f439f43579cffe98e11e3224051e2fb890ffe9df680bbbd8db0729387"
strings:
$decode32 = {AB AB AB AB 8B 45 0C 89 4E 10 89 4E 14 39 45 08 75 0B C7 46 14 0F 00 00 00 88 0E EB 0F 2B 45 08 50 51 FF 75 ?? 8B}
$decode64 = {40 53 48 83 EC 20 48 8B 19 48 85 DB 74 ?? 48 8B 53 18 48 83 FA 0F 76 2C 48 8B 0B 48 FF C2 48 81 FA 00 10 00 00 72}
$dump32 = {33 C0 89 46 30 88 46 34 89 46 38 89 46 3C 89 46 40 89 46 44 89 46 48 89 46 4C 89 46 50 89 46 54 89 46 58 8B C6 5F 5E C3}
$dump64 = {48 8B C7 89 6F 40 40 88 6F 44 48 89 6F 48 48 89 6F 50 48 89 6F 58 48 89 6F 60 48 89 6F 68 48 89 6F 70 48 89 6F 78 48 89}
condition:
uint16( 0 ) == 0x5A4D and 2 of them
}
Strings (4 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $decode32 | hex | {AB AB AB AB 8B 45 0C 89 4E 10 89 4E 14 39 45 08 75 0B C7 46 14 0F 00 00 00 88 0E EB 0F 2B 45 08 50 51 FF 75 ?? 8B} | |
| $decode64 | hex | {40 53 48 83 EC 20 48 8B 19 48 85 DB 74 ?? 48 8B 53 18 48 83 FA 0F 76 2C 48 8B 0B 48 FF C2 48 81 FA 00 10 00 00 72} | |
| $dump32 | hex | {33 C0 89 46 30 88 46 34 89 46 38 89 46 3C 89 46 40 89 46 44 89 46 48 89 46 4C 89 46 50 89 46 54 89 46 58 8B C6 5F 5E C3} | |
| $dump64 | hex | {48 8B C7 89 6F 40 40 88 6F 44 48 89 6F 48 48 89 6F 50 48 89 6F 58 48 89 6F 60 48 89 6F 68 48 89 6F 70 48 89 6F 78 48 89} |
Condition
uint16( 0 ) == 0x5A4D and 2 of themIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 2 patterns 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.
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.
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: d99fcc9c-35cc-5494-a0cd-738f3ae8d367
Metadata
| cape_options | bp0=$decode32*,action0=string:[esp],bp1=$decode64,action1=string:eax,bp2=$dump,action2=dumpstrings,count=0,typestring=Stealc Strings |
|---|---|
| packed | 2f42dcf05dd87e6352491ff9d4ea3dc3f854df53d548a8da0c323be42df797b6 |
| packed | 8301936f439f43579cffe98e11e3224051e2fb890ffe9df680bbbd8db0729387 |
Tags:FILE
Related rules
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2026-07-31
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-02-26
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-01-05
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-01-05
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-01-05
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-03-07
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-03-07
- MalwareCAPE Sandbox (CAPEv2)· kevoreilly· 2024-10-04