Skip to content

Administrative Shares Enabled

ID: windows-administrative-shares-enabled

Severity: high

Author: princechaddha

Tags: windows,shares,administrative,code,windows-audit

Checks if administrative shares (C$, D$, etc.) are enabled, which can pose a security risk.

id: windows-administrative-shares-enabled
info:
name: Administrative Shares Enabled
author: princechaddha
severity: high
description: Checks if administrative shares (C$, D$, etc.) are enabled, which can pose a security risk.
impact: |
Enabling administrative shares can provide attackers with remote access to the system drives.
remediation: |
Disable administrative shares to minimize exposure to remote attacks.
tags: windows,shares,administrative,code,windows-audit
self-contained: true
code:
- pre-condition: |
IsWindows();
engine:
- powershell
- powershell.exe
args:
- -ExecutionPolicy
- Bypass
pattern: "*.ps1"
source: |
$Share = Get-SmbShare -Name C$
Write-Host "Administrative Share Found: $($Share.Name)"
matchers:
- type: word
words:
- "Administrative Share Found: C$"
# digest: 4b0a00483046022100f1dbb7ab0ef7ff97bc57411ac7ecb79736e6d972c57bf4f7f0ff37e65be212ec0221009cd94ed2f21da4f7ddb5ff120eab8ff9ef6b20c1de07f0a04e27bb97b41740d0:922c64590222798bb761d5b6d8e72950

This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.

Terminal window
$ nuclei -u "URL" -t "code/windows/audit/windows-administrative-shares-enabled.yaml"

View on Github