Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Trojan_Win_Bbtok_Dll1_Sep23

Finds BBTok installation DLL file

MalwareSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2023-09-26
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Finds BBTok installation DLL file

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

trojan-win-bbtok-dll1-sep23.yarDetection Rule License 1.1
rule SEKOIA_Trojan_Win_Bbtok_Dll1_Sep23 : FILE
{
	meta:
		description = "Finds BBTok installation DLL file"
		author = "Sekoia.io"
		id = "eebed24b-24ec-4a85-852c-52d0acc9a698"
		date = "2023-09-26"
		modified = "2024-12-19"
		reference = "https://research.checkpoint.com/2023/behind-the-scenes-of-bbtok-analyzing-a-bankers-server-side-components/"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/trojan_win_bbtok_dll1_sep23.yar#L1-L28"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		hash = "5353956345206982af9bde55300fc405ba6e40722e8f51e8717c30ad32bc8f91"
		logic_hash = "1b1e25f7d760d275d2ef01390c215edb1752ad65383c92a21d71d9e65da3c5f8"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$str01 = "C:\\Windows\\System32\\rundll32.exe" wide
		$str02 = "C:\\ProgramData\\mmd.exe" wide
		$str03 = "REG ADD HKCU\\Software\\Classes\\.pwn\\Shell\\Open\\command -ve /d" wide
		$str04 = "C:\\ProgramData\\mmd.exe \\\\" wide
		$str05 = "\\file\\Trammy.dll" wide
		$str06 = "Dacl & REG DELETE HKCU\\Software\\Classes\\ms-settings /f" wide
		$str07 = "REG DELETE  HKCU\\Software\\Classes\\.pwn /f" wide
		$str08 = "REG ADD HKCU\\Software\\Classes\\ms-settings\\CurVer -ve /d \".pwn\" /f" wide
		$str09 = "timeout /t 3 >nul & start /MIN computerdefaults.exe" wide
		$str10 = "set_StartInfo" ascii
		$str11 = "set_WindowStyle" ascii

	condition:
		uint16( 0 ) == 0x5a4d and 7 of them and filesize < 50KB
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$str01text"C:\\Windows\\System32\\rundll32.exe"wide
$str02text"C:\\ProgramData\\mmd.exe"wide
$str03text"REG ADD HKCU\\Software\\Classes\\.pwn\\Shell\\Open\\command -ve /d"wide
$str04text"C:\\ProgramData\\mmd.exe \\\\"wide
$str05text"\\file\\Trammy.dll"wide
$str06text"Dacl & REG DELETE HKCU\\Software\\Classes\\ms-settings /f"wide
$str07text"REG DELETE HKCU\\Software\\Classes\\.pwn /f"wide
$str08text"REG ADD HKCU\\Software\\Classes\\ms-settings\\CurVer -ve /d \".pwn\" /f"wide
$str09text"timeout /t 3 >nul & start /MIN computerdefaults.exe"wide
$str10text"set_StartInfo"ascii
$str11text"set_WindowStyle"ascii

Condition

uint16( 0 ) == 0x5a4d and 7 of them and filesize < 50KB

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • The file must be smaller than 50KB (a cheap guard that skips large files).
  • At least 7 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.

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 5353956345206982af9bde55300fc405ba6e40722e8f51e8717c30ad32bc8f91

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: eebed24b-24ec-4a85-852c-52d0acc9a698

Metadata

version1.0
classificationTLP:CLEAR

Tags:FILE