While the SYN SCAN may not be completely prevented but one can always reduce the impact of the SYN flooding attacks by using iPolicy Networks IPS detection mechanism and by hardening the host’s TCP/IP stack.
WINDOWS OS:
The most important parameter in windows 2000 and windows 2003 is "synAttackProtect". Add this DWORD parameter to the following registry key
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
When a SYN attack is detected, this parameter changes the behavior of the TCP/IP stack. The recommended value for this DWORD parameter is 2, which additionally delays the indication of a connection to the Windows socket until the three-way handshake is completed.
If "SynAttackProtect" is set to 1, the number of retransmissions is reduced and the creation of a route cache entry is delayed until a connection is made.
Enabling these parameters does not change the stack behavior until a SYN flood occurs. But even then when it starts to operate we are able to handle legitimate connection.
Also the operating System protects against the SYN attack whenever the "TcpMaxHalfOpen", "TcpMaxHalfOpenRetried" and "TcpMaxPortsExhausted" parameters values are exceeded.
This parameter needs to be added at the following location:
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
TcpMaxHalfOpen
"TcpMaxHalfOpen" parameter specifies maximum number of SYN_RECEIVED States, which can be handled before SYN Protection Starts Working.
Recommended Values
Windows 2000 100
Windows 2000 Advance Server 500
Windows 2003 200
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
TcpMaxHalfOpenRetried
"TcpMaxHalfOpenRetried" specifies the maximum number of half open connection for which the OS sends at least one retransmission.
Recommended Values
Windows 2000 80
Windows 2000 Advance Server 400
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
TcpMaxPortsExhausted
"TcpMaxPortsExhausted" specifies the number of dropped SYN request, after which the protection against the SYN attack starts.
Recommended Value 5 |