Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_APT_MAL_CN_Wocao_Xserver_Csharp

Strings from the CSharp version of XServer

APT / threat actorSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Fox-IT SRT
Date
2019-12-20
Modified
2023-12-05
Score / Quality
75 / 85

What this rule detects

Strings from the CSharp version of XServer

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

Summary generated from the rule's metadata and condition.

Rule source

apt-mal-cn-wocao-xserver-csharp.yarDetection Rule License 1.1
rule SIGNATURE_BASE_APT_MAL_CN_Wocao_Xserver_Csharp
{
	meta:
		description = "Strings from the CSharp version of XServer"
		author = "Fox-IT SRT"
		id = "48f4c88d-fb56-54ca-84e2-38f88804a50f"
		date = "2019-12-20"
		modified = "2023-12-05"
		reference = "https://www.fox-it.com/en/news/whitepapers/operation-wocao-shining-a-light-on-one-of-chinas-hidden-hacking-groups/"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/apt_op_wocao.yar#L123-L141"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "1201ee45df78cf3aec4b4bbb59cb7e4a70af6928895bb7c968ef02075a963405"
		score = 75
		quality = 85
		tags = ""

	strings:
		$a = "static void ServerX(int ListenPort)" ascii wide
		$b = "public class xserver" ascii wide
		$c = "[xserver]::Main($args);" ascii wide
		$d = "add rule name=powershell dir=in localport=47000 action=allow" ascii wide
		$e = "string TempFile = file_path + \".CT\";" ascii wide
		$f = "Port = 256 * RecvBuf[AddrLen + 5] + RecvBuf[AddrLen + 6];"
		$g = "CliSock.Send(new byte[] { 0x05, 0x00 });"

	condition:
		1 of them
}

Strings (7 patterns)

IdentifierTypeValueModifiers
$atext"static void ServerX(int ListenPort)"ascii wide
$btext"public class xserver"ascii wide
$ctext"[xserver]::Main($args);"ascii wide
$dtext"add rule name=powershell dir=in localport=47000 action=allow"ascii wide
$etext"string TempFile = file_path + \".CT\";"ascii wide
$ftext"Port = 256 * RecvBuf[AddrLen + 5] + RecvBuf[AddrLen + 6];"
$gtext"CliSock.Send(new byte[] { 0x05, 0x00 });"

Condition

1 of them

In plain words (Heuristic)

  • At least 1 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: Fox-IT SRT

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: 48f4c88d-fb56-54ca-84e2-38f88804a50f