T1123 Elastic Security · Elastic

Detect Audio Capture in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
any where
  (
    event.category == "library" and
    dll.name in~ ("winmm.dll", "audioses.dll", "avrt.dll", "dsound.dll", "mfplat.dll") and
    not process.name in~ ("audiodg.exe", "svchost.exe", "wmplayer.exe", "groove.exe", "teams.exe", "ms-teams.exe", "zoom.exe", "zoomwebviewhost.exe", "skype.exe", "skypehost.exe", "discord.exe", "slack.exe", "webex.exe", "chrome.exe", "msedge.exe", "firefox.exe", "iexplore.exe", "opera.exe", "spotify.exe", "vlc.exe", "mpv.exe", "SoundRecorder.exe", "RuntimeBroker.exe", "ShellExperienceHost.exe", "explorer.exe") and
    not process.executable : ("*\\Program Files\\*", "*\\Program Files (x86)\\*", "*\\Windows\\System32\\*", "*\\Windows\\SysWOW64\\*")
  ) or
  (
    event.category == "file" and
    event.action == "creation" and
    file.extension in~ ("wav", "mp3", "wma", "ogg", "flac", "aac", "m4a", "raw") and
    (
      file.path : "*\\AppData\\Local\\Temp\\*" or
      file.path : "*\\AppData\\Roaming\\*" or
      file.path : "*\\Users\\Public\\*" or
      file.path : "*\\ProgramData\\*" or
      file.path : "*\\Windows\\Temp\\*" or
      file.path : "*\\Windows\\Tasks\\*" or
      file.path : "*\\Recycle*"
    ) and
    not process.name in~ ("audiodg.exe", "wmplayer.exe", "groove.exe", "teams.exe", "ms-teams.exe", "zoom.exe", "skype.exe", "discord.exe", "slack.exe", "webex.exe", "chrome.exe", "msedge.exe", "firefox.exe", "spotify.exe", "vlc.exe", "SoundRecorder.exe")
  ) or
  (
    event.category == "process" and
    event.type == "start" and
    process.command_line : ("*Get-MicrophoneAudio*", "*WaveInEvent*", "*WaveFileWriter*", "*NAudio*", "*mciSendString*", "*waveInOpen*", "*AudioCapture*", "*MicCapture*", "*-f dshow*", "*audio=*", "*avfoundation*", "*WindowsAudioDevice*", "*CoreAudio*", "*AVAudioRecorder*")
  )
high severity medium confidence

Detects audio capture activity via three behavioral patterns: (1) suspicious processes loading audio-related Windows DLLs outside of known-legitimate audio applications, (2) audio-format files being written to staging directories commonly used by malware for exfiltration, and (3) processes launched with command-line arguments associated with audio capture libraries and frameworks such as PowerSploit's Get-MicrophoneAudio, NAudio, or ffmpeg dshow input.

Data Sources

Elastic Endpoint SecurityWindows Sysmon via FilebeatElastic Agent (Endpoint integration)

Required Tables

logs-endpoint.events.library-*logs-endpoint.events.file-*logs-endpoint.events.process-*logs-system.system-*

False Positives & Tuning

  • Legitimate audio recording or editing software (Audacity, Adobe Audition, OBS Studio) loading winmm.dll or mfplat.dll from non-standard install paths such as user profile directories
  • Developer tools building or testing audio applications (e.g., compiling NAudio-based projects) generating audio output files in %TEMP% as part of unit tests
  • Screen recording or video conferencing software installed in per-user locations (not Program Files) that loads audio DLLs and writes temporary audio buffers to AppData paths
  • Game launchers or mod tools that hook audio APIs for equalizer or voice-changer features and operate from non-standard directories
  • System imaging or backup tools that capture WAV/MP3 audio alerts or notification sounds to staging directories during backup operations
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