Anonieme SID-Naar-Naam Vertaling Uitgeschakeld

πŸ’Ό Management Samenvatting

Anonieme SID-to-name vertaling moet worden uitgeschakeld om te voorkomen dat niet-geauthenticeerde aanvallers SIDs (Security Identifiers) kunnen vertalen naar gebruikersnamen, wat waardevolle reconnaissance informatie oplevert voor verdere aanvallen.

Aanbeveling
IMPLEMENT
Risico zonder
Medium
Risk Score
5/10
Implementatie
2u (tech: 1u)
Van toepassing op:
βœ“ Windows 10
βœ“ Windows 11
βœ“ Windows Server

SID TRANSLATION INFORMATION DISCLOSURE: Windows kan SIDs (zoals S-1-5-21-xxx-500 voor Administrator) vertalen naar de bijbehorende gebruikersnaam. ZONDER RESTRICTIE kunnen anonieme verbindingen: Elke SID vertalen naar username (reveals account naming conventions), Well-known SIDs gebruiken om beheerdersaccounts te identificeren (SID-500 is ingebouwde Administrator), Domain SIDs query zonder authenticatie. RECONNAISSANCE VALUE VOOR AANVALLERS: Identificeren van beheerdersaccounts (target voor privilege escalation), Ontdekken van serviceaccounts (vaak met weak passwords), Begrijpen van organizational structure (usernames reveal departments, roles), Account naming patterns (helpdesk001, admin-john β†’ predictable patterns). ATTACK USAGE: Aanvaller zonder credentials β†’ Queries SID S-1-5-21-[domain]-500 β†’ Gets Administrator account name β†’ Target voor brute force met die specific username. LEGACY COMPATIBILITY: Deze capability bestaat voor backward compatibility met pre-Windows 2000 systems, Moderne netwerken hebben GEEN legitieme gebruiken case voor anonymous SID translation.

PowerShell Modules Vereist
Primary API: Intune / Group Policy
Connection: Local beveiligingsbeleid
Required Modules:

Implementatie

Deze control configureert LSAAnonymousNameLookup policy via Local beveiligingsbeleid: Network access: Sta toe anonymous SID/Name translation is Disabled. Technical implementation: via secedit /export en configuration, Policy value: LSAAnonymousNameLookup is 0 (disabled). EFFECT WANNEER DISABLED (value=0): Anonieme verbindingen kunnen NIET SIDs vertalen naar namen, geauthenticeerde gebruikers kunnen nog steeds SID lookups doen (legitimate operations), Blokkeert reconnaissance attacks via null sessions.

Vereisten

  1. Windows 10, Windows 11, of Windows Server 2016+
  2. Intune of Group Policy management
  3. Administrator rechten
  4. Compatibility check: Zeer zeldzame legacy apps kunnen dit vereisen (Verifieer geen dependencies)

Implementatie

via Intune:

  1. Intune admin center β†’ Endpoint security
  2. Security baseline β†’ Windows Security Baseline
  3. Setting: 'Network access: Sta toe anonymous SID/Name translation' is Disabled
  4. Assign to: Alle devices

Gebruik PowerShell-script anonymous-sid-translation-disabled.ps1 (functie Invoke-Remediation) – Configureer LSAAnonymousNameLookup via secedit.

via Group Policy:

  1. GPO: Computer Configuration β†’ Windows Settings β†’ beveiligingsinstellings
  2. Local Policies β†’ Security Options
  3. Policy: 'Network access: Sta toe anonymous SID/Name translation'
  4. Setting: Disabled
  5. Implementeer via gpupdate /force

Monitoring

Gebruik PowerShell-script anonymous-sid-translation-disabled.ps1 (functie Invoke-Monitoring) – Verificeer LSAAnonymousNameLookup is 0 via secedit export.

Monitor: Policy compliance, Vulnerability scans voor anonymous information disclosure

