You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WinRM/SSH detection, config sync, report hardening, test coverage (v0.4.9)
- Add WinRM (5985/5986) and SSH (22) listener detection in Check-Network
- Sync TrustedCompanies in Get-DefaultConfig with config.example.json
- Use System.Net.WebUtility.HtmlEncode for report detail escaping
- Document score formula weights in ReportGenerator
- Add Network and DefenseEvasion Assert-FindingCount in test harness
Made-with: Cursor
Copy file name to clipboardExpand all lines: modules/Check-Network.ps1
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -205,6 +205,34 @@ function Invoke-NetworkChecks {
205
205
-MITRE @("T1571")
206
206
}
207
207
208
+
# WinRM and SSH listeners — always check regardless of commonListenPorts exclusions
209
+
$specialListeners=@(
210
+
@{ Port=5985; Severity="WARNING"; Title="WinRM Listener Active: port 5985"; MITRE="T1021.006"
211
+
Description="WinRM (HTTP) is listening on port 5985. WinRM enables remote PowerShell command execution and is commonly abused by attackers for lateral movement."
212
+
Remediation="If WinRM is not required, disable it: 'Disable-PSRemoting -Force'. Restrict access with firewall rules if it must remain enabled." }
213
+
@{ Port=5986; Severity="WARNING"; Title="WinRM Listener Active: port 5986"; MITRE="T1021.006"
214
+
Description="WinRM (HTTPS) is listening on port 5986. WinRM enables remote PowerShell command execution and is commonly abused by attackers for lateral movement."
215
+
Remediation="If WinRM is not required, disable it: 'Disable-PSRemoting -Force'. Restrict access with firewall rules if it must remain enabled." }
Description="An OpenSSH server is listening on port 22. SSH enables remote command execution; verify this service is intentional and that key-based authentication is enforced."
218
+
Remediation="If SSH is not required, stop and disable the OpenSSH Server service. If required, ensure 'PasswordAuthentication no' is set in sshd_config and restrict access via firewall." }
219
+
)
220
+
foreach ($checkin$specialListeners) {
221
+
if ($trustedPorts-contains$check.Port) { continue }
0 commit comments