This hunt targets adversaries deploying the specific “MSSqlPass.exe” tool from the Chinese Hacktool set to establish persistence or conduct reconnaissance within SQL environments. Proactively hunting for this artifact in Azure Sentinel is critical because its presence often indicates early-stage lateral movement by state-sponsored actors that may evade standard signature-based detection due to its low severity classification.
rule MSSqlPass {
meta:
description = "Chinese Hacktool Set - file MSSqlPass.exe"
author = "Florian Roth"
reference = "http://tools.zjqhr.com/"
date = "2015-06-13"
hash = "172b4e31ed15d1275ac07f3acbf499daf9a055d7"
strings:
$s0 = "Reveals the passwords stored in the Registry by Enterprise Manager of SQL Server" wide
$s1 = "empv.exe" fullword wide
$s2 = "Enterprise Manager PassView" fullword wide
condition:
uint16(0) == 0x5a4d and filesize < 120KB and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Chinese Hacktool Set - file MSSqlPass.exe detection rule, including suggested filters and exclusions:
Scenario: Legitimate SQL Server Maintenance via Third-Party Backup Tools
MSSqlPass.exe during scheduled nightly maintenance windows to handle password rotation, service restarts, or connection string validation for the MSSQL service.MSSqlPass.exe is spawned by known backup agents (e.g., VeeamAgent.exe, SimAgent.exe) and verify that the file hash matches the vendor-signed version.Scenario: Automated Password Rotation Scripts for Service Accounts
NT SERVICE\MSSQLSERVER). These scripts may invoke a utility binary named MSSqlPass.exe located in a standard system directory (such as C:\Program Files\Microsoft SQL Server\MSSQLXX.MSSQLSERVER\Binn) to securely update the password configuration without manual intervention.C:\Program Files\Microsoft SQL Server\*) and the User Account belongs to a dedicated service group (e.g., DOMAIN\SVC_SQL_AutoMaint or SYSTEM).Scenario: Deployment of Chinese-Specific ERP Modules