OpsaC - Operating as PowerShell code
published: June 28, 2017 author: Tinu tags: Security - SMB - Windows Server categories: Windows Server
Aktuell sind verschiedene Attacken mit Ransomware im Umlauf, welche die SMB Version 1 ausnutzen.
To determine whether any SMB clients are currently connected to the server running SMB 1.0, type the following script in Windows PowerShell:
Get-SmbSession | Select Dialect,ClientComputerName,ClientUserName | ? Dialect -lt 2
You should run this script repeatedly over the course of a week (multiple times each day) to build an audit trail. You could also run this as a scheduled task
Get-SmbServerConfiguration | Select EnableSMB*
oder
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -name SMB*
Um SMBv1 auf dem SMB-Server zu aktivieren oder zu deaktivieren, konfigurieren Sie den folgenden Registrierungsschlüssel:
Registrierungsunterschlüssel: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\ParametersRegistrierungseintrag: SMB1 REG_DWORD: 0 = Deaktiviert REG_DWORD: 1 = Aktiviert Standardwert: 1 = Aktiviert
Deaktivieren mit PowerShell:
Set-SmbServerConfiguration -EnableSMB1Protocol:$false -Force
oder
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force
For client operating systems:
For server operating systems:
Impact of workaround. The SMBv1 protocol will be disabled on the target system.