This hunt targets adversaries deploying the specific Chinese hacktool CmdShell64.exe to establish persistent command-and-control channels or execute reconnaissance tasks within the environment. Proactively searching for this artifact in Azure Sentinel is critical because its presence often indicates early-stage lateral movement by threat actors utilizing regional tooling that may evade standard signature-based detections due to its low severity classification.
rule CmdShell64 {
meta:
description = "Chinese Hacktool Set - file CmdShell64.exe"
author = "Florian Roth"
reference = "http://tools.zjqhr.com/"
date = "2015-06-13"
hash = "5b92510475d95ae5e7cd6ec4c89852e8af34acf1"
strings:
$s1 = "C:\\Windows\\System32\\JAVASYS.EXE" fullword wide
$s2 = "ServiceCmdShell" fullword ascii
$s3 = "<!-- If your application is designed to work with Windows 8.1, uncomment the fol" ascii
$s4 = "ServiceSystemShell" fullword wide
$s5 = "[Root@CmdShell ~]#" fullword wide
$s6 = "Hello Man 2015 !" fullword wide
$s7 = "CmdShell" fullword ascii
condition:
uint16(0) == 0x5a4d and filesize < 30KB and 4 of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 7 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the Chinese Hacktool Set - file CmdShell64.exe detection rule in an enterprise environment, along with suggested filters or exclusions:
Scenario: Deployment of Microsoft Endpoint Configuration Manager (MECM/SCCM) Updates
CmdShell64.exe process is frequently spawned by the ccmexec.exe service to handle these tasks on Windows 10/11 endpoints.CmdShell64.exe when its parent process is ccmexec.exe (Microsoft Endpoint Configuration Manager) and the execution path resides within the standard SCCM installation directory (e.g., C:\Program Files\Microsoft Intune Management Extension\).Scenario: Execution of Third-Party Patch Management Tools (e.g., Ivanti or ManageEngine)
CmdShell64.exe as a child of its primary service engine (e.g., IvantiAgent.exe or MEPSService.exe).IvantiAgent.exe, MEPSService.exe) and the file hash of CmdShell64.exe matches a known, approved baseline hash stored in your asset inventory.Scenario: Scheduled Administrative Maintenance Jobs via Windows Task Scheduler