← Back to SOC feed Coverage →

Disclosed hacktool set - file Clear.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-29T11:00:00Z · Confidence: medium

Hunt Hypothesis

This detection identifies adversaries deploying a batch script named “Clear.bat” as part of their hacktool execution phase to establish persistence or execute initial command-and-control routines within Azure Sentinel environments. Proactive hunting for this specific artifact is critical because such scripts often serve as the first stage in an attack chain, enabling threat actors to clear logs, download additional payloads, or manipulate system configurations before escalating privileges.

YARA Rule

rule Hacktools_CN_Burst_Clear {
	meta:
		description = "Disclosed hacktool set - file Clear.bat"
		author = "Florian Roth"
		date = "17.11.14"
		score = 60
		hash = "148c574a4e6e661aeadaf3a4c9eafa92a00b68e4"
	strings:
		$s0 = "del /f /s /q %systemdrive%\\*.log    " fullword ascii
		$s1 = "del /f /s /q %windir%\\*.bak    " fullword ascii
		$s4 = "del /f /s /q %systemdrive%\\*.chk    " fullword ascii
		$s5 = "del /f /s /q %systemdrive%\\*.tmp    " fullword ascii
		$s8 = "del /f /q %userprofile%\\COOKIES s\\*.*    " fullword ascii
		$s9 = "rd /s /q %windir%\\temp & md %windir%\\temp    " fullword ascii
		$s11 = "del /f /s /q %systemdrive%\\recycled\\*.*    " fullword ascii
		$s12 = "del /f /s /q \"%userprofile%\\Local Settings\\Temp\\*.*\"    " fullword ascii
		$s19 = "del /f /s /q \"%userprofile%\\Local Settings\\Temporary Internet Files\\*.*\"   " ascii
	condition:
		5 of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 9 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the Disclosed hacktool set - file Clear.bat detection rule, including targeted filters and exclusions:

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