name:Network Discovery Disabled on Public Networks
author:princechaddha
severity:medium
description:Checks if network discovery is disabled on all public networks.
impact:|
Disabling network discovery on public networks reduces the system's visibility and minimizes the attack surface, preventing potential unauthorized access.
remediation:|
Ensure network discovery remains disabled on public networks to maintain secure network configurations.
tags:network,code,windows-audit
self-contained:true
code:
- pre-condition:|
IsWindows();
engine:
- powershell
- powershell.exe
args:
- -ExecutionPolicy
- Bypass
pattern:"*.ps1"
source:|
if (-not (Get-NetConnectionProfile | Where-Object { $_.NetworkCategory -eq 'Public' -and $_.NetworkDiscovery -eq 'Discoverable' })) { "Network Discovery is disabled on all Public networks" }