The SLServer mutex detection identifies potential adversary activity related to process injection or persistence by leveraging mutexes for communication or coordination between malicious components. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect early-stage malware or advanced persistent threats that use mutexes as part of their C2 or lateral movement strategies.
YARA Rule
rule SLServer_mutex
{
meta:
author = "Matt Brooks, @cmatthewbrooks"
desc = "Searches for the mutex."
ref = "https://citizenlab.org/2016/04/between-hong-kong-and-burma/"
strings:
$mutex = "M&GX^DSF&DA@F"
condition:
//MZ header //PE signature
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and $mutex
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: Scheduled Maintenance Task
Description: A system administrator runs a maintenance script that creates a mutex named SLServer_mutex as part of a routine system check or update.
Filter/Exclusion: process.name != "maintenance_script.exe" or process.parent.name != "task scheduler"
Scenario: Antivirus or Security Software Scan
Description: A legitimate antivirus or endpoint protection tool creates a mutex named SLServer_mutex during a full system scan to prevent multiple instances of the scanner from running.
Filter/Exclusion: process.name contains "antivirus" or process.name contains "endpoint"
Scenario: Database Backup Job
Description: A scheduled database backup job (e.g., using SQL Server Backup Utility) creates a mutex to ensure only one backup process runs at a time.
Filter/Exclusion: process.name contains "sqlbackup.exe" or process.name contains "sqlservr.exe"
Scenario: Application Initialization During Boot
Description: A legitimate enterprise application (e.g., Microsoft SQL Server) initializes a mutex named SLServer_mutex during system startup to manage service initialization.
Filter/Exclusion: process.name contains "sqlservr.exe" or process.parent.name contains "smss.exe"
Scenario: Custom Script for Locking Resources
Description: A custom script or application (e.g., written in Python or PowerShell) uses a mutex named SLServer_mutex to synchronize access to shared resources across multiple instances.
Filter/Exclusion: process.name contains "python.exe" or process.name contains "powershell.exe" and process.parent.name contains "schtasks.exe"