Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_APT_KE3CHANG_TMPFILE

Detects Strings left in TMP Files created by K3CHANG Backdoor Ketrican

APT / threat actorKetricanSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Markus Neis, Swisscom
Date
2020-06-18
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Detects Strings left in TMP Files created by K3CHANG Backdoor Ketrican

Associated malware family: Ketrican.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-ke3chang-tmpfile.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_KE3CHANG_TMPFILE : APT KE3CHANG TMPFILE FILE
{
	meta:
		description = "Detects Strings left in TMP Files created by K3CHANG Backdoor Ketrican"
		author = "Markus Neis, Swisscom"
		id = "84d411af-ea3d-5862-8c2f-7caca60c1b66"
		date = "2020-06-18"
		modified = "2023-12-05"
		reference = "https://app.any.run/tasks/a96f4f9d-c27d-490b-b5d3-e3be0a1c93e9/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_ke3chang.yar#L1-L21"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "4ef11e84d5203c0c425d1a76d4bf579883d40577c2e781cdccc2cc4c8a8d346f"
		logic_hash = "75c97fe2eeb82e09f52e98d76bd529824f171da4c802b5febc1036314d8145f0"
		score = 75
		quality = 85
		tags = "APT, KE3CHANG, TMPFILE, FILE"

	strings:
		$pps1 = "PSParentPath             : Microsoft.PowerShell.Core\\Registry::HKEY_CURRENT_USE" fullword ascii
		$pps2 = "PSPath                   : Microsoft.PowerShell.Core\\Registry::HKEY_CURRENT_USE" fullword ascii
		$psp1 = ": Microsoft.PowerShell.Core\\Registry" ascii
		$s4 = "PSChildName  : PhishingFilter" fullword ascii
		$s1 = "DisableFirstRunCustomize : 2" fullword ascii
		$s7 = "PSChildName  : 3" fullword ascii
		$s8 = "2500         : 3" fullword ascii

	condition:
		uint16( 0 ) == 0x5350 and filesize < 1KB and $psp1 and 1 of ( $pps* ) and 1 of ( $s* )
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$pps1text"PSParentPath : Microsoft.PowerShell.Core\\Registry::HKEY_CURRENT_USE"fullword ascii
$pps2text"PSPath : Microsoft.PowerShell.Core\\Registry::HKEY_CURRENT_USE"fullword ascii
$psp1text": Microsoft.PowerShell.Core\\Registry"ascii
$s4text"PSChildName : PhishingFilter"fullword ascii
$s1text"DisableFirstRunCustomize : 2"fullword ascii
$s7text"PSChildName : 3"fullword ascii
$s8text"2500 : 3"fullword ascii

Condition

uint16( 0 ) == 0x5350 and filesize < 1KB and $psp1 and 1 of ( $pps* ) and 1 of ( $s* )

In plain words (Heuristic)

  • The file must be smaller than 1KB (a cheap guard that skips large files).
  • At least 1 patterns in ( $pps* ) must match.
  • At least 1 patterns in ( $s* ) must match.
  • Pattern $psp1 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

Sample hashes

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

  • 4ef11e84d5203c0c425d1a76d4bf579883d40577c2e781cdccc2cc4c8a8d346f

Licence & attribution

Author: Markus Neis, Swisscom

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 84d411af-ea3d-5862-8c2f-7caca60c1b66

Tags:APTKE3CHANGTMPFILEFILE

More Ketrican rules