Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Hyperbro02

Detects HyperBro IronTiger / LuckyMouse / APT27 malware

MalwareHyperbro02ditekSHen 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 HyperBro IronTiger / LuckyMouse / APT27 malware

Associated malware family: Hyperbro02.

Targets: Windows PE.

It defines 17 patterns (15 text, 2 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-hyperbro02.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Hyperbro02 : FILE
{
	meta:
		description = "Detects HyperBro IronTiger / LuckyMouse / APT27 malware"
		author = "ditekSHen"
		id = "1880afd7-ca06-5b43-af8f-e791ded0d7d8"
		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#L5450-L5474"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "ca4ee116516549fc42f7e32b3c24d631b7f2c638efbde5c07227358e78fd6f35"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "\\cmd.exe /A" fullword wide
		$s2 = "C:\\windows\\explorer.exe" fullword wide
		$s3 = "\\\\.\\pipe\\testpipe" fullword wide
		$s4 = "Elevation:Administrator!new:{" wide
		$s5 = "log.log" fullword wide
		$s6 = "%s\\%d.exe" fullword wide
		$s7 = ".?AVTPipeProtocol@@" fullword ascii
		$s8 = ".?AVTCaptureMgr@@" fullword ascii
		$s9 = "system-%d" fullword wide
		$s10 = "[test] %02d:%02d:%02d:%03d %s" fullword wide
		$s11 = "\\..\\data.dat" fullword wide
		$s12 = "\\..\\config.ini" fullword wide
		$s13 = { 73 00 76 00 63 00 68 00 6f 00 73 00 74 00 2e 00 65 00 78 00 65 00 00 00 20 00 2d 00 77 00 6f 00 72 00 6b 00 65 00 72 00 }
		$s14 = { 73 00 76 00 63 00 68 00 6f 00 73 00 74 00 2e 00 65 00 78 00 65 00 00 00 20 00 2d 00 64 00 61 00 65 00 6d 00 6f 00 6e 00 }
		$cnc1 = "https://%s:%d/ajax" fullword wide
		$cnc2 = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36" fullword wide
		$cnc3 = "139.180.208.225" fullword wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 7 of ( $s* ) or ( 2 of ( $cnc* ) and 2 of ( $s* ) ) )
}

Strings (17 patterns)

IdentifierTypeValueModifiers
$s1text"\\cmd.exe /A"fullword wide
$s2text"C:\\windows\\explorer.exe"fullword wide
$s3text"\\\\.\\pipe\\testpipe"fullword wide
$s4text"Elevation:Administrator!new:{"wide
$s5text"log.log"fullword wide
$s6text"%s\\%d.exe"fullword wide
$s7text".?AVTPipeProtocol@@"fullword ascii
$s8text".?AVTCaptureMgr@@"fullword ascii
$s9text"system-%d"fullword wide
$s10text"[test] %02d:%02d:%02d:%03d %s"fullword wide
$s11text"\\..\\data.dat"fullword wide
$s12text"\\..\\config.ini"fullword wide
$s13hex{ 73 00 76 00 63 00 68 00 6f 00 73 00 74 00 2e 00 65 00 78 00 65 00 00 00 20 00 2d 00 77 00 6f 00 72 00 6b 00 65 00 72 00 }
$s14hex{ 73 00 76 00 63 00 68 00 6f 00 73 00 74 00 2e 00 65 00 78 00 65 00 00 00 20 00 2d 00 64 00 61 00 65 00 6d 00 6f 00 6e 00 }
$cnc1text"https://%s:%d/ajax"fullword wide
$cnc2text"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36"fullword wide
$cnc3text"139.180.208.225"fullword wide

Condition

uint16( 0 ) == 0x5a4d and ( 7 of ( $s* ) or ( 2 of ( $cnc* ) and 2 of ( $s* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 7 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $cnc* ) must match.
  • At least 2 patterns in ( $s* ) 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: 1880afd7-ca06-5b43-af8f-e791ded0d7d8

Tags:FILE