Skip to content

YARA · ditekSHen detection

DITEKSHEN_INDICATOR_TOOL_SCN_Smbtouch

Detects SMBTouch scanner EternalBlue, EternalChampion, EternalRomance, EternalSynergy

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 SMBTouch scanner EternalBlue, EternalChampion, EternalRomance, EternalSynergy

Targets: Windows PE.

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

Summary generated from the rule's metadata and condition.

Rule source

indicator-tool-scn-smbtouch.yarBSD 2-Clause License
rule DITEKSHEN_INDICATOR_TOOL_SCN_Smbtouch : FILE
{
	meta:
		description = "Detects SMBTouch scanner EternalBlue, EternalChampion, EternalRomance, EternalSynergy"
		author = "ditekSHen"
		id = "4e8176dd-4113-5fa8-a695-77e7169f6975"
		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#L376-L400"
		license_url = "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
		logic_hash = "78c2a435762d3febe927eb15910d5a18c1ffe74604673463543d3c859f5ef8e9"
		score = 75
		quality = 75
		tags = "FILE"

	strings:
		$s1 = "[+] SMB Touch started" fullword ascii
		$s2 = "[-] Could not connect to share (0x%08X - %s)" fullword ascii
		$s3 = "[!] Target could be either SP%d or SP%d," fullword ascii
		$s4 = "[!] for these SMB exploits they are equivalent" fullword ascii
		$s5 = "[+] Target is vulnerable to %d exploit%s" fullword ascii
		$s6 = "[+] Touch completed successfully" fullword ascii
		$s7 = "Network error while determining exploitability" fullword ascii
		$s8 = "Named pipe or share required for exploit" fullword ascii
		$w1 = "UsingNbt" fullword ascii
		$w2 = "TargetPort" fullword ascii
		$w3 = "TargetIp" fullword ascii
		$w4 = "RedirectedTargetPort" fullword ascii
		$w5 = "RedirectedTargetIp" fullword ascii
		$w6 = "NtlmHash" fullword ascii
		$w7 = "\\PIPE\\LANMAN" fullword ascii
		$w8 = "UserRejected: " fullword ascii

	condition:
		uint16( 0 ) == 0x5a4d and ( 2 of ( $s* ) or all of ( $w* ) )
}

Strings (16 patterns)

IdentifierTypeValueModifiers
$s1text"[+] SMB Touch started"fullword ascii
$s2text"[-] Could not connect to share (0x%08X - %s)"fullword ascii
$s3text"[!] Target could be either SP%d or SP%d,"fullword ascii
$s4text"[!] for these SMB exploits they are equivalent"fullword ascii
$s5text"[+] Target is vulnerable to %d exploit%s"fullword ascii
$s6text"[+] Touch completed successfully"fullword ascii
$s7text"Network error while determining exploitability"fullword ascii
$s8text"Named pipe or share required for exploit"fullword ascii
$w1text"UsingNbt"fullword ascii
$w2text"TargetPort"fullword ascii
$w3text"TargetIp"fullword ascii
$w4text"RedirectedTargetPort"fullword ascii
$w5text"RedirectedTargetIp"fullword ascii
$w6text"NtlmHash"fullword ascii
$w7text"\\PIPE\\LANMAN"fullword ascii
$w8text"UserRejected: "fullword ascii

Condition

uint16( 0 ) == 0x5a4d and ( 2 of ( $s* ) or all of ( $w* ) )

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in ( $w* ) must match.
  • At least 2 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: 4e8176dd-4113-5fa8-a695-77e7169f6975

Tags:FILE