WSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript


Description

Detects script file execution (.js, .jse, .vba, .vbe, .vbs, .wsf, .wsh) by Wscript/Cscript.

Query · sigma

selection_img:
- OriginalFileName:
  - wscript.exe
  - cscript.exe
- Image|endswith:
  - \wscript.exe
  - \cscript.exe
selection_cli:
  CommandLine|contains:
  - .js
  - .jse
  - .vba
  - .vbe
  - .vbs
  - .wsf
  - .wsh
condition: all of selection_*

Known false positives

  • Some additional tuning is required. It is recommended to add the user profile path in CommandLine if it is getting too noisy.
Raw source WSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript · Sigma
Esc
Published by SigmaHQ/sigma ↗, licensed under Detection Rule License 1.1 ↗. Reproduced here unmodified.
title: WSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript
id: 1e33157c-53b1-41ad-bbcc-780b80b58288
related:
    - id: 23250293-eed5-4c39-b57a-841c8933a57d
      type: obsolete
    - id: cea72823-df4d-4567-950c-0b579eaf0846
      type: derived
status: test
description: Detects script file execution (.js, .jse, .vba, .vbe, .vbs, .wsf, .wsh) by Wscript/Cscript.
references:
    - https://thedfirreport.com/2023/10/30/netsupport-intrusion-results-in-domain-compromise/
    - https://redcanary.com/blog/gootloader/
author: Michael Haag
date: 2019-01-16
modified: 2026-02-17
tags:
    - attack.execution
    - attack.t1059.005
    - attack.t1059.007
    - detection.threat-hunting
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName:
              - 'wscript.exe'
              - 'cscript.exe'
        - Image|endswith:
              - '\wscript.exe'
              - '\cscript.exe'
    selection_cli:
        CommandLine|contains:
            - '.js'
            - '.jse'
            - '.vba'
            - '.vbe'
            - '.vbs'
            - '.wsf'
            - '.wsh'
    condition: all of selection_*
falsepositives:
    - Some additional tuning is required. It is recommended to add the user profile path in CommandLine if it is getting too noisy.
level: medium

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.