← Back to SOC feed Coverage →

Detects a Powershell version of the Netcat network hacking tool

yara HIGH Yara-Rules
communitypowershell
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-27T23:00:00Z · Confidence: medium

Hunt Hypothesis

This detection identifies adversaries leveraging PowerShell-based Netcat implementations to establish covert command-and-control channels or facilitate lateral movement within the network. Proactive hunting for this behavior in Azure Sentinel is critical because attackers often utilize these lightweight tools to bypass traditional security controls and exfiltrate sensitive data without triggering standard network alerts.

YARA Rule

rule Powershell_Netcat {
	meta:
		description = "Detects a Powershell version of the Netcat network hacking tool"
		author = "Florian Roth"
		score = 60
		date = "10.10.2014"
	strings:
		$s0 = "[ValidateRange(1, 65535)]" fullword
		$s1 = "$Client = New-Object -TypeName System.Net.Sockets.TcpClient" fullword
		$s2 = "$Buffer = New-Object -TypeName System.Byte[] -ArgumentList $Client.ReceiveBufferSize" fullword
	condition:
		all of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 5 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the “Detects a Powershell version of the Netcat network hacking tool” rule, including suggested filters and exclusions:

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