Compliance en Auditing

  1. CIS Windows Benchmark 2.3.10.1 - Level 1
  2. BIO 09.01 - Toegangsbeleid: Information disclosure prevention
  3. ISO 27001 A.9.1.2 - Toegang tot netwerken
  4. NIS2 Artikel 21 - Toegangscontrole en authenticaties

Remediatie

Gebruik PowerShell-script anonymous-sid-translation-disabled.ps1 (functie Invoke-Remediation) – Herstellen.

Compliance & Frameworks

Automation

Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).

PowerShell
<# .SYNOPSIS Intune Security Options: Anonymous SID Translation Disabled .DESCRIPTION CIS - Anonymous SID name translation disabled. .NOTES Filename: anon-sid.ps1|Author: Nederlandse Baseline voor Veilige Cloud|Security Policy: LSAAnonymousNameLookup|Expected: 0 (Disabled) #> #Requires -Version 5.1 #Requires -RunAsAdministrator [CmdletBinding()]param([switch]$WhatIf, [switch]$Monitoring, [switch]$Remediation, [switch]$Revert) $ErrorActionPreference = 'Stop'; $PolicyName = "LSAAnonymousNameLookup"; $ExpectedValue = 0 function Connect-RequiredServices { $p = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()); return $p.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } function Test-Compliance { $r = [PSCustomObject]@{ScriptName = "anon-sid.ps1"; PolicyName = "Anonymous SID Translation"; IsCompliant = $false; CurrentValue = $null; ExpectedValue = "Disabled"; Details = @() }; function Invoke-Revert { Write-Host "Revert via GPO" } try { secedit /export /cfg "$env:TEMP\secedit.txt" | Out-Null; $content = Get-Content "$env:TEMP\secedit.txt"; $line = $content | Where-Object { $_ -match "^$PolicyName" }; if ($line -match "=\s*(\d+)") { if ([int]$matches[1] -eq $ExpectedValue) { $r.IsCompliant = $true; $r.Details += "Anonymous SID disabled" }else { $r.Details += "Anonymous SID enabled" } }else { $r.IsCompliant = $true; $r.Details += "Default" } }catch { $r.Details += "Error: $($_.Exception.Message)" }finally { Remove-Item "$env:TEMP\secedit.txt" -ErrorAction SilentlyContinue }; return $r } function Invoke-Remediation { Write-Host "Anonymous SID translation via Group Policy configureren" -ForegroundColor Yellow; Write-Host "Computer > Policies > Security Settings > Local Policies > Security Options" -ForegroundColor Gray } function Invoke-Monitoring { $r = Test-Compliance; Write-Host "`n$($r.PolicyName): $(if($r.IsCompliant){'COMPLIANT'}else{'NON-COMPLIANT'})" -ForegroundColor $(if ($r.IsCompliant) { 'Green' }else { 'Red' }); return $r } function Invoke-Revert { Write-Host "Revert via GPO" } try { if (-not(Connect-RequiredServices)) { exit 1 }; if ($Monitoring) { $r = Invoke-Monitoring; exit $(if ($r.IsCompliant) { 0 }else { 1 }) }elseif ($Remediation) { if (-not $WhatIf) { Invoke-Remediation } }elseif ($Revert) { Invoke-Revert }else { $r = Test-Compliance; exit $(if ($r.IsCompliant) { 0 }else { 1 }) } }catch { Write-Error $_; exit 1 }

Risico zonder implementatie

Risico zonder implementatie
Medium: Medium risico op information disclosure: Aanvallers kunnen zonder authenticatie SIDs vertalen naar usernames, wat reconnaissance voor gerichte aanvallen faciliteert (beheerdersaccount identification, user enumeration).

Management Samenvatting

Schakel anonieme SID-naar-naam vertaling uit (LSAAnonymousNameLookup=0). Voorkomt reconnaissance attacks. Voldoet aan CIS 2.3.10.1 L1, BIO 09.01, ISO 27001 A.9.1.2. Implementatie: 1-2 uur.