YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Actionrat
Detects ActionRAT, CSharp and Delfi variants
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 71
What this rule detects
Detects ActionRAT, CSharp and Delfi variants
Associated malware family: Action Rat.
Targets: Windows PE.
It defines 26 patterns (23 text, 0 hex, 3 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-actionrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Actionrat : FILE
{
meta:
= "Detects ActionRAT, CSharp and Delfi variants"
= "ditekSHen"
= "ceb4bd65-85c0-5614-a7cb-8f3f2f849eae"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6922-L6955"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "1552cda3f02c08582e3dd97df98416635a25005081627097df181bfc6aac4665"
= 75
= 71
= "FILE"
strings:
$x1 = /<action>(connect|command|drives|getfiles|upload|execute|download)<action>/ fullword wide
$x2 = "aHR0cDovLzE0NC45MS42NS4xMDAv" wide
$x3 = "aHR0cDovL21mYWhvc3QuZGRucy5uZXQv" wide
$f1 = "<updateCommand>b__" ascii
$f2 = "<getDrives>b__" ascii
$f3 = "<getStatus>b__" ascii
$f4 = "<getDirectories>b__" ascii
$f5 = "<updateUpload>b__" ascii
$f6 = "<infinity>b__" ascii
$f7 = "<uploadFile>b__" ascii
$s1 = "beaconURL" ascii
$s2 = "PingReply" ascii
$s3 = "updateUpload" ascii
$s4 = "updateCommand" ascii
$s5 = "runCommand" ascii
$s6 = "uploadFile" ascii
$s7 = "SELECT * FROM MSFT_NetAdapter WHERE ConnectorPresent = True AND DeviceID = '{0}'" fullword wide
$s8 = "SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion" fullword wide
$s9 = "Mozilla/3.0" fullword wide
$s10 = "|directory|N/A|" fullword wide
$s11 = "cmd.exe /c" fullword wide
$c1 = /Content-Disposition: form-data; name=(hostname|hid|id|action|secondary)/ fullword wide
$c2 = /(classification|updatecs|update|beacon)\.php/ wide
$c3 = "Content-Disposition: form-data;name=\"{0}\";filename=\"{1}\"filepath=\"{2}\"" fullword wide
$pdb1 = "D:\\Projects\\C#\\HTTP-Simple\\WindowsMediaPlayer - HTTP - " ascii
$pdb2 = "\\WindowsMediaPlayer10\\obj\\x86\\Release\\winow4.pdb" ascii
condition:
uint16( 0 ) == 0x5a4d and ( #x1 > 5 or ( all of ( $f* ) and ( 1 of ( $s* ) or 2 of ( $c* ) ) ) or 7 of ( $s* ) or all of ( $c* ) or ( all of ( $pdb* ) and 4 of them ) or ( 2 of ( $x* ) and 5 of them ) )
}
Strings (26 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | regex | /<action>(connect|command|drives|getfiles|upload|execute|download)<action>/ | fullword wide |
| $x2 | text | "aHR0cDovLzE0NC45MS42NS4xMDAv" | wide |
| $x3 | text | "aHR0cDovL21mYWhvc3QuZGRucy5uZXQv" | wide |
| $f1 | text | "<updateCommand>b__" | ascii |
| $f2 | text | "<getDrives>b__" | ascii |
| $f3 | text | "<getStatus>b__" | ascii |
| $f4 | text | "<getDirectories>b__" | ascii |
| $f5 | text | "<updateUpload>b__" | ascii |
| $f6 | text | "<infinity>b__" | ascii |
| $f7 | text | "<uploadFile>b__" | ascii |
| $s1 | text | "beaconURL" | ascii |
| $s2 | text | "PingReply" | ascii |
| $s3 | text | "updateUpload" | ascii |
| $s4 | text | "updateCommand" | ascii |
| $s5 | text | "runCommand" | ascii |
| $s6 | text | "uploadFile" | ascii |
| $s7 | text | "SELECT * FROM MSFT_NetAdapter WHERE ConnectorPresent = True AND DeviceID = '{0}'" | fullword wide |
| $s8 | text | "SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion" | fullword wide |
| $s9 | text | "Mozilla/3.0" | fullword wide |
| $s10 | text | "|directory|N/A|" | fullword wide |
| $s11 | text | "cmd.exe /c" | fullword wide |
| $c1 | regex | /Content-Disposition: form-data; name=(hostname|hid|id|action|secondary)/ | fullword wide |
| $c2 | regex | /(classification|updatecs|update|beacon)\.php/ | wide |
| $c3 | text | "Content-Disposition: form-data;name=\"{0}\";filename=\"{1}\"filepath=\"{2}\"" | fullword wide |
| $pdb1 | text | "D:\\Projects\\C#\\HTTP-Simple\\WindowsMediaPlayer - HTTP - " | ascii |
| $pdb2 | text | "\\WindowsMediaPlayer10\\obj\\x86\\Release\\winow4.pdb" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( #x1 > 5 or ( all of ( $f* ) and ( 1 of ( $s* ) or 2 of ( $c* ) ) ) or 7 of ( $s* ) or all of ( $c* ) or ( all of ( $pdb* ) and 4 of them ) or ( 2 of ( $x* ) and 5 of them ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $f* ) must match.
- All patterns in ( $c* ) must match.
- All patterns in ( $pdb* ) must match.
- At least 1 patterns in ( $s* ) must match.
- At least 2 patterns in ( $c* ) must match.
- At least 7 patterns in ( $s* ) must match.
- At least 4 patterns in the rule must match.
- At least 2 patterns in ( $x* ) must match.
- At least 5 patterns in the rule must match.
- Pattern $x1 must occur > 5 times.
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: ceb4bd65-85c0-5614-a7cb-8f3f2f849eae
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- APT / threat actorSEKOIA.IO Community· Sekoia.io· 2023-05-11
- 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