YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Actionrat
Detects ActionRAT, CSharp and Delfi variants
- Autor
- ditekSHen
- Fecha
- 2020-11-06
- Modificada
- 2024-11-01
- Puntuación / Calidad
- 75 / 71
Qué detecta esta regla
Detects ActionRAT, CSharp and Delfi variants
Familia de malware asociada: Action Rat.
Objetivos: PE de Windows.
Define 26 patrones (23 de texto, 0 hex, 3 regex).
Resumen generado a partir de los metadatos y la condición de la regla.
Código de la regla
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 ) )
}
Cadenas (26 patrones)
| Identificador | Tipo | Valor | Modificadores |
|---|---|---|---|
| $x1 | regex | /<action>(connect|command|drives|getfiles|upload|execute|download)<action>/ | fullword wide |
| $x2 | texto | "aHR0cDovLzE0NC45MS42NS4xMDAv" | wide |
| $x3 | texto | "aHR0cDovL21mYWhvc3QuZGRucy5uZXQv" | wide |
| $f1 | texto | "<updateCommand>b__" | ascii |
| $f2 | texto | "<getDrives>b__" | ascii |
| $f3 | texto | "<getStatus>b__" | ascii |
| $f4 | texto | "<getDirectories>b__" | ascii |
| $f5 | texto | "<updateUpload>b__" | ascii |
| $f6 | texto | "<infinity>b__" | ascii |
| $f7 | texto | "<uploadFile>b__" | ascii |
| $s1 | texto | "beaconURL" | ascii |
| $s2 | texto | "PingReply" | ascii |
| $s3 | texto | "updateUpload" | ascii |
| $s4 | texto | "updateCommand" | ascii |
| $s5 | texto | "runCommand" | ascii |
| $s6 | texto | "uploadFile" | ascii |
| $s7 | texto | "SELECT * FROM MSFT_NetAdapter WHERE ConnectorPresent = True AND DeviceID = '{0}'" | fullword wide |
| $s8 | texto | "SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion" | fullword wide |
| $s9 | texto | "Mozilla/3.0" | fullword wide |
| $s10 | texto | "|directory|N/A|" | fullword wide |
| $s11 | texto | "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 | texto | "Content-Disposition: form-data;name=\"{0}\";filename=\"{1}\"filepath=\"{2}\"" | fullword wide |
| $pdb1 | texto | "D:\\Projects\\C#\\HTTP-Simple\\WindowsMediaPlayer - HTTP - " | ascii |
| $pdb2 | texto | "\\WindowsMediaPlayer10\\obj\\x86\\Release\\winow4.pdb" | ascii |
Condición
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 ) )En palabras sencillas (Heurística)
- El archivo debe empezar por «MZ»: un ejecutable de Windows (PE).
- Deben coincidir todos los patrones de ( $f* ).
- Deben coincidir todos los patrones de ( $c* ).
- Deben coincidir todos los patrones de ( $pdb* ).
- Deben coincidir al menos 1 patrones de ( $s* ).
- Deben coincidir al menos 2 patrones de ( $c* ).
- Deben coincidir al menos 7 patrones de ( $s* ).
- Deben coincidir al menos 4 patrones de la regla.
- Deben coincidir al menos 2 patrones de ( $x* ).
- Deben coincidir al menos 5 patrones de la regla.
- El patrón $x1 debe aparecer > 5 veces.
Prueba esta regla en tu navegador
Arrastra un archivo para escanearlo con esta regla usando YARA-X compilado a WebAssembly. No se sube nada.
Referencias
Licencia y atribución
Autor: ditekSHen
Repositorio de origen: ditekSHen detection @ e76c93dcde
Licencia: BSD 2-Clause License (licencia del repositorio)
Aviso de copyright: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Obtenida a través de YARA Forge 20260927, que añade a los nombres el prefijo de la fuente y campos meta normalizados.
Id de la regla: ceb4bd65-85c0-5614-a7cb-8f3f2f849eae
Etiquetas:FILE
Reglas relacionadas
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- APT / 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