Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Turian

Hunt for Turian / Qurian

MalwareTurianditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-11-01
Score / Quality
75 / 75

What this rule detects

Hunt for Turian / Qurian

Associated malware family: Turian.

Targets: Windows PE.

It defines 18 patterns (18 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

malware-win-turian.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Turian : FILE
{
	meta:
		description = "Hunt for Turian / Qurian"
		author = "ditekSHen"
		id = "eafa9442-a01b-5044-bc47-634297a3efcc"
		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#L6315-L6343"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		hash = "d1218ab9d608ee0212e880204e4d7d75f29f03b77248bca7648d111d67405759"
		logic_hash = "87f4263381c5e93fcba0873aa3bb9a1db4b21225141cd7f06be30f5777a47806"
		score = 75
		quality = 75
		tags = "FILE"
		cnc_domain = "windowsupdate[.]dyndns[.]info"
		cnc_ip = "58[.]158[.]177[.]102"

	strings:
		$s1 = "%s a -m5 -hp1qaz@WSX3edc -r %s %s\\*.*" ascii wide
		$s2 = "%s a -m5 -hpMyHost-1 -r %s %s\\*.*" ascii wide
		$s3 = "%s a -m5 -hp1qaz@WSX3edc -ta%04d%02d%02d000000 -r %s c:" ascii wide
		$s4 = "%s a -m5 -hpMyHost-1 -ta%04d%02d%02d000000 -r %s c:"
		$s5 = "cmd /c dir /s /O:D %s>>\"%s\"" ascii wide
		$s6 = "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v %s /t REG_SZ /d \"%s\" /f" fullword ascii
		$s7 = "Not Connect!" fullword ascii
		$p1 = "RECYCLER\\S-1-3-33-854245398-2067806209-0000980848-2003\\" ascii wide
		$p2 = "%sRECYCLER.{S-1-3-33-854245398-2067806209-0000980848-2003}\\" ascii wide
		$p3 = "\\RECYCLER.{S-1-3-33-854245398-2067806209-0000980848-2003}\\" ascii wide
		$p4 = "\\RECYCLER.{645ff040-5081-101b-9f08-00aa002f954e}\\" ascii wide
		$p5 = "%sRECYCLER.{645ff040-5081-101b-9f08-00aa002f954e}\\" ascii wide
		$c1 = "CONNECT %s:%u HTTP/1." ascii wide
		$c2 = "User-Agent: Mozilla/4.0" ascii wide
		$m1 = "winsupdatetw" fullword ascii wide
		$m2 = "clientsix" fullword ascii wide
		$m3 = "updatethres" fullword ascii wide
		$m4 = "uwatchdaemon" fullword ascii wide

	condition:
		uint16( 0 ) == 0x5a4d and ( 3 of ( $s* ) or ( all of ( $c* ) and ( 2 of ( $s* ) or 1 of ( $m* ) or 1 of ( $p* ) ) ) or ( 1 of ( $m* ) and 1 of ( $s* ) and ( 1 of ( $c* ) or 1 of ( $p* ) ) ) )
}

Strings (18 patterns)

IdentifierTypeValueModifiers
$s1text"%s a -m5 -hp1qaz@WSX3edc -r %s %s\\*.*"ascii wide
$s2text"%s a -m5 -hpMyHost-1 -r %s %s\\*.*"ascii wide
$s3text"%s a -m5 -hp1qaz@WSX3edc -ta%04d%02d%02d000000 -r %s c:"ascii wide
$s4text"%s a -m5 -hpMyHost-1 -ta%04d%02d%02d000000 -r %s c:"
$s5text"cmd /c dir /s /O:D %s>>\"%s\""ascii wide
$s6text"\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v %s /t REG_SZ /d \"%s\" /f"fullword ascii
$s7text"Not Connect!"fullword ascii
$p1text"RECYCLER\\S-1-3-33-854245398-2067806209-0000980848-2003\\"ascii wide
$p2text"%sRECYCLER.{S-1-3-33-854245398-2067806209-0000980848-2003}\\"ascii wide
$p3text"\\RECYCLER.{S-1-3-33-854245398-2067806209-0000980848-2003}\\"ascii wide
$p4text"\\RECYCLER.{645ff040-5081-101b-9f08-00aa002f954e}\\"ascii wide
$p5text"%sRECYCLER.{645ff040-5081-101b-9f08-00aa002f954e}\\"ascii wide
$c1text"CONNECT %s:%u HTTP/1."ascii wide
$c2text"User-Agent: Mozilla/4.0"ascii wide
$m1text"winsupdatetw"fullword ascii wide
$m2text"clientsix"fullword ascii wide
$m3text"updatethres"fullword ascii wide
$m4text"uwatchdaemon"fullword ascii wide

Condition

uint16( 0 ) == 0x5a4d and ( 3 of ( $s* ) or ( all of ( $c* ) and ( 2 of ( $s* ) or 1 of ( $m* ) or 1 of ( $p* ) ) ) or ( 1 of ( $m* ) and 1 of ( $s* ) and ( 1 of ( $c* ) or 1 of ( $p* ) ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $c* ) must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 2 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $m* ) must match.
  • At least 1 patterns in ( $p* ) must match.
  • At least 1 patterns in ( $s* ) must match.
  • At least 1 patterns in ( $c* ) 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.

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

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • d1218ab9d608ee0212e880204e4d7d75f29f03b77248bca7648d111d67405759

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: eafa9442-a01b-5044-bc47-634297a3efcc

Metadata

cnc_domainwindowsupdate[.]dyndns[.]info
cnc_ip58[.]158[.]177[.]102

Tags:FILE