← Back to SOC feed Coverage →

Disclosed hacktool set (old stuff) - file cmd.cgi

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

Hunt Hypothesis

This hunt hypothesis targets adversaries deploying legacy command-line tools via cmd.cgi files to establish persistence or execute reconnaissance tasks within Azure Sentinel environments. Proactive hunting is essential because these older hacktool artifacts often lack modern security signatures, making them prime vectors for stealthy lateral movement and data exfiltration that standard automated detections might overlook.

YARA Rule

rule perlcmd_zip_Folder_cmd {
	meta:
		description = "Disclosed hacktool set (old stuff) - file cmd.cgi"
		author = "Florian Roth"
		date = "23.11.14"
		score = 60
		hash = "21b5dc36e72be5aca5969e221abfbbdd54053dd8"
	strings:
		$s0 = "syswrite(STDOUT, \"Content-type: text/html\\r\\n\\r\\n\", 27);" fullword ascii
		$s1 = "s/%20/ /ig;" fullword ascii
		$s2 = "syswrite(STDOUT, \"\\r\\n</PRE></HTML>\\r\\n\", 17);" fullword ascii
		$s4 = "open(STDERR, \">&STDOUT\") || die \"Can't redirect STDERR\";" fullword ascii
		$s5 = "$_ = $ENV{QUERY_STRING};" fullword ascii
		$s6 = "$execthis = $_;" fullword ascii
		$s7 = "system($execthis);" fullword ascii
		$s12 = "s/%2f/\\//ig;" fullword ascii
	condition:
		6 of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 10 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the Disclosed hacktool set (old stuff) - file cmd.cgi detection rule, along with suggested filters and exclusions:

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