← Back to SOC feed Coverage →

Detects a chinese Portscanner named MilkT - shipped BAT

yara HIGH Yara-Rules
community
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Yara-Rules →
Retrieved: 2026-07-28T11:00:01Z · Confidence: medium

Hunt Hypothesis

This rule detects the presence of the Chinese port scanner “MilkT,” which adversaries often deploy to map network topology and identify vulnerable services for subsequent exploitation. Proactively hunting for this activity in Azure Sentinel is critical because early identification of MilkT allows the SOC team to isolate reconnaissance efforts before they escalate into full-scale data exfiltration or lateral movement attacks.

YARA Rule

rule CN_Hacktool_MilkT_BAT {
	meta:
		description = "Detects a chinese Portscanner named MilkT - shipped BAT"
		author = "Florian Roth"
		score = 70
		date = "12.10.2014"
	strings:
		$s0 = "for /f \"eol=P tokens=1 delims= \" %%i in (s1.txt) do echo %%i>>s2.txt" ascii
		$s1 = "if not \"%Choice%\"==\"\" set Choice=%Choice:~0,1%" ascii
	condition:
		all of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 2 string patterns in its detection logic.

False Positive Guidance

Here are 3-5 specific false positive scenarios for the MilkT port scanner detection rule, including suggested filters and exclusions:

Original source: https://github.com/Yara-Rules/rules/blob/main/malware/TOOLKIT_THOR_HackTools.yar