Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Apt_Kimsuky_Sharptongue_C2_Source

Detects the PHP code of the SharpTongue C2

APT / threat actorKimsukySEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X
Author
Sekoia.io
Date
2022-07-29
Modified
2024-12-19
Score / Quality
75 / 80

What this rule detects

Detects the PHP code of the SharpTongue C2

Associated malware family: Kimsuky.

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

Summary generated from the rule's metadata and condition.

Rule source

apt-kimsuky-sharptongue-c2-source.yarDetection Rule License 1.1
rule SEKOIA_Apt_Kimsuky_Sharptongue_C2_Source
{
	meta:
		description = "Detects the PHP code of the SharpTongue C2"
		author = "Sekoia.io"
		id = "a2ccf773-511c-4088-8bcf-b923291d024b"
		date = "2022-07-29"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/apt_kimsuky_sharptongue_c2_source.yar#L1-L18"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "c301a99876cfe2863546c990654aa922f9327e0eb010968eaea43f1d8ced76da"
		score = 75
		quality = 80
		tags = ""
		version = "1.0"
		classification = "TLP:CLEAR"

	strings:
		$ = "<?php"
		$ = "foreach($_GET as $variable => $value)"
		$ = "$chk=$value"
		$ = "base64_encode($ip)"

	condition:
		all of them
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$text"<?php"
$text"foreach($_GET as $variable => $value)"
$text"$chk=$value"
$text"base64_encode($ip)"

Condition

all of them

In plain words (Heuristic)

  • All patterns in the rule 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: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

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: a2ccf773-511c-4088-8bcf-b923291d024b

Metadata

version1.0
classificationTLP:CLEAR

More Kimsuky rules