Detect Mutual Exclusion in CrowdStrike LogScale
Adversaries may constrain execution or actions based on the presence of a mutex associated with malware. A mutex is a locking mechanism used to synchronize access to a resource — only one thread or process can hold a given mutex at a time. By creating a uniquely named system mutex at startup, malware checks whether a prior instance is already running: if the mutex already exists, the new instance silently exits, preventing duplicate infections that could increase analyst visibility. Mutex names may be hard-coded strings (Embargo ransomware uses "LoadUpOnGunsBringYourFriends"; SUNSPOT uses a GUID string; Gazer uses "{531511FA-190D-5D85-8A4A-279F2F592CC7}"), machine-derived (LockBit 3.0 hashes the host MachineGUID value), or computed from the binary itself (GrimAgent uses the last 64 bytes of its PE file). In Linux environments, malware such as BPFDoor acquires an exclusive file lock on a runtime file — typically in /var/run/ — achieving the same single-instance effect without Windows API calls. Mutex-based execution guardrails indicate operational maturity: they reduce noise from redundant infections and help adversaries maintain stealth during long-dwell campaigns.
MITRE ATT&CK
- Tactic
- Defense Evasion
- Technique
- T1480 Execution Guardrails
- Sub-technique
- T1480.002 Mutual Exclusion
- Canonical reference
- https://attack.mitre.org/techniques/T1480/002/
LogScale Detection Query
// Branch 1: Known malware mutex names via CrowdStrike SyncMutexCreate kernel telemetry
// Covers Embargo ransomware, GrimAgent, SUNSPOT, Gazer backdoor (Turla)
#event_simpleName = SyncMutexCreate
| MutexName = /(?i)(LoadUpOnGunsBringYourFriends|mymutex|\{12d61a41-4b74-7610-a4d8-3028d2f56395\}|\{531511FA-190D-5D85-8A4A-279F2F592CC7\}|I_am_an_unique_mutex|Global\\TermService_alive|Global\\MS_HIDDENCLK_R)/
| eval(SuspicionScore=3, DetectionBranch="KnownMalwareMutex")
| table([@timestamp, ComputerName, UserName, FileName, FilePath, CommandLine, MutexName, ParentBaseFileName, SuspicionScore, DetectionBranch])
// Branch 2: GUID-format or hex-padded Global mutex from user-writable or suspicious process path
#event_simpleName = SyncMutexCreate
| MutexName = /^\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\}$|^Global\\[0-9A-Fa-f]{32}$/
| FilePath = /(?i)(\\AppData\\Roaming\\|\\AppData\\Local\\Temp\\|\\Users\\Public\\|\\ProgramData\\|\\Windows\\Temp\\|\\Recycle)/
| FileName != /(?i)^(svchost|services|lsass|MsMpEng|SenseIR|msiexec|TiWorker|TrustedInstaller)\.exe$/
| eval(SuspicionScore=2, DetectionBranch="PatternMutexSuspiciousPath")
| table([@timestamp, ComputerName, UserName, FileName, FilePath, CommandLine, MutexName, ParentBaseFileName, SuspicionScore, DetectionBranch])
// Branch 3: Linux lock file creation in /var/run/ or /var/lock/ by non-system process
// Covers BPFDoor (/var/run/initd.lock) and RedXOR file-lock single-instance pattern
#event_simpleName = FileCreate
| TargetFileName = /^\/var\/(run|lock)\/.+\.(lock|pid|run)$/
| FilePath != /^(\/usr\/sbin\/|\/usr\/bin\/|\/usr\/lib\/|\/lib\/systemd\/|\/sbin\/|\/bin\/)/
| FileName != /^(systemd|init|chronyd|sshd|crond|cron|rsyslogd|dbus-daemon|NetworkManager|nginx|apache2|httpd|mysqld|postgres|postfix|auditd|dockerd|containerd|kubelet)$/
| eval(SuspicionScore=2, DetectionBranch="LinuxFileLockMutex")
| table([@timestamp, ComputerName, UserName, FileName, FilePath, CommandLine, TargetFileName, SuspicionScore, DetectionBranch]) Three CrowdStrike LogScale CQL queries covering T1480.002 via Falcon sensor kernel telemetry. Branch 1 uses SyncMutexCreate events to match known malware mutex strings with score 3 (immediate escalation): Embargo ransomware 'LoadUpOnGunsBringYourFriends', GrimAgent 'mymutex', SUNSPOT GUID, and Gazer GUID. Branch 2 detects GUID-format or hex-padded Global\ mutexes (LockBit 3.0 MachineGUID hash pattern) from processes running in AppData, Temp, ProgramData, or Recycle paths, excluding trusted system processes — score 2. Branch 3 targets the Linux equivalent via FileCreate events: .lock/.pid/.run file creation in /var/run/ or /var/lock/ by processes whose FilePath does not match standard system binary directories (BPFDoor and RedXOR pattern). Requires Falcon Insight XDR or Falcon Prevent with kernel mutex telemetry enabled; SyncMutexCreate events are available on Falcon Insight.
Data Sources
Required Tables
False Positives & Tuning
- Software license enforcement tools (Flexera FlexNet, Thales Sentinel) that use GUID-based mutexes for concurrent-use license control, frequently running installer components from AppData staging directories — add software deployment process names and signed binary hashes to Branch 2 exclusion list
- Development toolchains (Visual Studio, PyCharm, Gradle build daemons) that create GUID-format mutex objects when spawning background compiler or indexer processes from project directories under AppData — verify by checking ParentBaseFileName and CommandLine context; add IDE process names to Branch 2 FileName exclusion
- Linux applications packaged via Snap or AppImage that create PID files in /var/run/ but execute from /snap/bin/, /var/lib/flatpak/, or /tmp/appimage-* paths — these will fire Branch 3 since those paths are not in the system binary exclusion; build a Falcon Fusion workflow to auto-suppress based on code-signed AppImage metadata or snap package name
Other platforms for T1480.002
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Windows Named Mutex Creation with Known Malware Name (Embargo)
Expected signal: DeviceEvents with ActionType containing 'Mutex' (if MDE ETW enabled): AdditionalFields will include MutexName='Global\LoadUpOnGunsBringYourFriends', InitiatingProcessFileName='powershell.exe'. Windows Security 4663 with ObjectType='Mutant', ObjectName containing 'LoadUpOnGunsBringYourFriends' (if Kernel Object auditing enabled). Sysmon Event ID 1: Process Create for powershell.exe with the mutex name visible in CommandLine.
- Test 2Windows GUID-Format Mutex from Temp Path (SUNSPOT-Style)
Expected signal: DeviceEvents (MDE): ActionType containing 'Mutex', MutexName='{12d61a41-4b74-7610-a4d8-3028d2f56395}'. Windows Security 4663: ObjectType='Mutant', ObjectName='{12d61a41-4b74-7610-a4d8-3028d2f56395}'. Sysmon EID 1: powershell.exe process create with GUID in CommandLine.
- Test 3Windows Machine-Derived Mutex Name (LockBit 3.0 Pattern)
Expected signal: Sysmon EID 1: PowerShell process create with registry access to HKLM\SOFTWARE\Microsoft\Cryptography visible in ScriptBlock log (EID 4104). DeviceEvents: Mutex creation with Global\<32-char hex string> pattern. DeviceRegistryEvents: HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid read access by powershell.exe.
- Test 4Linux File-Based Mutex via flock() — BPFDoor Pattern
Expected signal: Linux auditd (if syscall auditing enabled): flock() syscall by python3 on /tmp/df00tech-initd.lock with LOCK_EX|LOCK_NB flags. File creation event for /tmp/df00tech-initd.lock by python3 process. /proc/locks shows FLOCK WRITE lock held by python3 PID. MDE DeviceFileEvents: FileCreated action for *.lock file by python3 from non-standard path.
References (10)
- https://attack.mitre.org/techniques/T1480/002/
- https://learn.microsoft.com/en-us/dotnet/standard/threading/mutexes
- https://www.deepinstinct.com/blog/bpfdoor-malware-evolves-stealthy-sniffing-backdoor-ups-its-game
- https://intezer.com/blog/malware-analysis/new-linux-backdoor-redxor-likely-operated-by-chinese-nation-state-actor/
- https://www.sans.org/blog/looking-at-mutex-objects-for-malware-discovery-indicators-of-compromise/
- https://isc.sans.edu/diary/How+Malware+Generates+Mutex+Names+to+Evade+Detection/19429/
- https://www.crowdstrike.com/blog/sunspot-malware-technical-analysis/
- https://blog.cyble.com/2024/05/27/embargo-ransomware-new-rust-based-ransomware-group-emerges/
- https://www.justice.gov/opa/pr/joint-cybersecurity-advisory-lockbit-30-ransomware
- https://learn.microsoft.com/en-us/sysinternals/downloads/handle
Unlock Pro Content
Get the full detection package for T1480.002 including response playbook, investigation guide, and atomic red team tests.