Detection: MacOS AMOS Stealer - Virtual Machine Check Activity

Description

The following analytic detects AMOS Stealer VM check activity on macOS. It leverages osquery to monitor process events and identifies the execution of the "osascript" command along with specific commandline strings. This activity is significant as AMOS stealer was seen using this pattern in order to check if the host is a Virtual Machine or not. If confirmed malicious, this behavior indicate that the host is already infected by the AMOS stealer, which could allow attackers to execute arbitrary code, escalate privileges, steal information, or persist within the environment, posing a significant security risk.

 1`osquery_macro` name=es_process_events 
 2columns.cmdline="*osascript*" AND columns.cmdline="* -e *" AND columns.cmdline="*set*" AND columns.cmdline="*system_profiler*" AND columns.cmdline IN ("*VMware*", "*QEMU*") 
 3
 4| rename columns.* as * 
 5
 6| stats  min(_time) as firstTime max(_time) as lastTime 
 7  values(cmdline) as cmdline, 
 8  values(pid) as pid, 
 9  values(parent) as parent, 
10  values(path) as path,
11  values(signing_id) as signing_id,  
12  by username host 
13
14| rename 
15  username as user, 
16  cmdline as process, 
17  parent as parent_process, 
18  path as process_path, 
19  host as dest 
20
21| `security_content_ctime(firstTime)` 
22
23| `security_content_ctime(lastTime)`
24
25| `macos_amos_stealer___virtual_machine_check_activity_filter`

Data Source

Name Platform Sourcetype Source
osquery N/A 'osquery:results' 'osquery'

Macros Used

Name Value
osquery_macro sourcetype=osquery:results
macos_amos_stealer___virtual_machine_check_activity_filter search *
macos_amos_stealer___virtual_machine_check_activity_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1059.002 AppleScript Execution
Installation
DE.AE
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event True
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

This detection leverages osquery and endpoint security on MacOS. Follow the link in references, which describes how to setup process auditing in MacOS with endpoint security and osquery.

Known False Positives

None identified.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

AMOS Stealer activity on host $dest$ by user $user$

Risk Object Risk Object Type Risk Score Threat Objects
user user 40 No Threat Objects
dest system 40 No Threat Objects

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset osquery osquery:results
Integration ✅ Passing Dataset osquery osquery:results

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 1