Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_HKTL_Natbypass_Dec22_1

Detects NatBypass tool (also used by APT41)

Hack toolSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Florian Roth (Nextron Systems)
Date
2022-12-27
Modified
2023-12-05
Score / Quality
80 / 85

What this rule detects

Detects NatBypass tool (also used by APT41)

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

Summary generated from the rule's metadata and condition.

Rule source

hktl-natbypass-dec22-1.yarDetection Rule License 1.1
rule SIGNATURE_BASE_HKTL_Natbypass_Dec22_1 : T1090 FILE
{
	meta:
		description = "Detects NatBypass tool (also used by APT41)"
		author = "Florian Roth (Nextron Systems)"
		id = "54af4d84-72f7-5ec4-b0bf-7ba228fdf508"
		date = "2022-12-27"
		modified = "2023-12-05"
		reference = "https://github.com/cw1997/NATBypass"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/hktl_natbypass.yar#L2-L24"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "4550635143c9997d5499d1d4a4c860126ee9299311fed0f85df9bb304dca81ff"
		logic_hash = "8af76d7d9d4500dc219090fbd8ca8cd9fd17bfc224f14a411febfd6f75b92206"
		score = 80
		quality = 85
		tags = "T1090, FILE"

	strings:
		$x1 = "nb -slave 127.0.0.1:3389 8.8.8.8:1997" ascii
		$x2 = "| Welcome to use NATBypass Ver" ascii
		$s1 = "main.port2host.func1" ascii fullword
		$s2 = "start to transmit address:" ascii
		$s3 = "^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])"

	condition:
		filesize < 8000KB and ( 1 of ( $x* ) or 2 of them ) or 3 of them
}

Strings (5 patterns)

IdentifierTypeValueModifiers
$x1text"nb -slave 127.0.0.1:3389 8.8.8.8:1997"ascii
$x2text"| Welcome to use NATBypass Ver"ascii
$s1text"main.port2host.func1"ascii fullword
$s2text"start to transmit address:"ascii
$s3text"^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])"

Condition

filesize < 8000KB and ( 1 of ( $x* ) or 2 of them ) or 3 of them

In plain words (Heuristic)

  • The file must be smaller than 8000KB (a cheap guard that skips large files).
  • At least 1 patterns in ( $x* ) must match.
  • At least 2 patterns in the rule must match.
  • At least 3 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

MITRE ATT&CK

Sample hashes

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

  • 4550635143c9997d5499d1d4a4c860126ee9299311fed0f85df9bb304dca81ff

Licence & attribution

Author: Florian Roth (Nextron Systems)

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: 54af4d84-72f7-5ec4-b0bf-7ba228fdf508

Tags:T1090FILE