YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Deeprats
Detects DeepRats (
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 73
What this rule detects
Detects DeepRats (
Associated malware family: Deeprats.
Targets: Windows PE.
It defines 22 patterns (22 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_MALWARE_Win_Deeprats : FILE
{
meta:
= "Detects DeepRats ("
= "ditekSHen"
= "5b774e24-3864-519f-9cfd-d729d7d567a0"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L7188-L7218"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "1f8b7e1b14869d119c5de1f05330094899bd997fca4c322d852db85cbd9271e6"
= "511264c0b6932f90069a5206cd142ca7210b0bc40c51ef5aa9c41a161fb57aab"
= 75
= 73
= "FILE"
strings:
$s1 = "https://freegeoip.live/json/https://myexternalip.com/rawin" ascii
$s2 = "github.com/cretz/bine" ascii
$s3 = "github.com/kbinani/screenshot" ascii
$s4 = "socks5://%s:%d" ascii
$s5 = "socks5://%s:%s@%s:%d" ascii
$s6 = "http://%s:%d" ascii
$s7 = "http://%s@%s:%d" ascii
$s8 = "%SystemRoot%\\system32\\--CookieAuthentication" ascii
$s9 = "tor_addr_" ascii
$f1 = ".GetVnc" ascii
$f2 = ".GetCommand" ascii
$f3 = ".GetPayload" ascii
$f4 = ".ListenCommands" ascii
$f5 = ".ReceiveFile" ascii
$f6 = ".RegisterImplant" ascii
$f7 = ".Screenshot" ascii
$f8 = ".SendFile" ascii
$f9 = ".StartShell" ascii
$f10 = ".UnregisterImplant" ascii
$f11 = ".VncInstalled" ascii
$f12 = ".PingPong" ascii
$f13 = ".ListenCMD" ascii
condition:
uint16( 0 ) == 0x5a4d and ( 7 of ( $s* ) or 8 of ( $f* ) )
}
Strings (22 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "https://freegeoip.live/json/https://myexternalip.com/rawin" | ascii |
| $s2 | text | "github.com/cretz/bine" | ascii |
| $s3 | text | "github.com/kbinani/screenshot" | ascii |
| $s4 | text | "socks5://%s:%d" | ascii |
| $s5 | text | "socks5://%s:%s@%s:%d" | ascii |
| $s6 | text | "http://%s:%d" | ascii |
| $s7 | text | "http://%s@%s:%d" | ascii |
| $s8 | text | "%SystemRoot%\\system32\\--CookieAuthentication" | ascii |
| $s9 | text | "tor_addr_" | ascii |
| $f1 | text | ".GetVnc" | ascii |
| $f2 | text | ".GetCommand" | ascii |
| $f3 | text | ".GetPayload" | ascii |
| $f4 | text | ".ListenCommands" | ascii |
| $f5 | text | ".ReceiveFile" | ascii |
| $f6 | text | ".RegisterImplant" | ascii |
| $f7 | text | ".Screenshot" | ascii |
| $f8 | text | ".SendFile" | ascii |
| $f9 | text | ".StartShell" | ascii |
| $f10 | text | ".UnregisterImplant" | ascii |
| $f11 | text | ".VncInstalled" | ascii |
| $f12 | text | ".PingPong" | ascii |
| $f13 | text | ".ListenCMD" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 7 of ( $s* ) or 8 of ( $f* ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 7 patterns in ( $s* ) must match.
- At least 8 patterns in ( $f* ) 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.
References
Sample hashes
Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).
- 1f8b7e1b14869d119c5de1f05330094899bd997fca4c322d852db85cbd9271e6
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: 5b774e24-3864-519f-9cfd-d729d7d567a0
Tags:FILE
Related rules
- 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
- MalwareditekSHen detection· ditekSHen· 2020-11-06