Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

3.3 KB
Raw Blame
id: splunk-security-content-b89919ed-fe5f-492c-b139-95dbb162039e
name: Detect Use of cmd exe to Launch Script Interpreters
description: 'The following detects the execution of cscript.exe or wscript.exe processes
  spawned by cmd.exe, leveraging Endpoint Detection and Response (EDR) telemetry mapped
  to the Endpoint data model, with additional contextual filtering to improve fidelity
  and reduce false positives.

  It focuses on executions originating from user-writable directories such as Users,
  AppData, Temp, and Downloads, which are commonly abused by attackers to stage and
  execute malicious scripts, while excluding trusted system paths like C:\Windows\System32\
  and C:\Program Files\ that are typically associated with legitimate activity.

  The detection also filters out service accounts (e.g., accounts ending with $ or
  known naming conventions) to minimize noise from automated processes and incorporates
  command-line context to better assess script execution patterns and identify potentially
  suspicious behavior.'
severity: medium
enabled: false
tags:
  mitre:
  - T1059.003
  categories:
  - endpoint
references:
- https://attack.mitre.org/techniques/T1059/
- https://redcanary.com/threat-detection-report/techniques/windows-command-shell/
logsource:
  product: splunk
detection:
  splunk_spl: "| tstats `security_content_summariesonly`\n  count min(_time) as firstTime\n\
    \        max(_time) as lastTime\n\nFROM datamodel=Endpoint.Processes WHERE\n\n\
    Processes.parent_process_name=\"cmd.exe\"\n(\n    Processes.process_name IN (\"\
    cscript.exe\", \"wscript.exe\")\n    OR\n    Processes.original_file_name IN (\"\
    cscript.exe\", \"wscript.exe\")\n)\nNOT Processes.process IN (\n    \"* \\\"C:\\\
    \\Program Files (x86)\\\\*\",\n    \"* \\\"C:\\\\Program Files\\\\*\",\n    \"\
    * \\\"C:\\\\Windows\\\\System32\\\\*\",\n    \"* \\\"C:\\\\Windows\\\\SysWOW64\\\
    \\*\",\n    \"* C:\\\\Program Files (x86)\\\\*\",\n    \"* C:\\\\Program Files\\\
    \\*\",\n    \"* C:\\\\Windows\\\\System32\\\\*\",\n    \"* C:\\\\Windows\\\\SysWOW64\\\
    \\*\"\n)\nNOT Processes.user=\"*$\"\nBY Processes.action Processes.dest Processes.original_file_name\n\
    \   Processes.parent_process Processes.parent_process_exec\n   Processes.parent_process_guid\
    \ Processes.parent_process_id\n   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| `detect_use_of_cmd_exe_to_launch_script_interpreters_filter`"
provenance:
  source: splunk/security_content
  source_id: b89919ed-fe5f-492c-b139-95dbb162039e
  source_commit: 4d4c7ee
  license: Apache-2.0
  license_url: https://github.com/splunk/security_content/blob/develop/LICENSE
  imported_at: '2026-05-04'
  imported_by: splunk_importer
  upstream_path: detections/endpoint/detect_use_of_cmd_exe_to_launch_script_interpreters.yml
notes:
  splunk_status: production
  splunk_data_source: []
  quarantine_reason: raw SPL — needs translation to AiSOC detection schema