YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Lighthand
Detects LightHand
- 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:
= "Detects LightHand"
= "ditekshen"
= "2b644dfb-f09a-50a5-8260-7b7022bce1f4"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L11691-L11718"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "4f06467a522b786045839e6b22b888cecc554b0f63cc20dc43dc0f8ec80f5654"
= 75
= 75
= "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)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "27.102." | ascii |
| $x2 | text | "109.248.150.179" | fullword ascii |
| $s1 | regex | /Hello (Client|Server)/ | fullword ascii |
| $s2 | text | "%s|%s|%s|%s|%s|%s|" | fullword wide |
| $s3 | text | "%s\\cmd.exe" | fullword wide |
| $s4 | text | "Remote PC" | fullword wide |
| $s5 | hex | { 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 … | |
| $s6 | hex | { 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.
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).
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
Related rules
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06
- MalwareditekSHen detection· ditekshen· 2020-11-06