T1123
Audio Capture
Description from ATT&CK
An adversary can leverage a computer's peripheral devices (e.g., microphones and webcams) or applications (e.g., voice and video call services) to capture audio recordings for the purpose of listening into sensitive conversations to gather information.(Citation: ESET Attor Oct 2019)
Malware or scripts may be used to interact with the devices through an available API provided by the operating system or an application to capture audio. Audio files may be written to disk and exfiltrated later.
Tests
Test #1 - Capture Audio
Capture audio using QuickTime Player
⚠️ TCC RequiredInput Arguments:
| Argument | Type | Default Value |
|---|---|---|
| recordingTime | int | 3 |
| filePath | str | /tmp/recording.m4a |
tell application "QuickTime Player"
activate
new audio recording
delay 2
tell front document
start
delay "3"
stop
end tell
export front document in (POSIX file "/tmp/recording.m4a") using settings preset "Audio Only"
quit saving no
end tellDownload Files
Download .scpt Download .swift Download Binary Download Application BundleTest #2 - Get microphone input volume
Gets the current microphone input volume through AppleScript, as seen in OSX.Leverage.
input volume of (get volume settings)Download Files
Download .scpt Download .swift Download Binary Download Application BundleTest #3 - Mute microphone input volume
Sets the microphone input volume to zero through AppleScript, as seen in OSX.Leverage.
set volume input volume 0Download Files
Download .scpt Download .swift Download Binary Download Application Bundle