Windows 2000 SYN Flood Registry Hardening
This article explains how Microsoft Windows 2000 mitigates TCP SYN flood denial-of-service (DoS) attacks by tuning the native TCP/IP stack via the Windows Registry. In Windows 2000, the operating system includes built-in detection mechanisms designed to identify when half-open TCP connections exceed safe thresholds. By adjusting specific parameters in the registry, system administrators can lower timeout values, reduce SYN-ACK retransmissions, and delay resource allocation until the three-way handshake completes, effectively hardening the server against network resource exhaustion.
The Mechanism of SYN Flood Attacks
A SYN flood exploits the standard TCP three-way handshake. A remote
client sends a continuous stream of TCP SYN packets with spoofed source
addresses. The host server responds with a SYN-ACK packet and reserves
resources in memory, waiting for the final ACK packet in a
SYN_RECEIVED state. Because the spoofed source never
replies, the server's connection state tables eventually saturate,
preventing legitimate users from establishing connections.
Windows 2000 SYN Attack Detection
Windows 2000 implements native SYN attack defense within the core
TCP/IP driver (Tcpip.sys). When the driver senses an
abnormally high volume of connections in the SYN_RECEIVED
state, it switches from standard operation into an attack mitigation
state. In this state, Windows alters how it handles half-open
connections by bypassing typical socket creation steps and reducing
retransmission intervals until normal traffic levels resume.
All mitigation settings are configured under the following registry path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Key Registry Parameters for Hardening
To harden Windows 2000 against SYN floods, administrators must create
or modify several REG_DWORD values.
1. SynAttackProtect
SynAttackProtect is the primary switch that controls the
built-in SYN attack protection behavior.
- Path:
...\Tcpip\Parameters\SynAttackProtect - Data Type:
REG_DWORD - Values:
0: Protection disabled. Standard TCP timeouts apply.1: Moderate protection. The system reduces SYN-ACK retransmissions and delays route-cache entry creation when an attack is detected.2: Aggressive protection (Recommended). In addition to level 1 behaviors, the stack delays indication to the network transport driver (TDI) until the full three-way handshake completes. This ensures that memory structures are not allocated for half-open sockets.
2. TcpMaxConnectResponseRetransmissions
This parameter controls how many times Windows 2000 retransmits a SYN-ACK before dropping a half-open connection.
- Path:
...\Tcpip\Parameters\TcpMaxConnectResponseRetransmissions - Data Type:
REG_DWORD - Default:
3(transmits roughly over 45 seconds) - Recommended Value:
1or2 - Impact: Lowering this value ensures that abandoned connections are evicted from the backlog queue rapidly, freeing up system resources.
3. Threshold Trigger Parameters
Windows 2000 uses three primary metrics to determine when an attack
is underway and automatically trigger SynAttackProtect.
TcpMaxHalfOpen
- Data Type:
REG_DWORD - Description: The total number of connections
allowed in the
SYN_RECEIVEDstate before attack mode is initiated. - Typical Values:
100on Windows 2000 Server;500on Windows 2000 Advanced Server.
- Data Type:
TcpMaxHalfOpenRetried
- Data Type:
REG_DWORD - Description: The number of half-open connections that have undergone at least one SYN-ACK retransmission before attack mode is activated.
- Typical Values:
80on Windows 2000 Server;400on Windows 2000 Advanced Server.
- Data Type:
TcpMaxPortsExhausted
- Data Type:
REG_DWORD - Description: The number of dropped connection requests caused by a lack of open ports before attack protection triggers.
- Default:
5
- Data Type:
Applying the Changes
To apply these settings:
- Open the Registry Editor (
regedt32.exeorregedit.exe). - Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters. - Add or modify the
REG_DWORDvalues according to network capacity and security requirements. - Restart the operating system to load the modified TCP/IP stack configuration.