Zum Inhalt springen

YARA · SEKOIA.IO Community

SEKOIA_Infostealer_Win_Blackcap

Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)

Verdächtig / HuntingSEKOIA.IO CommunityDetection Rule License 1.1Kompiliert mit YARA-X
Autor
Sekoia.io
Datum
2023-03-06
Geändert
2024-12-19
Score / Qualität
75 / 80

Was diese Regel erkennt

Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)

Sie definiert 3 Muster (3 Text, 0 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

infostealer-win-blackcap.yarDetection Rule License 1.1
rule SEKOIA_Infostealer_Win_Blackcap : FILE
{
	meta:
		description = "Finds BlackCap Grabber samples (Python code obfuscated using Py-Fuscate)"
		author = "Sekoia.io"
		id = "1aa1fadb-3413-46e2-b733-1ad2134f7be2"
		date = "2023-03-06"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/infostealer_win_blackcap.yar#L1-L19"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "b826c88d557ea0a516534946ad9531eda1a875cb9c4ddf92d9b98f8c7b86623e"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "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
}

Strings (3 Muster)

BezeichnerTypWertModifikatoren
$imp01Text"import asyncio, json, ntpath, random, re, shutil, sqlite3, subprocess, threading, winreg, zipfile, httpx, psutil, win32gui, win32con, pyperclip, base64, reques …ascii
$imp02Text"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
$pyf01Text"import marshal,lzma,gzip,bz2,binascii,zlib;exec(marshal.loads(binascii.a2b_base64(b'YwAAAAAA"ascii

Bedingung

($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

In Worten (Heuristik)

  • Die Datei muss kleiner als 500KB sein (eine günstige Grenze, die große Dateien ausschließt).
  • Die Datei muss größer als 100KB sein.
  • Muster $imp01 muss im Bereich 0 .. 500 liegen.
  • Muster $pyf01 muss im Bereich @imp01 + 200 .. @imp01 + 1000 liegen.
  • Muster $imp02 muss im Bereich 0 .. 1000 liegen.
  • Muster $pyf01 muss im Bereich @imp02 + 100 .. @imp02 + 500 liegen.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Lizenz & Namensnennung

Autor: Sekoia.io

Quell-Repository: SEKOIA.IO Community @ a438a5901a

Lizenz: Detection Rule License 1.1 (Repository-Lizenz)

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: 1aa1fadb-3413-46e2-b733-1ad2134f7be2

Metadaten

version1.0
classificationTLP:CLEAR

Tags:FILE