T1123 Google Chronicle · YARA-L

Detect Audio Capture in Google Chronicle

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/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1123_audio_capture {
  meta:
    author = "Argus Detection Engineering"
    description = "Detects T1123 Audio Capture via suspicious audio DLL loads, audio file staging in malware-typical paths, or use of known audio capture APIs and tools."
    mitre_attack_tactic = "Collection"
    mitre_attack_technique = "T1123"
    mitre_attack_technique_id = "T1123"
    reference = "https://attack.mitre.org/techniques/T1123/"
    severity = "HIGH"
    confidence = "MEDIUM"
    version = "1.0"

  events:
    (
      // Branch 1: Suspicious audio DLL load by non-whitelisted process
      $e.metadata.event_type = "PROCESS_MODULE_LOAD" and
      (
        $e.target.file.full_path = /(?i)(\\|\/)winmm\.dll$/ or
        $e.target.file.full_path = /(?i)(\\|\/)audioses\.dll$/ or
        $e.target.file.full_path = /(?i)(\\|\/)avrt\.dll$/ or
        $e.target.file.full_path = /(?i)(\\|\/)dsound\.dll$/ or
        $e.target.file.full_path = /(?i)(\\|\/)mfplat\.dll$/
      ) and
      not $e.principal.process.file.full_path = /(?i)(audiodg|svchost|wmplayer|groove|teams|ms-teams|zoom|zoomwebviewhost|skype|skypehost|skypebridge|discord|slack|webex|chrome|msedge|firefox|iexplore|opera|spotify|vlc|mpv|SoundRecorder|RuntimeBroker|ShellExperienceHost|SearchHost|SystemSettings|explorer)\.exe$/ and
      not $e.principal.process.file.full_path = /(?i)\\(Program Files|Program Files \(x86\)|Windows\\System32|Windows\\SysWOW64)\\/
    ) or
    (
      // Branch 2: Audio file written to suspicious staging directory
      $e.metadata.event_type = "FILE_CREATION" and
      $e.target.file.full_path = /(?i)\.(wav|mp3|wma|ogg|flac|aac|m4a|raw)$/ and
      (
        $e.target.file.full_path = /(?i)\\AppData\\Local\\Temp\\/ or
        $e.target.file.full_path = /(?i)\\AppData\\Roaming\\/ or
        $e.target.file.full_path = /(?i)\\Users\\Public\\/ or
        $e.target.file.full_path = /(?i)\\ProgramData\\/ or
        $e.target.file.full_path = /(?i)\\Windows\\Temp\\/ or
        $e.target.file.full_path = /(?i)\\Windows\\Tasks\\/ or
        $e.target.file.full_path = /(?i)\\Recycle/
      ) and
      not $e.principal.process.file.full_path = /(?i)(audiodg|wmplayer|groove|teams|ms-teams|zoom|skype|discord|slack|webex|chrome|msedge|firefox|spotify|vlc|SoundRecorder)\.exe$/
    ) or
    (
      // Branch 3: Process launched with audio capture tool or API keywords
      $e.metadata.event_type = "PROCESS_LAUNCH" and
      $e.target.process.command_line = /(?i)(Get-MicrophoneAudio|WaveInEvent|WaveFileWriter|NAudio|mciSendString|waveInOpen|AudioCapture|MicCapture|-f dshow|audio=|avfoundation|WindowsAudioDevice|CoreAudio|AVAudioRecorder)/
    )

  condition:
    $e
}
high severity medium confidence

Chronicle YARA-L 2.0 rule detecting T1123 Audio Capture across three behavioral branches using UDM event types: PROCESS_MODULE_LOAD for suspicious audio DLL loads (winmm.dll, audioses.dll, avrt.dll, dsound.dll, mfplat.dll) by processes outside the legitimate audio application allowlist; FILE_CREATION for audio-format files appearing in staging paths commonly used by malware for collection and exfiltration preparation; and PROCESS_LAUNCH for processes whose command lines reference audio capture APIs, PowerSploit modules, or recording frameworks.

Data Sources

Google Chronicle SIEMChronicle Unified Data Model (UDM)Windows Sysmon via Chronicle forwarderCrowdStrike Falcon via Chronicle integration

Required Tables

UDM events (PROCESS_MODULE_LOAD, FILE_CREATION, PROCESS_LAUNCH)

False Positives & Tuning

  • Third-party audio drivers or DAW (Digital Audio Workstation) software installed in non-standard locations that load avrt.dll and dsound.dll and write session audio to AppData
  • Video game titles that use DirectSound (dsound.dll) for spatial audio and run from user-writable locations such as Steam's userdata directory
  • Enterprise telephony clients (not in the allowlist) that use Windows Media Foundation (mfplat.dll) for codec handling and temporarily buffer call recordings in ProgramData
  • Security testing tools or red team assessments using PowerSploit or NAudio as part of authorized penetration testing engagements
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