Files
nuclei-templates/code/windows/audit/windows-script-host-enabled.yaml
2024-11-27 08:16:08 +00:00

34 lines
1.1 KiB
YAML

id: windows-script-host-enabled
info:
name: Windows Script Host Enabled
author: princechaddha
severity: medium
description: Checks if Windows Script Host is enabled, which can be used to run malicious scripts.
impact: |
Leaving Windows Script Host enabled may allow attackers to execute harmful scripts on the system.
remediation: |
Disable Windows Script Host by setting the Enabled registry key to 0.
tags: windows,code,windows-audit
self-contained: true
code:
- pre-condition: |
IsWindows();
engine:
- powershell
- powershell.exe
args:
- -ExecutionPolicy
- Bypass
pattern: "*.ps1"
source: |
$(Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows Script Host\Settings' -Name 'Enabled' -ErrorAction SilentlyContinue).Enabled -eq 0
matchers:
- type: word
words:
- "True"
# digest: 4b0a00483046022100e7d7e7b0fc83a7f97e3fe7808f0366e2ba167854ad9c146c50cf2e71e38c9f01022100dbb0f6328b45e00d8017e55ba46b581a6100b892e8a68e6480bc83ba736a016b:922c64590222798bb761d5b6d8e72950