T1123 Splunk · SPL

Detect Audio Capture in Splunk

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/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (
  sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
  (EventCode=7 OR EventCode=11 OR EventCode=1)
)
| eval is_audio_dll_load=if(
    EventCode=7 AND (
      match(ImageLoaded, "(?i)\\\\winmm\.dll$") OR
      match(ImageLoaded, "(?i)\\\\audioses\.dll$") OR
      match(ImageLoaded, "(?i)\\\\avrt\.dll$") OR
      match(ImageLoaded, "(?i)\\\\dsound\.dll$") OR
      match(ImageLoaded, "(?i)\\\\mfplat\.dll$")
    ) AND NOT (
      match(Image, "(?i)(audiodg|svchost|wmplayer|groove|teams|ms-teams|zoom|skype|discord|slack|webex|chrome|msedge|firefox|iexplore|spotify|vlc|RuntimeBroker|ShellExperienceHost|explorer)\.exe$")
      OR match(Image, "(?i)\\\\(Program Files|Program Files \(x86\)|Windows\\System32|Windows\\SysWOW64)\\\\")
    ),
    1, 0
  )
| eval is_audio_file_staged=if(
    EventCode=11 AND (
      match(TargetFilename, "(?i)\.(wav|mp3|wma|ogg|flac|aac|m4a|raw)$")
    ) AND (
      match(TargetFilename, "(?i)(\\AppData\\Local\\Temp\\|\\AppData\\Roaming\\|\\Users\\Public\\|\\ProgramData\\|\\Windows\\Temp\\|\\Windows\\Tasks\\)")
    ) AND NOT (
      match(Image, "(?i)(audiodg|wmplayer|groove|teams|ms-teams|zoom|skype|discord|slack|webex|chrome|msedge|firefox|spotify|vlc|SoundRecorder)\.exe$")
    ),
    1, 0
  )
| eval is_audio_tool=if(
    EventCode=1 AND (
      match(CommandLine, "(?i)(Get-MicrophoneAudio|WaveInEvent|WaveFileWriter|NAudio|mciSendString|waveInOpen|AudioCapture|MicCapture|-f dshow|audio=|avfoundation|WindowsAudioDevice|CoreAudio|AVAudioRecorder)")
    ),
    1, 0
  )
| where is_audio_dll_load=1 OR is_audio_file_staged=1 OR is_audio_tool=1
| eval DetectionType=case(
    is_audio_tool=1, "AudioCaptureToolUsage",
    is_audio_file_staged=1, "AudioFileStagedInSuspiciousPath",
    is_audio_dll_load=1, "SuspiciousAudioDllLoad",
    true(), "Unknown"
  )
| eval ProcessName=coalesce(Image, "unknown")
| eval AffectedFile=coalesce(TargetFilename, ImageLoaded, "")
| table _time, host, User, DetectionType, ProcessName, CommandLine, AffectedFile
| sort - _time
high severity medium confidence

Detects audio capture activity using Sysmon logs across three event types: Event ID 7 (ImageLoad) for suspicious processes loading audio API DLLs (winmm.dll, audioses.dll, avrt.dll, dsound.dll) that are not known-legitimate audio consumers; Event ID 11 (FileCreate) for audio file extensions (.wav, .mp3, .wma, .ogg, .flac, .aac, .m4a) created in staging directories such as AppData Temp, ProgramData, or Windows Temp by non-audio processes; Event ID 1 (ProcessCreate) for command lines referencing audio capture functions including PowerSploit Get-MicrophoneAudio, NAudio WaveInEvent, Win32 mciSendString, FFmpeg dshow audio input, or AVFoundation keywords.

Data Sources

Module: Module LoadFile: File CreationProcess: Process CreationCommand: Command ExecutionSysmon Event ID 1Sysmon Event ID 7Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Legitimate audio/video conferencing software loading audio DLLs from non-standard paths during first run or update
  • Media production or podcast software (Audacity, OBS, Adobe Audition) saving audio to AppData or ProgramData as a default output path
  • Voice recognition or accessibility software continuously loading audio APIs (Dragon, Windows Speech Recognition, Cortana)
  • Game audio SDKs (FMOD, Wwise) loaded by game client processes that are not in the allowlist
  • Security research or red team tooling running Get-MicrophoneAudio or atomic test scripts in authorized testing environments
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Unlock Pro Content

Get the full detection package for T1123 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections