Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Strifewater

Detects StrifeWater RAT

MalwareStrifewaterditekSHen 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

Detects StrifeWater RAT

Associated malware family: Strifewater.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-strifewater.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Strifewater : FILE
{
	meta:
		description = "Detects StrifeWater RAT"
		author = "ditekSHen"
		id = "69f0bd07-3e4e-5245-9c42-c3f8199b566e"
		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#L9329-L9354"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "ddb189dfe58af08d2c0682239551a5b9d82db94eedcefc02895316bcbbaca3f2"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "example/1.0" fullword wide
		$s2 = "coname:" fullword ascii
		$s3 = "*elev:" fullword ascii
		$s4 = "*uname:" fullword ascii
		$s5 = "--BoundrySign" ascii
		$s6 = "000000c:\\users\\public\\libraries\\tmp.bi" ascii
		$s7 = "9c4arSBr32g6IOni" fullword ascii
		$pdb = "\\win8\\Desktop\\ishdar_win8\\" ascii
		$xn1 = "techzenspace.com" fullword wide
		$xn2 = "87.120.8.210" wide
		$xn3 = "192.168.40.27" wide
		$n1 = /RVP\/index\d+\.php/ fullword wide
		$n2 = "tid=%d&code=%s&fname=%s&apiData=%s" fullword ascii
		$n3 = "code=%s&tid=%d&fname=%s&apiData=%s" fullword ascii
		$n4 = "Content-Disposition: form-data; name=\"token\"" fullword ascii
		$n5 = "Content-Disposition: form-data; name=\"apiData\"" fullword ascii
		$n6 = "Content-Disposition: form-data; name=\"data\"; filename=\"" fullword ascii
		$n7 = "Content-Disposition: form-data; name=\"tid\"" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( 2 of ( $xn* ) or 6 of ( $s* ) or 6 of ( $n* ) or ( 1 of ( $xn* ) and 4 of them ) or ( $pdb and 4 of them ) or ( 3 of ( $s* ) and 3 of ( $n* ) ) )
}

Strings (18 patterns)

IdentifierTypeValueModifiers
$s1text"example/1.0"fullword wide
$s2text"coname:"fullword ascii
$s3text"*elev:"fullword ascii
$s4text"*uname:"fullword ascii
$s5text"--BoundrySign"ascii
$s6text"000000c:\\users\\public\\libraries\\tmp.bi"ascii
$s7text"9c4arSBr32g6IOni"fullword ascii
$pdbtext"\\win8\\Desktop\\ishdar_win8\\"ascii
$xn1text"techzenspace.com"fullword wide
$xn2text"87.120.8.210"wide
$xn3text"192.168.40.27"wide
$n1regex/RVP\/index\d+\.php/fullword wide
$n2text"tid=%d&code=%s&fname=%s&apiData=%s"fullword ascii
$n3text"code=%s&tid=%d&fname=%s&apiData=%s"fullword ascii
$n4text"Content-Disposition: form-data; name=\"token\""fullword ascii
$n5text"Content-Disposition: form-data; name=\"apiData\""fullword ascii
$n6text"Content-Disposition: form-data; name=\"data\"; filename=\""fullword ascii
$n7text"Content-Disposition: form-data; name=\"tid\""fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( 2 of ( $xn* ) or 6 of ( $s* ) or 6 of ( $n* ) or ( 1 of ( $xn* ) and 4 of them ) or ( $pdb and 4 of them ) or ( 3 of ( $s* ) and 3 of ( $n* ) ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 2 patterns in ( $xn* ) must match.
  • At least 6 patterns in ( $s* ) must match.
  • At least 6 patterns in ( $n* ) must match.
  • At least 1 patterns in ( $xn* ) must match.
  • At least 4 patterns in the rule must match.
  • At least 3 patterns in ( $s* ) must match.
  • At least 3 patterns in ( $n* ) 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: 69f0bd07-3e4e-5245-9c42-c3f8199b566e

Tags:FILE