YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_SUSP_Hxd_Icon_Anomaly_May23_1
Detects suspicious use of the the free hex editor HxD's icon in PE files that don't seem to be a legitimate version of HxD
- Author
- Florian Roth
- Date
- 2023-05-29
- Modified
- 2023-12-05
- Score / Quality
- 65 / 85
What this rule detects
Detects suspicious use of the the free hex editor HxD's icon in PE files that don't seem to be a legitimate version of HxD
Targets: Windows PE.
It defines 7 patterns (4 text, 3 hex, 0 regex). YARA modules used: pe.
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
rule SIGNATURE_BASE_SUSP_Hxd_Icon_Anomaly_May23_1 : FILE
{
meta:
= "Detects suspicious use of the the free hex editor HxD's icon in PE files that don't seem to be a legitimate version of HxD"
= "Florian Roth"
= "3ac8cc92-6d76-5787-ada0-cfb6eabb4b20"
= "2023-05-29"
= "2023-12-05"
= "https://www.linkedin.com/feed/update/urn:li:activity:7068631930040188929/?utm_source=share&utm_medium=member_ios"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/gen_file_anomalies.yar#L32-L84"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "a328687ac8b868fb78a49188b286a8951c6043a7ff6ff0c7a23c3f9b3ef15eb2"
= 65
= 85
= "FILE"
strings:
$ac1 = { 99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80
99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80
99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80
99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80
99 00 77 0D DD 09 99 80 99 00 77 0D D0 99 98 09
99 99 00 0D D0 99 98 09 99 99 00 0D D0 99 98 09
99 99 00 0D D0 99 98 0F F9 99 00 0D D0 99 98 09
9F 99 00 0D D0 99 98 09 FF 99 00 0D D0 99 98 09
FF 99 00 0D D0 99 98 09 99 99 00 0D D0 99 98 0F
F9 99 00 0D D0 99 98 09 99 99 00 0D 09 99 80 9F
F9 99 99 00 09 99 80 99 F9 99 99 00 09 99 80 FF }
$ac2 = { FF FF FF FF FF FF FF FF FF FF FF FF FF FF B9 DE
FA 68 B8 F4 39 A2 F1 39 A2 F1 39 A2 F1 39 A2 F1
39 A2 F1 39 A2 F1 68 B8 F4 B9 DE FA FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF }
$s1 = { 00 4D 00 61 00 EB 00 6C 00 20 00 48 00 F6 00 72 00 7A }
$s2 = "mh-nexus.de" ascii wide
$upx1 = "UPX0" ascii fullword
$xs1 = "terminator" ascii wide fullword
$xs2 = "Terminator" ascii wide fullword
condition:
uint16( 0 ) == 0x5a4d and 1 of ( $ac* ) and ( not 1 of ( $s* ) or filesize > 6930000 or ( pe.is_32bit ( ) and filesize < 1540000 and not $upx1 ) or ( pe.is_32bit ( ) and filesize < 590000 and $upx1 ) or ( pe.is_64bit ( ) and filesize < 6670000 and not $upx1 ) or ( pe.is_64bit ( ) and filesize < 1300000 and $upx1 ) or 1 of ( $xs* ) )
}
Strings (7 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ac1 | hex | { 99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80 99 00 77 0D DD 09 99 80 99 00 77 … | |
| $ac2 | hex | { FF FF FF FF FF FF FF FF FF FF FF FF FF FF B9 DE FA 68 B8 F4 39 A2 F1 39 A2 F1 39 A2 F1 39 A2 F1 39 A2 F1 39 A2 F1 68 B8 F4 B9 DE … | |
| $s1 | hex | { 00 4D 00 61 00 EB 00 6C 00 20 00 48 00 F6 00 72 00 7A } | |
| $s2 | text | "mh-nexus.de" | ascii wide |
| $upx1 | text | "UPX0" | ascii fullword |
| $xs1 | text | "terminator" | ascii wide fullword |
| $xs2 | text | "Terminator" | ascii wide fullword |
Condition
uint16( 0 ) == 0x5a4d and 1 of ( $ac* ) and ( not 1 of ( $s* ) or filesize > 6930000 or ( pe.is_32bit ( ) and filesize < 1540000 and not $upx1 ) or ( pe.is_32bit ( ) and filesize < 590000 and $upx1 ) or ( pe.is_64bit ( ) and filesize < 6670000 and not $upx1 ) or ( pe.is_64bit ( ) and filesize < 1300000 and $upx1 ) or 1 of ( $xs* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 1540000 (a cheap guard that skips large files).
- The file must be smaller than 590000 (a cheap guard that skips large files).
- The file must be smaller than 6670000 (a cheap guard that skips large files).
- The file must be smaller than 1300000 (a cheap guard that skips large files).
- The file must be larger than 6930000.
- At least 1 patterns in ( $ac* ) must match.
- At least 1 patterns in ( $s* ) must match.
- At least 1 patterns in ( $xs* ) must match.
- Pattern $upx1 must NOT be present.
- Uses the pe module.
- Pattern $upx1 must be present.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Licence & attribution
Author: Florian Roth
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: 3ac8cc92-6d76-5787-ada0-cfb6eabb4b20
Tags:FILE
Related rules
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-02-23
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-02-23
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-10-25
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-02-23
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-08-04
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-02-23
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2025-08-07
- Suspicious / huntingSignature Base (Florian Roth / Nextron)· Florian Roth· 2025-02-14