Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Lighthand

Detects LightHand

MalwareLighthandditekSHen 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 LightHand

Associated malware family: Lighthand.

Targets: Windows PE.

It defines 8 patterns (5 text, 2 hex, 1 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-lighthand.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Lighthand : FILE
{
	meta:
		description = "Detects LightHand"
		author = "ditekshen"
		id = "2b644dfb-f09a-50a5-8260-7b7022bce1f4"
		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#L11691-L11718"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "4f06467a522b786045839e6b22b888cecc554b0f63cc20dc43dc0f8ec80f5654"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$x1 = "27.102." ascii
		$x2 = "109.248.150.179" fullword ascii
		$s1 = /Hello (Client|Server)/ fullword ascii
		$s2 = "%s|%s|%s|%s|%s|%s|" fullword wide
		$s3 = "%s\\cmd.exe" fullword wide
		$s4 = "Remote PC" fullword wide
		$s5 = { 2e 62 61 74 [3-4] 3a 4c 31 0d 0a 64 65 6c
                20 2f 46 20 22 25 73 22 0d 0a 69 66 20 65 78 69
                73 74 20 22 25 73 22 20 67 6f 74 6f 20 4c 31 0d
                0a 64 65 6c 20 2f 46 20 22 25 73 22 0d 0a 00 00
                6f 70 65 6e }
		$s6 = { 25 00 2e 00 32 00 66 00 47 00 42 00 00 00 00 00
                25 00 73 00 7c 00 25 00 73 00 7c 00 25 00 73 00
                0a 00 00 00 00 00 00 00 5c 00 2a 00 2e 00 2a 00
                00 00 00 00 0a 00 00 00 2e 00 00 00 2e 00 2e 00
                00 00 00 00 00 00 00 00 46 00 6f 00 6c 00 64 00
                65 00 72 00 00 00 00 00 25 00 73 00 5c 00 25 00
                73 00 00 00 00 00 00 00 25 00 64 00 42 00 00 00
                25 00 2e 00 31 00 66 00 4b 00 42 00 00 00 00 00
                25 00 2e 00 31 00 66 00 4d 00 42 }

	condition:
		uint16( 0 ) == 0x5a4d and ( ( 5 of ( $s* ) ) or ( 1 of ( $x* ) and 3 of ( $s* ) ) )
}

Strings (8 patterns)

IdentifierTypeValueModifiers
$x1text"27.102."ascii
$x2text"109.248.150.179"fullword ascii
$s1regex/Hello (Client|Server)/fullword ascii
$s2text"%s|%s|%s|%s|%s|%s|"fullword wide
$s3text"%s\\cmd.exe"fullword wide
$s4text"Remote PC"fullword wide
$s5hex{ 2e 62 61 74 [3-4] 3a 4c 31 0d 0a 64 65 6c 20 2f 46 20 22 25 73 22 0d 0a 69 66 20 65 78 69 73 74 20 22 25 73 22 20 67 6f 74 6f …
$s6hex{ 25 00 2e 00 32 00 66 00 47 00 42 00 00 00 00 00 25 00 73 00 7c 00 25 00 73 00 7c 00 25 00 73 00 0a 00 00 00 00 00 00 00 5c 00 …

Condition

uint16( 0 ) == 0x5a4d and ( ( 5 of ( $s* ) ) or ( 1 of ( $x* ) and 3 of ( $s* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 5 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $x* ) must match.
  • At least 3 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: 2b644dfb-f09a-50a5-8260-7b7022bce1f4

Tags:FILE