YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_CHUWI_Seth
First sighting on 2020-01-05 didn't include ransomware artificats. Second sighting on 2020-01-24 with several correlations between the two samples now include ransomware artifacts.
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 73
What this rule detects
First sighting on 2020-01-05 didn't include ransomware artificats. Second sighting on 2020-01-24 with several correlations between the two samples now include ransomware artifacts.
Associated malware family: CHUWI.
Targets: Windows PE.
It defines 30 patterns (30 text, 0 hex, 0 regex).
YARA-X says: warning[duplicate_pattern_value]: duplicate pattern value
Summary generated from the rule's metadata and condition.
Rule source
rule DITEKSHEN_MALWARE_Win_CHUWI_Seth : FILE
{
meta:
= "First sighting on 2020-01-05 didn't include ransomware artificats. Second sighting on 2020-01-24 with several correlations between the two samples now include ransomware artifacts."
= "ditekSHen"
= "62af3cd3-59c3-580b-9d66-71fd4acfaf17"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L3754-L3801"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "e6e3f5e9af093268667f67fec2176a943b35721e9f220804e176c6b5a3bb24e1"
= 75
= 73
= "FILE"
= "920103-920105"
= "920101-920103"
strings:
$cmd1 = "shell_command" fullword ascii
$cmd2 = "check_command" fullword ascii
$cmd3 = "down_exec" fullword ascii
$cmd4 = "open_link" fullword ascii
$cmd5 = "down_exec" fullword ascii
$cmd6 = "exe_link" fullword ascii
$cmd7 = "shellCommand" fullword ascii
$cmd8 = "R_CMMAND" fullword ascii
$cnc1 = "/check_command.php?HWID=" ascii
$cnc2 = "&act=get_command" ascii
$cnc3 = "/get_command.php?hwid=" ascii
$cnc4 = "&command=down_exec" ascii
$cnc5 = "&command=message" ascii
$cnc6 = "&command=open_link" ascii
$cnc7 = "&command=down_exec" ascii
$cnc8 = "&command=shell" ascii
$pdb = "\\Users\\CHUWI\\Documents\\CPROJ\\Downloader\\svchost" ascii
$rcnc1 = "inc/check_command.php" ascii
$rcnc2 = "inc/get_command.php" ascii
$rcnc3 = "php?btc" ascii
$rcnc4 = "php?hwid" ascii
$x1 = "> %USERPROFILE%\\Desktop\\HOW_DECRYPT_FILES.seth.txt" ascii
$x2 = "/C dir /b %USERPROFILE%\\Documents > %temp%\\doc.txt" ascii
$x3 = "/C dir /b %USERPROFILE%\\Desktop > %temp%\\desk.txt" ascii
$x4 = "/C dir /b %USERPROFILE%\\Downloads > %temp%\\downs.txt" ascii
$x5 = "/C dir /b %USERPROFILE%\\Pictures > %temp%\\pics.txt" ascii
$x6 = "for /F \"delims=\" %%a in ('mshta.exe \"%~F0\"') do set \"HTA=%%a\"" ascii
$x7 = "\\svchost.exe" fullword ascii
$x8 = ".seth" fullword ascii
$x9 = "MyAgent" fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( $pdb or 5 of ( $cmd* ) or 4 of ( $cnc* ) or all of ( $rcnc* ) or 5 of ( $x* ) or 8 of them )
}
Strings (30 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $cmd1 | text | "shell_command" | fullword ascii |
| $cmd2 | text | "check_command" | fullword ascii |
| $cmd3 | text | "down_exec" | fullword ascii |
| $cmd4 | text | "open_link" | fullword ascii |
| $cmd5 | text | "down_exec" | fullword ascii |
| $cmd6 | text | "exe_link" | fullword ascii |
| $cmd7 | text | "shellCommand" | fullword ascii |
| $cmd8 | text | "R_CMMAND" | fullword ascii |
| $cnc1 | text | "/check_command.php?HWID=" | ascii |
| $cnc2 | text | "&act=get_command" | ascii |
| $cnc3 | text | "/get_command.php?hwid=" | ascii |
| $cnc4 | text | "&command=down_exec" | ascii |
| $cnc5 | text | "&command=message" | ascii |
| $cnc6 | text | "&command=open_link" | ascii |
| $cnc7 | text | "&command=down_exec" | ascii |
| $cnc8 | text | "&command=shell" | ascii |
| $pdb | text | "\\Users\\CHUWI\\Documents\\CPROJ\\Downloader\\svchost" | ascii |
| $rcnc1 | text | "inc/check_command.php" | ascii |
| $rcnc2 | text | "inc/get_command.php" | ascii |
| $rcnc3 | text | "php?btc" | ascii |
| $rcnc4 | text | "php?hwid" | ascii |
| $x1 | text | "> %USERPROFILE%\\Desktop\\HOW_DECRYPT_FILES.seth.txt" | ascii |
| $x2 | text | "/C dir /b %USERPROFILE%\\Documents > %temp%\\doc.txt" | ascii |
| $x3 | text | "/C dir /b %USERPROFILE%\\Desktop > %temp%\\desk.txt" | ascii |
| $x4 | text | "/C dir /b %USERPROFILE%\\Downloads > %temp%\\downs.txt" | ascii |
| $x5 | text | "/C dir /b %USERPROFILE%\\Pictures > %temp%\\pics.txt" | ascii |
| $x6 | text | "for /F \"delims=\" %%a in ('mshta.exe \"%~F0\"') do set \"HTA=%%a\"" | ascii |
| $x7 | text | "\\svchost.exe" | fullword ascii |
| $x8 | text | ".seth" | fullword ascii |
| $x9 | text | "MyAgent" | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( $pdb or 5 of ( $cmd* ) or 4 of ( $cnc* ) or all of ( $rcnc* ) or 5 of ( $x* ) or 8 of them )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $rcnc* ) must match.
- At least 5 patterns in ( $cmd* ) must match.
- At least 4 patterns in ( $cnc* ) must match.
- At least 5 patterns in ( $x* ) must match.
- At least 8 patterns in the rule must match.
- Pattern $pdb 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.
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: 62af3cd3-59c3-580b-9d66-71fd4acfaf17
Metadata
| snort2_sid | 920103-920105 |
|---|---|
| snort3_sid | 920101-920103 |
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