Detection rules › Splunk

Wscript Or Cscript Suspicious Child Process

Status
production
Severity
low
Group by
IntegrityLevel, command_line, computer_name, event_action, original_file_name, parent_command_line, parent_process_guid, parent_process_id, parent_process_name, process_guid, process_hash, process_id, process_name, user, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

This analytic identifies a suspicious spawned process by WScript or CScript process. This technique was a common technique used by adversaries and malware to execute different LOLBIN, other scripts like PowerShell or spawn a suspended process to inject its code as a defense evasion. This TTP may detect some normal script that uses several application tools that are in the list of the child process it detects but a good pivot and indicator that a script may execute suspicious code.

MITRE ATT&CK coverage

Event coverage

Rule body splunk

name: Wscript Or Cscript Suspicious Child Process
id: 1f35e1da-267b-11ec-90a9-acde48001122
version: 16
creation_date: '2021-10-06'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: This analytic identifies a suspicious spawned process by WScript or CScript process. This technique was a common technique used by adversaries and malware to execute different LOLBIN, other scripts like PowerShell or spawn a suspended process to inject its code as a defense evasion. This TTP may detect some normal script that uses several application tools that are in the list of the child process it detects but a good pivot and indicator that a script may execute suspicious code.
data_source:
    - Sysmon EventID 1
    - Windows Event Log Security 4688
    - CrowdStrike ProcessRollup2
search: "| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes\n  WHERE Processes.parent_process_name IN (\"cscript.exe\", \"wscript.exe\") Processes.process_name IN (\"regsvr32.exe\", \"rundll32.exe\",\"winhlp32.exe\",\"certutil.exe\",\"msbuild.exe\",\"cmd.exe\",\"powershell*\",\"pwsh.exe\",\"wmic.exe\",\"mshta.exe\")\n  BY Processes.action Processes.dest Processes.original_file_name\n     Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid\n     Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path\n     Processes.process Processes.process_exec Processes.process_guid\n     Processes.process_hash Processes.process_id Processes.process_integrity_level\n     Processes.process_name Processes.process_path Processes.user\n     Processes.user_id Processes.vendor_product\n| `drop_dm_object_name(Processes)`\n| `security_content_ctime(firstTime)`\n| `security_content_ctime(lastTime)`\n| `wscript_or_cscript_suspicious_child_process_filter`"
how_to_implement: The detection is based on data that originates from Endpoint Detection and Response (EDR) agents. These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process. Additionally, you must ingest complete command-line executions. These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model. Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.
known_false_positives: Administrators may create vbs or js script that use several tool as part of its execution. Filter as needed.
references:
    - https://www.hybrid-analysis.com/sample/8da5b75b6380a41eee3a399c43dfe0d99eeefaa1fd21027a07b1ecaa4cd96fdd?environmentId=120
    - https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
drilldown_searches:
    - name: View the detection results for - "$dest$" and "$user$"
      search: '%original_detection_search% | search  dest = "$dest$" user = "$user$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$dest$" and "$user$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$dest$", "$user$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: '0'
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: wscript or cscript parent process spawned $process_name$ on $dest$
        - field: user
          type: user
          score: 20
          message: wscript or cscript parent process spawned $process_name$ on $dest$
analytic_story:
    - Data Destruction
    - FIN7
    - NjRAT
    - Remcos
    - XWorm
    - WhisperGate
    - Unusual Processes
    - ShrinkLocker
    - 0bj3ctivity Stealer
    - MuddyWater
    - Axios Supply Chain Post Compromise
    - VIP Keylogger
asset_type: Endpoint
mitre_attack_id:
    - T1055
    - T1134.004
    - T1543
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint
tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.005/vbs_wscript/sysmon.log
          source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
          sourcetype: XmlWinEventLog
      test_type: unit

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes
  WHERE Processes.parent_process_name IN ("cscript.exe", "wscript.exe") Processes.process_name IN ("regsvr32.exe", "rundll32.exe","winhlp32.exe","certutil.exe","msbuild.exe","cmd.exe","powershell*","pwsh.exe","wmic.exe","mshta.exe")
  BY Processes.action Processes.dest Processes.original_file_name
     Processes.parent_process Processes.parent_process_exec Processes.parent_process_guid
     Processes.parent_process_id Processes.parent_process_name Processes.parent_process_path
     Processes.process Processes.process_exec Processes.process_guid
     Processes.process_hash Processes.process_id Processes.process_integrity_level
     Processes.process_name Processes.process_path Processes.user
     Processes.user_id Processes.vendor_product

Stage 2: search

| `drop_dm_object_name(Processes)`

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `wscript_or_cscript_suspicious_child_process_filter`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Processes.parent_process_namein
  • "cscript.exe" corpus 7 (elastic 6, splunk 1)
  • "wscript.exe" corpus 11 (elastic 10, splunk 1)
Processes.process_namein
  • "certutil.exe" corpus 22 (elastic 16, splunk 6)
  • "cmd.exe" corpus 77 (elastic 48, splunk 29)
  • "msbuild.exe" corpus 16 (elastic 13, splunk 3)
  • "mshta.exe" corpus 31 (elastic 26, splunk 5)
  • "powershell*" corpus 4 (splunk 4)
  • "pwsh.exe" corpus 62 (elastic 33, splunk 29)
  • "regsvr32.exe" corpus 25 (elastic 19, splunk 6)
  • "rundll32.exe" corpus 60 (elastic 34, splunk 26)
  • "winhlp32.exe"
  • "wmic.exe" corpus 47 (splunk 27, elastic 20)