Skip to content

YARA · ditekSHen detection

DITEKSHEN_MALWARE_Win_Phorpiex

Detects Phorpiex variants

MalwarePhorpiexditekSHen 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 Phorpiex variants

Associated malware family: Phorpiex.

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

malware-win-phorpiex.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Phorpiex : FILE
{
	meta:
		description = "Detects Phorpiex variants"
		author = "ditekSHen"
		id = "e2d26c5f-939e-53e3-8730-622341d26273"
		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#L4647-L4666"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "4c48a20aaf37d65471710181238d2c39c1cb0fc5a37b9c411e8d4dcfd7a9e26e"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "ShEllExECutE=__\\DriveMgr.exe" fullword wide nocase
		$s2 = "/c start __ & __\\DriveMgr.exe & exit" fullword wide nocase
		$s3 = "%s\\autorun.inf" fullword wide
		$s4 = "svchost." wide
		$s5 = "%ls\\%d%d" wide
		$s6 = "bitcoincash:" ascii
		$s7 = "%ls:*:Enabled:%ls" fullword wide
		$s8 = "%s\\%s\\DriveMgr.exe" fullword wide
		$s9 = "api.wipmania.com" ascii
		$v1_1 = "%appdata%" fullword wide
		$v1_2 = "(iPhone;" ascii
		$v1_3 = "/tst.php" ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) or all of ( $v1* ) )
}

Strings (12 patterns)

IdentifierTypeValueModifiers
$s1text"ShEllExECutE=__\\DriveMgr.exe"fullword wide nocase
$s2text"/c start __ & __\\DriveMgr.exe & exit"fullword wide nocase
$s3text"%s\\autorun.inf"fullword wide
$s4text"svchost."wide
$s5text"%ls\\%d%d"wide
$s6text"bitcoincash:"ascii
$s7text"%ls:*:Enabled:%ls"fullword wide
$s8text"%s\\%s\\DriveMgr.exe"fullword wide
$s9text"api.wipmania.com"ascii
$v1_1text"%appdata%"fullword wide
$v1_2text"(iPhone;"ascii
$v1_3text"/tst.php"ascii

Condition

uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) or all of ( $v1* ) )

In plain words (Heuristic)

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

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: e2d26c5f-939e-53e3-8730-622341d26273

Tags:FILE