Detect Audio Capture in CrowdStrike LogScale
Adversaries may leverage a computer's peripheral devices (e.g., microphones) or applications (e.g., voice and video call services) to capture audio recordings for the purpose of listening into sensitive conversations. Malware or scripts interact with audio devices through OS APIs or application APIs to capture and record audio. Recorded files may be written to disk in staging directories and subsequently exfiltrated. Known malware families using this technique include Flame, ROKRAT, Bandook, VERMIN, TajMahal, Pupy, EvilGrab, LightSpy, Cadelspy, NanoCore, Crimson, MacMa, T9000, and Machete. PowerSploit's Get-MicrophoneAudio module provides an open-source implementation commonly repurposed by attackers.
MITRE ATT&CK
- Tactic
- Collection
- Technique
- T1123 Audio Capture
- Canonical reference
- https://attack.mitre.org/techniques/T1123/
LogScale Detection Query
// T1123 Audio Capture - CrowdStrike Falcon LogScale (CQL)
// Detect audio DLL loads, staged audio files, and audio capture tool usage
#event_simpleName = /^(ClassifiedModuleLoad|PeFileWritten|ProcessRollup2)$/
| case {
// Branch 1: Suspicious audio DLL loaded by non-whitelisted process
#event_simpleName = "ClassifiedModuleLoad"
| regex("(?i)(\\\\|\/)winmm\.dll$|audioses\.dll$|avrt\.dll$|dsound\.dll$|mfplat\.dll$", field=ModulePath, strict=false)
| !regex("(?i)(audiodg|svchost|wmplayer|groove|teams|ms-teams|zoom|zoomwebviewhost|skype|skypehost|discord|slack|webex|chrome|msedge|firefox|iexplore|opera|spotify|vlc|mpv|SoundRecorder|RuntimeBroker|ShellExperienceHost|explorer)\.exe$", field=ImageFileName)
| !regex("(?i)\\\\(Program Files|Program Files \\(x86\\)|Windows\\\\System32|Windows\\\\SysWOW64)\\\\", field=ImageFileName)
| DetectionType := "SuspiciousAudioDllLoad"
| AffectedArtifact := ModulePath ;
// Branch 2: Audio file written to suspicious staging directory
#event_simpleName = "PeFileWritten"
| regex("(?i)\\.(wav|mp3|wma|ogg|flac|aac|m4a|raw)$", field=TargetFileName, strict=false)
| regex("(?i)(AppData.+Temp|AppData.+Roaming|Users.+Public|ProgramData|Windows.+Temp|Windows.+Tasks|Recycle)", field=TargetFileName, strict=false)
| !regex("(?i)(audiodg|wmplayer|groove|teams|ms-teams|zoom|skype|discord|slack|webex|chrome|msedge|firefox|spotify|vlc|SoundRecorder)\.exe$", field=ImageFileName)
| DetectionType := "AudioFileStagedInSuspiciousPath"
| AffectedArtifact := TargetFileName ;
// Branch 3: Process launched with audio capture tool or API keywords
#event_simpleName = "ProcessRollup2"
| regex("(?i)(Get-MicrophoneAudio|WaveInEvent|WaveFileWriter|NAudio|mciSendString|waveInOpen|AudioCapture|MicCapture|-f dshow|audio=|avfoundation|WindowsAudioDevice|CoreAudio|AVAudioRecorder)", field=CommandLine, strict=false)
| DetectionType := "AudioCaptureToolUsage"
| AffectedArtifact := CommandLine ;
// Drop unmatched events
* | drop([])
}
| table([timestamp, ComputerName, UserName, DetectionType, ImageFileName, CommandLine, AffectedArtifact, ModulePath])
| sort(timestamp, order=desc) CrowdStrike Falcon LogScale (CQL) detection covering T1123 Audio Capture across three Falcon telemetry event types: ClassifiedModuleLoad for suspicious audio subsystem DLL loads (winmm.dll, audioses.dll, avrt.dll, dsound.dll, mfplat.dll) by processes outside the legitimate audio application allowlist; PeFileWritten for audio-format files written to malware staging directories commonly used for collection before exfiltration; and ProcessRollup2 for process executions with command-line arguments referencing audio capture APIs, PowerSploit modules (Get-MicrophoneAudio), NAudio, or multimedia frameworks like ffmpeg dshow and AVAudioRecorder.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate media creation tools (OBS Studio, Streamlabs, XSplit) installed outside Program Files in per-user directories that load dsound.dll or mfplat.dll during startup
- Game anti-cheat or overlay software that hooks DirectSound (dsound.dll) to enforce audio policy and runs from non-standard paths under a game title's directory
- Automated voice quality monitoring agents used by enterprise call centers that record sample audio to ProgramData or Windows Temp as part of diagnostics workflows
- Red team or penetration testing engagements using PowerSploit's Get-MicrophoneAudio or ffmpeg with dshow input on hosts explicitly included in an authorized testing scope
Other platforms for T1123
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 1PowerSploit Get-MicrophoneAudio — 5 Second Capture
Expected signal: Sysmon Event ID 1: PowerShell process creation with Get-MicrophoneAudio and IEX in command line. Sysmon Event ID 7: winmm.dll or audioses.dll loaded by powershell.exe. Sysmon Event ID 11: df00tech-audio-test.wav created in %TEMP%. Sysmon Event ID 3: outbound network connection to raw.githubusercontent.com. PowerShell ScriptBlock Log Event ID 4104 with full script content including Get-MicrophoneAudio function body.
- Test 2FFmpeg DirectShow Audio Capture — Windows
Expected signal: Sysmon Event ID 1: ffmpeg.exe process creation with '-f dshow' and 'audio=' in command line. Sysmon Event ID 7: winmm.dll and avrt.dll loaded by ffmpeg.exe (if not in Program Files). Sysmon Event ID 11: df00tech-capture.wav created in C:\ProgramData\. The command line '-f dshow' combined with audio= string is a specific IoC for FFmpeg audio capture.
- Test 3Windows mciSendString Audio Capture via PowerShell Add-Type
Expected signal: Sysmon Event ID 1: PowerShell process creation with mciSendString keyword in command line. Sysmon Event ID 7: winmm.dll loaded by powershell.exe (DllImport of winmm.dll triggers the load). Sysmon Event ID 11: df00tech-mci.wav created in %APPDATA%. PowerShell ScriptBlock Log Event ID 4104 with full P/Invoke code including mciSendString string.
- Test 4Linux arecord ALSA Microphone Capture
Expected signal: Linux auditd EXECVE record: arecord process creation with '-d 10' and '/tmp/df00tech-audio-test.wav' arguments. Linux auditd OPEN/CREATE syscall records for /tmp/df00tech-audio-test.wav. Syslog entry from auditd showing arecord execution. If using Sysmon for Linux: Sysmon Event ID 1 (Process Create) with Image=/usr/bin/arecord.
References (11)
- https://attack.mitre.org/techniques/T1123/
- https://www.welivesecurity.com/wp-content/uploads/2019/10/ESET_Attor.pdf
- https://securelist.com/scarcruft-surveils-north-korean-defectors-and-mps/91101/
- https://www.paloaltonetworks.com/content/dam/pan/en_US/assets/pdf/reports/Unit_42/unit42-t9000-advanced-modular-backdoor-uses-complex-anti-analysis-techniques.pdf
- https://github.com/PowerShellMafia/PowerSploit/blob/master/Exfiltration/Get-MicrophoneAudio.ps1
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1123/T1123.md
- https://objective-see.org/blog/blog_0x69.html
- https://www.objective-see.com/blog/blog_0x7C.html
- https://www.huntress.com/blog/lightspy-for-macos
- https://learn.microsoft.com/en-us/windows/win32/multimedia/mci-command-strings
- https://learn.microsoft.com/en-us/windows/win32/coreaudio/wasapi
Unlock Pro Content
Get the full detection package for T1123 including response playbook, investigation guide, and atomic red team tests.