Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
es:it-security:smb-hardening [2023/11/13 13:53] – creado psycore | es:it-security:smb-hardening [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Refuerzo SMB ====== | ||
- | ===== Antecedentes técnicos del protocolo SMB ===== | ||
- | |||
- | [[wpde> | ||
- | La firma SMB asigna explícitamente cada sesión iniciada al cliente. Esto significa que todavía es posible secuestrar la autenticación, | ||
- | |||
- | En SMBv1, la firma SMB está desactivada por defecto. Este protocolo es obsoleto, propenso a errores, inseguro y, en general, debería desactivarse. | ||
- | SMBv2 activa la firma SMB como valor por defecto, pero sólo la utiliza si el servidor o el cliente la requieren como requisito previo. Este no suele ser el caso. | ||
- | |||
- | ^ ^ Servidor ^ ^ ^ | ||
- | ^ Cliente ^ Requiere ^ Activado ^ Desactivado (SMBv1) ^ | ||
- | | Requerido | @lightgreen: | ||
- | | Activado | @lightgreen: | ||
- | | Desactivado (SMBv1) | @lightgrey: | ||
- | |||
- | Esto significa que la firma SMB debe estar activada en el servidor como requisito previo. | ||
- | |||
- | ===== Procedimiento ===== | ||
- | |||
- | * Paso 1 - Desactivar SMBv1 | ||
- | * Paso 2 - Activar opcionalmente la firma SMB en el cliente | ||
- | * Paso 3 - Forzar la firma SMB en el servidor | ||
- | |||
- | ==== Paso 1 - Desactivar SMBv1 ==== | ||
- | |||
- | === Clientes === | ||
- | |||
- | Los clientes pueden gestionarse mediante el script de inicio de sesión. El estado se puede consultar a través de Powershell (se requieren derechos de administrador) de la siguiente manera: | ||
- | |||
- | <code powershell> | ||
- | |||
- | SMBv1 también puede desactivarse mediante Powershell (se requiere reinicio): | ||
- | |||
- | <code powershell> | ||
- | |||
- | |||
- | === Servidor === | ||
- | |||
- | Los mismos comandos se aplican a los servidores. El reinicio debe programarse con antelación. | ||
- | |||
- | ==== Paso 2 - Activar opcionalmente la firma SMB en el lado del cliente ==== | ||
- | |||
- | En el siguiente paso se activa opcionalmente la firma SMB en el lado del cliente. Para ello puede establecerse una directiva de grupo global. | ||
- | Las directrices correspondientes se pueden encontrar aquí: | ||
- | |||
- | < | ||
- | Computerkonfiguration | ||
- | | ||
- | Sicherheitseinstellungen | ||
- | | ||
- | Sicherheitsoptionen | ||
- | </ | ||
- | |||
- | {{it-security: | ||
- | |||
- | Alternativamente, | ||
- | |||
- | <code reg> | ||
- | Windows Registry Editor Version 5.00 | ||
- | |||
- | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters] | ||
- | " | ||
- | " | ||
- | </ | ||
- | |||
- | ==== Paso 3 - Forzar la firma SMB en el servidor ==== | ||
- | |||
- | === Opción 1: mediante política de grupo === | ||
- | |||
- | <code text> | ||
- | Computerkonfiguration | ||
- | | ||
- | Sicherheitseinstellungen | ||
- | | ||
- | Sicherheitsoptionen | ||
- | </ | ||
- | |||
- | {{it-security: | ||
- | |||
- | === Opción 2: mediante Powershell === | ||
- | |||
- | == Recuperar estado == | ||
- | |||
- | <code powershell> | ||
- | Get-SmbClientConfiguration | select RequireSecuritySignature, | ||
- | Get-SmbServerConfiguration | select RequireSecuritySignature, | ||
- | </ | ||
- | |||
- | == Activar fuerza == | ||
- | |||
- | <code powershell> | ||
- | Set-SmbClientConfiguration -EnableSecuritySignature $true | ||
- | Set-SmbServerConfiguration -EnableSecuritySignature $true | ||
- | Set-SmbServerConfiguration -RequireSecuritySignature $true | ||
- | Set-SmbClientConfiguration -RequireSecuritySignature $true | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | Referencias | ||
- | |||
- | <sup> | ||
- | https:// | ||
- | </ | ||
- | |||
- | <sup> | ||
- | https:// | ||
- | </ |