YARA · SEKOIA.IO Community
SEKOIA_Infostealer_Win_Blackcap
Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)
- Autor
- Sekoia.io
- Fecha
- 2023-03-06
- Modificada
- 2024-12-19
- Puntuación / Calidad
- 75 / 80
Qué detecta esta regla
Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)
Define 3 patrones (3 de texto, 0 hex, 0 regex).
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
infostealer-win-blackcap.yarDetection Rule License 1.1
rule SEKOIA_Infostealer_Win_Blackcap : FILE
{
meta:
= "Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)"
= "Sekoia.io"
= "1aa1fadb-3413-46e2-b733-1ad2134f7be2"
= "2023-03-06"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_blackcap.yar#L1-L19"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "b826c88d557ea0a516534946ad9531eda1a875cb9c4ddf92d9b98f8c7b86623e"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$imp01 = "import asyncio, json, ntpath, random, re, shutil, sqlite3, subprocess, threading, winreg, zipfile, httpx, psutil, win32gui, win32con, pyperclip, base64, requests, ctypes, time" ascii
$imp02 = "from ctypes import windll, wintypes, byref, cdll, Structure, POINTER, c_char, c_buffer;from Crypto.Cipher import AES;from PIL import ImageGrab;from win32crypt import CryptUnprotectData" ascii
$pyf01 = "import marshal,lzma,gzip,bz2,binascii,zlib;exec(marshal.loads(binascii.a2b_base64(b'YwAAAAAA" ascii
condition:
($imp01 in ( 0 .. 500 ) and $pyf01 in ( @imp01 + 200 .. @imp01 + 1000 ) or $imp02 in ( 0 .. 1000 ) and $pyf01 in ( @imp02 + 100 .. @imp02 + 500 ) ) and filesize > 100KB and filesize < 500KB
}
Cadenas (3 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $imp01 | texto | "import asyncio, json, ntpath, random, re, shutil, sqlite3, subprocess, threading, winreg, zipfile, httpx, psutil, win32gui, win32con, pyperclip, base64, reques … | ascii |
| $imp02 | texto | "from ctypes import windll, wintypes, byref, cdll, Structure, POINTER, c_char, c_buffer;from Crypto.Cipher import AES;from PIL import ImageGrab;from win32crypt … | ascii |
| $pyf01 | texto | "import marshal,lzma,gzip,bz2,binascii,zlib;exec(marshal.loads(binascii.a2b_base64(b'YwAAAAAA" | ascii |
Condición
($imp01 in ( 0 .. 500 ) and $pyf01 in ( @imp01 + 200 .. @imp01 + 1000 ) or $imp02 in ( 0 .. 1000 ) and $pyf01 in ( @imp02 + 100 .. @imp02 + 500 ) ) and filesize > 100KB and filesize < 500KBEn palabras sencillas (Heurística)
- El archivo debe ocupar menos de 500KB (un límite barato que descarta archivos grandes).
- El archivo debe ocupar más de 100KB.
- El patrón $imp01 debe estar en el rango 0 .. 500.
- El patrón $pyf01 debe estar en el rango @imp01 + 200 .. @imp01 + 1000.
- El patrón $imp02 debe estar en el rango 0 .. 1000.
- El patrón $pyf01 debe estar en el rango @imp02 + 100 .. @imp02 + 500.
Prueba esta regla en tu navegador
Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.
Arrastra un archivo aquí o haz clic para elegirSe escanea en local con YARA-X. Archivos de hasta 200 MB.
Referencias
Licencia y atribución
Autor: Sekoia.io
Repositorio de origen: SEKOIA.IO Community @ a438a5901a
Licencia: Detection Rule License 1.1 (licencia del repositorio)
Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.
Id de la regla: 1aa1fadb-3413-46e2-b733-1ad2134f7be2
Metadatos
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Etiquetas:FILE
Reglas relacionadas
- Sospechoso / huntingSEKOIA.IO Community· Sekoia.io· 2024-02-07
- Sospechoso / huntingSEKOIA.IO Community· Sekoia.io· 2024-02-07
- Sospechoso / huntingSEKOIA.IO Community· Sekoia.io· 2024-03-20
- Sospechoso / huntingSEKOIA.IO Community· Sekoia.io· 2022-10-11
- Sospechoso / huntingSEKOIA.IO Community· Sekoia.io· 2022-12-22
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / actorSEKOIA.IO Community· Sekoia.io· 2024-10-21