Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Bhunt

Detects BHunt infostealer

MalwareBhuntditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Detects BHunt infostealer

Associated malware family: Bhunt.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-bhunt.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Bhunt : FILE
{
	meta:
		description = "Detects BHunt infostealer"
		author = "ditekSHen"
		id = "4c699f10-64a0-5e3c-af00-e08ebe1c6830"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L9212-L9233"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "ca0a7e6898047fa3b369125a4402e2beffd328a5db47b1d5dd5914a86d6f0073"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "BHUNT.Resources.resources" fullword ascii
		$x2 = "//minecraftsquid.hopto.org/" wide
		$s1 = "chaos_crew" ascii wide
		$s2 = "golden7" ascii wide
		$s3 = "mrpropper" ascii wide
		$s4 = "/ifo.php?" ascii wide
		$s5 = "bonanza=:=" ascii wide
		$s6 = "blackjack=:=" ascii wide
		$s7 = "SendPostData" fullword ascii
		$c1 = "cmd /c REG ADD" wide
		$c2 = "taskkill /F /IM" wide
		$c3 = "cmd.exe /c wmic" wide
		$g1 = "$ca9a291d-266c-41dc-9f1c-93cfe0dcac16" fullword ascii
		$g2 = "$6d0feb35-213d-4b9f-afc7-06d168cfcb5e" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or ( 1 of ( $x* ) and ( 5 of ( $s* ) or 2 of ( $c* ) ) ) or ( 6 of ( $s* ) and 2 of ( $c* ) ) or ( all of ( $g* ) and 2 of them ) )
}

Strings (14 patterns)

IdentifierTypeValueModifiers
$x1text"BHUNT.Resources.resources"fullword ascii
$x2text"//minecraftsquid.hopto.org/"wide
$s1text"chaos_crew"ascii wide
$s2text"golden7"ascii wide
$s3text"mrpropper"ascii wide
$s4text"/ifo.php?"ascii wide
$s5text"bonanza=:="ascii wide
$s6text"blackjack=:="ascii wide
$s7text"SendPostData"fullword ascii
$c1text"cmd /c REG ADD"wide
$c2text"taskkill /F /IM"wide
$c3text"cmd.exe /c wmic"wide
$g1text"$ca9a291d-266c-41dc-9f1c-93cfe0dcac16"fullword ascii
$g2text"$6d0feb35-213d-4b9f-afc7-06d168cfcb5e"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or ( 1 of ( $x* ) and ( 5 of ( $s* ) or 2 of ( $c* ) ) ) or ( 6 of ( $s* ) and 2 of ( $c* ) ) or ( all of ( $g* ) and 2 of them ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $x* ) must match.
  • All patterns in ( $g* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 5 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $c* ) must match.
  • At least 6 patterns in ( $s* ) must match.
  • 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.

Open in editor

References

Licence & attribution

Author: ditekSHen

Source repository: ditekSHen detection @ e76c93dcde

Licence: BSD 2-Clause License (repository licence)

Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).

Original rule

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

Rule id: 4c699f10-64a0-5e3c-af00-e08ebe1c6830

Tags:FILE