← Back to SOC feed Coverage →

CN Port Scanner

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-31T11:00:00Z · Confidence: medium

Hunt Hypothesis

This detection rule identifies adversaries actively performing network reconnaissance by scanning ports to map potential attack surfaces and identify vulnerable services within the Azure environment. Proactively hunting for this behavior allows the SOC team to detect early-stage intrusion attempts before attackers can leverage discovered entry points for lateral movement or exploitation.

YARA Rule

rule CN_Portscan : APT
{
    meta:
        description = "CN Port Scanner"
        author = "Florian Roth"
        release_date = "2013-11-29"
        confidential = false
		score = 70
    strings:
    	$s1 = "MZ"
		$s2 = "TCP 12.12.12.12"
    condition:
        ($s1 at 0) and $s2
}

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 5 specific false positive scenarios for the CN Port Scanner detection rule, including suggested filters and exclusions tailored for an enterprise environment:

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