YARA · SEKOIA.IO Community
SEKOIA_Infostealer_Win_Blackcap
Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)
- Auteur
- Sekoia.io
- Date
- 2023-03-06
- Modifiée
- 2024-12-19
- Score / Qualité
- 75 / 80
Ce que détecte cette règle
Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)
Elle définit 3 motifs (3 texte, 0 hex, 0 regex).
Résumé généré à partir des métadonnées et de la condition de la règle.
Source de la règle
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
}
Chaînes (3 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $imp01 | texte | "import asyncio, json, ntpath, random, re, shutil, sqlite3, subprocess, threading, winreg, zipfile, httpx, psutil, win32gui, win32con, pyperclip, base64, reques … | ascii |
| $imp02 | texte | "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 | texte | "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 < 500KBEn clair (Heuristique)
- Le fichier doit faire moins de 500KB (garde-fou peu coûteux qui écarte les gros fichiers).
- Le fichier doit faire plus de 100KB.
- Le motif $imp01 doit se trouver dans la plage 0 .. 500.
- Le motif $pyf01 doit se trouver dans la plage @imp01 + 200 .. @imp01 + 1000.
- Le motif $imp02 doit se trouver dans la plage 0 .. 1000.
- Le motif $pyf01 doit se trouver dans la plage @imp02 + 100 .. @imp02 + 500.
Tester cette règle dans votre navigateur
Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.
Déposez un fichier ici ou cliquez pour choisirScanné localement avec YARA-X. Fichiers jusqu’à 200 Mo.
Références
Licence et attribution
Auteur : Sekoia.io
Dépôt source : SEKOIA.IO Community @ a438a5901a
Licence : Detection Rule License 1.1 (licence du dépôt)
Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.
Identifiant de règle: 1aa1fadb-3413-46e2-b733-1ad2134f7be2
Métadonnées
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Règles liées
- Suspect / chasseSEKOIA.IO Community· Sekoia.io· 2024-02-07
- Suspect / chasseSEKOIA.IO Community· Sekoia.io· 2024-02-07
- Suspect / chasseSEKOIA.IO Community· Sekoia.io· 2024-03-20
- Suspect / chasseSEKOIA.IO Community· Sekoia.io· 2022-10-11
- Suspect / chasseSEKOIA.IO Community· Sekoia.io· 2022-12-22
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-09-10
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-10-21
- APT / acteurSEKOIA.IO Community· Sekoia.io· 2024-10-21