Skip to content

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.

MalwareCHUWIditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X (with warnings)
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

malware-win-chuwi-seth.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_CHUWI_Seth : FILE
{
	meta:
		description = "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"
		id = "62af3cd3-59c3-580b-9d66-71fd4acfaf17"
		date = "2020-11-06"
		modified = "2024-11-01"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L3754-L3801"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "e6e3f5e9af093268667f67fec2176a943b35721e9f220804e176c6b5a3bb24e1"
		score = 75
		quality = 73
		tags = "FILE"
		snort2_sid = "920103-920105"
		snort3_sid = "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)

IdentifierTypeValueModifiers
$cmd1text"shell_command"fullword ascii
$cmd2text"check_command"fullword ascii
$cmd3text"down_exec"fullword ascii
$cmd4text"open_link"fullword ascii
$cmd5text"down_exec"fullword ascii
$cmd6text"exe_link"fullword ascii
$cmd7text"shellCommand"fullword ascii
$cmd8text"R_CMMAND"fullword ascii
$cnc1text"/check_command.php?HWID="ascii
$cnc2text"&act=get_command"ascii
$cnc3text"/get_command.php?hwid="ascii
$cnc4text"&command=down_exec"ascii
$cnc5text"&command=message"ascii
$cnc6text"&command=open_link"ascii
$cnc7text"&command=down_exec"ascii
$cnc8text"&command=shell"ascii
$pdbtext"\\Users\\CHUWI\\Documents\\CPROJ\\Downloader\\svchost"ascii
$rcnc1text"inc/check_command.php"ascii
$rcnc2text"inc/get_command.php"ascii
$rcnc3text"php?btc"ascii
$rcnc4text"php?hwid"ascii
$x1text"> %USERPROFILE%\\Desktop\\HOW_DECRYPT_FILES.seth.txt"ascii
$x2text"/C dir /b %USERPROFILE%\\Documents > %temp%\\doc.txt"ascii
$x3text"/C dir /b %USERPROFILE%\\Desktop > %temp%\\desk.txt"ascii
$x4text"/C dir /b %USERPROFILE%\\Downloads > %temp%\\downs.txt"ascii
$x5text"/C dir /b %USERPROFILE%\\Pictures > %temp%\\pics.txt"ascii
$x6text"for /F \"delims=\" %%a in ('mshta.exe \"%~F0\"') do set \"HTA=%%a\""ascii
$x7text"\\svchost.exe"fullword ascii
$x8text".seth"fullword ascii
$x9text"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.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

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).

Original rule

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_sid920103-920105
snort3_sid920101-920103

Tags:FILE