YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_R77
Detects r77 rootkit
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects r77 rootkit
Associated malware family: R77.
Targets: Windows PE.
It defines 8 patterns (8 text, 0 hex, 0 regex). YARA modules used: pe.
YARA-X says: warning[deprecated_field]: field `number_of_sections` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
rule DITEKSHEN_MALWARE_Win_R77 : FILE
{
meta:
= "Detects r77 rootkit"
= "ditekSHen"
= "813d207e-c6d9-5fea-8387-19da33bc3317"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L11192-L11217"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "e3ec6e88a3a77b7dc69eb51a528e6417f6b8695c7cb01d699cf248cebd9b84e2"
= 75
= 75
= "FILE"
strings:
$s1 = "startup" fullword wide
$s2 = "process_names" fullword wide
$s3 = "paths" fullword wide
$s4 = "service_names" fullword wide
$s5 = "tcp_local" fullword wide
$s6 = "tcp_remote" fullword wide
$s7 = "\\\\.\\pipe\\" wide
$s8 = "SOFTWARE\\" wide
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or ( 5 of them and pe.exports ( "ReflectiveDllMain" ) ) or ( 5 of them and for any i in ( 0 .. pe.number_of_sections ) : ( ( pe.sections [ i ] . name == ".detourd" ) ) ) )
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "startup" | fullword wide |
| $s2 | text | "process_names" | fullword wide |
| $s3 | text | "paths" | fullword wide |
| $s4 | text | "service_names" | fullword wide |
| $s5 | text | "tcp_local" | fullword wide |
| $s6 | text | "tcp_remote" | fullword wide |
| $s7 | text | "\\\\.\\pipe\\" | wide |
| $s8 | text | "SOFTWARE\\" | wide |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or ( 5 of them and pe.exports ( "ReflectiveDllMain" ) ) or ( 5 of them and for any i in ( 0 .. pe.number_of_sections ) : ( ( pe.sections [ i ] . name == ".detourd" ) ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $s* ) must match.
- At least 5 patterns in the rule must match.
- A for-loop checks a property over several matches or items.
- Uses the pe module.
- Checks exported functions or the DLL name.
- Checks PE sections (names, count or properties).
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
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: 813d207e-c6d9-5fea-8387-19da33bc3317
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- 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