Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_SCN_Nbtscan

Detects NBTScan scanner for open NETBIOS nameservers on a local or remote TCP/IP network

Suspicious / huntingditekSHen detectionBSD 2-Clause LicenseCompiles with YARA-X
Author
ditekSHen
Date
2020-11-06
Modified
2024-09-25
Score / Quality
75 / 75

What this rule detects

Detects NBTScan scanner for open NETBIOS nameservers on a local or remote TCP/IP network

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-scn-nbtscan.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_SCN_Nbtscan : FILE
{
	meta:
		description = "Detects NBTScan scanner for open NETBIOS nameservers on a local or remote TCP/IP network"
		author = "ditekSHen"
		id = "663c324e-4784-5efe-bbdf-60fa42e13944"
		date = "2020-11-06"
		modified = "2024-09-25"
		reference = "https://github.com/ditekshen/detection"
		source_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/indicator_tools.yar#L402-L420"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "a81b95ad60aac4d66586ae7dc61f6bcbe2b7185b66b2bb895f45abff3ad3f430"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "[%s] is an invalid target (bad IP/hostname)" fullword ascii
		$s2 = "ERROR: no parse for %s -- %s" fullword ascii
		$s3 = "add_target failed" fullword ascii
		$s4 = "   -p <n>    bind to UDP Port <n> (default=%d)" fullword ascii
		$s5 = "process_response.c" fullword ascii
		$s6 = "currTarget != 0" fullword ascii
		$s7 = "parse_target.c" fullword ascii
		$s8 = "dump_packet.c" fullword ascii
		$s9 = "parse_target_cb.c" fullword ascii
		$s10 = "DUMP OF PACKET" fullword ascii
		$s11 = "lookup_hostname.c" fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and 10 of ( $s* )
}

Strings (11 patterns)

IdentifierTypeValueModifiers
$s1text"[%s] is an invalid target (bad IP/hostname)"fullword ascii
$s2text"ERROR: no parse for %s -- %s"fullword ascii
$s3text"add_target failed"fullword ascii
$s4text" -p <n> bind to UDP Port <n> (default=%d)"fullword ascii
$s5text"process_response.c"fullword ascii
$s6text"currTarget != 0"fullword ascii
$s7text"parse_target.c"fullword ascii
$s8text"dump_packet.c"fullword ascii
$s9text"parse_target_cb.c"fullword ascii
$s10text"DUMP OF PACKET"fullword ascii
$s11text"lookup_hostname.c"fullword ascii

Condition

uint16( 0 ) == 0x5a4d and 10 of ( $s* )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • At least 10 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: 663c324e-4784-5efe-bbdf-60fa42e13944

Tags:FILE