Detection rules › Splunk

Windows Gather Victim Host Information Camera

Status
production
Severity
low
Group by
Guid, Name, Opcode, Path, ScriptBlockId, ScriptBlockText, dest, process_id, signature, signature_id, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

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.

Known false positives

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

MITRE ATT&CK coverage

Telemetry coverage

Rule body

name: Windows Gather Victim Host Information Camera
id: e4df4676-ea41-4397-b160-3ee0140dc332
version: 13
creation_date: '2022-07-29'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
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.
data_source:
    - Powershell Script Block Logging 4104
search: |-
    `powershell` EventCode=4104 ScriptBlockText= "* Win32_PnPEntity *" ScriptBlockText= "*SELECT*" ScriptBlockText= "*WHERE*" ScriptBlockText = "*PNPClass*" ScriptBlockText IN ("*Image*", "*Camera*")
      | fillnull
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY dest signature signature_id
           user_id vendor_product EventID
           Guid Opcode Name
           Path ProcessID ScriptBlockId
           ScriptBlockText
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `windows_gather_victim_host_information_camera_filter`
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://help.splunk.com/en/security-offerings/splunk-user-behavior-analytics/get-data-in/5.4.1/add-other-data-to-splunk-uba/configure-powershell-logging-to-see-powershell-anomalies-in-splunk-uba.
known_false_positives: Administrators may execute this powershell command to get hardware information related to camera on $dest$.
references:
    - https://cert.gov.ua/article/405538
    - https://malpedia.caad.fkie.fraunhofer.de/details/win.dcrat
    - https://www.mandiant.com/resources/analyzing-dark-crystal-rat-backdoor
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: A Powershell script to enumerate camera detected on host - $dest$
        - field: user_id
          type: user
          score: 20
          message: A Powershell script to enumerate camera detected on host - $dest$
analytic_story:
    - DarkCrystal RAT
asset_type: Endpoint
mitre_attack_id:
    - T1592.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`powershell` EventCode=4104 ScriptBlockText= "* Win32_PnPEntity *" ScriptBlockText= "*SELECT*" ScriptBlockText= "*WHERE*" ScriptBlockText = "*PNPClass*" ScriptBlockText IN ("*Image*", "*Camera*")

Stage 2: fillnull

| fillnull

Stage 3: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY dest signature signature_id
       user_id vendor_product EventID
       Guid Opcode Name
       Path ProcessID ScriptBlockId
       ScriptBlockText

Stage 4: search

| `security_content_ctime(firstTime)`

Stage 5: search

| `security_content_ctime(lastTime)`

Stage 6: search

| `windows_gather_victim_host_information_camera_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 4104 corpus 269 (splunk 269)
field:"EventID" kind:eq value:"4104"
ScriptBlockTexteq
  • "* Win32_PnPEntity *"
  • "*PNPClass*"
  • "*SELECT*" corpus 3 (splunk 3)
  • "*WHERE*"
field:"ScriptBlockText" kind:eq
ScriptBlockTextin
  • "*Camera*"
  • "*Image*"
field:"ScriptBlockText" kind:in