Try in Splunk Security Cloud

Description

The following analytic detects a PowerShell script that enumerates camera devices on the targeted host. This detection leverages PowerShell Script Block Logging, specifically looking for commands querying Win32_PnPEntity for camera-related information. This activity is significant as it is commonly observed in DCRat malware, which collects camera data to send to its command-and-control server. If confirmed malicious, this behavior could indicate an attempt to gather sensitive visual information from the host, potentially leading to privacy breaches or further exploitation.

  • Type: Anomaly
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-10
  • Author: Teoderick Contreras, Splunk
  • ID: e4df4676-ea41-4397-b160-3ee0140dc332

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1592.001 Hardware Reconnaissance
T1592 Gather Victim Host Information Reconnaissance
Kill Chain Phase
  • Reconnaissance
NIST
  • DE.AE
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
`powershell` EventCode=4104 ScriptBlockText= "* Win32_PnPEntity *" ScriptBlockText= "*SELECT*" ScriptBlockText= "*WHERE*" ScriptBlockText = "*PNPClass*" ScriptBlockText IN ("*Image*", "*Camera*") 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText Computer UserID 
| rename Computer as dest 
| rename UserID as user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_gather_victim_host_information_camera_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_gather_victim_host_information_camera_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • ScriptBlockText
  • Computer
  • EventCode

How To Implement

To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

Known False Positives

Administrators may execute this powershell command to get hardware information related to camera on $dest$.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
42.0 60 70 A Powershell script to enumerate camera detected on host - $dest$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

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 | version: 3