The information in this article applies to:
SYMPTOMS
On your computer running the TCP/IP protocol and connected to the
Internet, some or all network services are rendered unavailable and error
messages such as the following appear on the network client screen:
This symptom of all network services being rendered unavailable may also occur on a computer running an operating system other than Windows NT, for example, UNIX. CAUSE
Your computer has become the target of a malicious attack known as TCP/IP
"SYN Flooding" or "SYN Attacks."
How SYN Flooding WorksSYN Flooding works as follows: (see also CERT(sm) Advisory CA-96.21 at ftp://info.cert.org/pub/cert_advisories)
How to Verify Your Computer is Under a SYN AttackIf you suspect that your computer is the target of a SYN attack, you can type the following command at a command prompt to view connections in the "SYN_RECEIVED" state:netstat -n -p tcp This command may cause the following text to appear on your screen: Active Connections
If a large number of connections are in the SYN_RECEIVED state, it is possible that the system is under attack. A network analyzer can be used to track the problem down further, and it may be necessary to contact your Internet Service Provider for assistance in attempting to trace the source. The effect of tying up connection resources varies, depending upon the TCP/IP stack and applications listening on the TCP port. For most stacks, there is a limit on the number of connections that can be in the half-open (SYN_RECEIVED) state. Once the limit is reached for a given TCP port, the target computer responds with a reset to all further connection requests until resources are freed. RESOLUTION
Obtain the following update for Windows NT 3.51 or the latest Service Pack
for Windows NT 4.0
A new version of Tcpip.sys has been produced that allows control of the number of times a response to a TCP connection request (SYN-ACK) will be retransmitted. Control is handled through a new registry parameter:
The default value for this parameter is now 3. The following table shows Windows NT 4.0 TCP/IP behavior for various values of this parameter:
This parameter changes the default time that it takes to clean up a half- open TCP connection from 189 seconds to 45 seconds, and provides more granular control to the administrator. A site that is under heavy attack might set the value as low as "1". A value of "0" is also valid; however if this parameter is set to 0, SYN-ACKs will not be retransmitted at all, and will time out in 3 seconds. With the value this low, legitimate connection attempts from distant clients may fail.
NetBT (NetBIOS over TCP/IP) uses TCP port 139 and is used by Microsoft Network Services such as file and print sharing. Version 3.51 and 4.0 NetBT has a "backlog" of connection blocks available that is two plus an incremental number depending on the NetBT clients (such as the redirector, server, and any NetBIOS applications running). On a typical server, this number will be 7-11. A new version of NetBT has been produced that automatically allocates more connection blocks as needed, in a configurable manner. On a connection event, it now checks to see if the number of free blocks is below 2, and if so, adds an "increment" number of blocks, where "increment" is configurable in the registry as shown here:
Each connection block consumes 78 bytes of memory. The total number of connection blocks that can be allocated by NetBT is also registry configurable:
MaxConnBackLog defaults to 1000, but can be set as high as 40,000. Connection blocks are "scavenged," or recycled, when the SYN-ACK retransmission timer expires and TCP fails the connection attempt.
Windows Sockets applications such as ftp servers and web servers have their connection attempts handled by Afd.sys. Afd.sys has been modified to support large numbers of connections in the "half-open" state without denying access to legitimate clients. This is accomplished by allowing the administrator to configure a dynamic backlog. The new version of Afd.sys supports four new registry parameters that can be used to control the dynamic backlog behavior. EnableDynamicBacklog is a global switch to enable or disable dynamic backlog. It defaults to 0 (off), and this setting provides no change from the existing versions. Setting it to 1 enables the new dynamic backlog feature.
MinimumDynamicBacklog controls the minimum number of free connections allowed on a listening endpoint. If the number of free connections drops below this value, then a thread is queued to create additional free connections. This value should not be made too large, as the dynamic backlog code engages whenever the number of free connections falls below this value. Too large a value may lead to a performance reduction.
MaximumDynamicBacklog controls the maximum number of "quasi-free" connections allowed on a listening endpoint. "Quasi-free" connections include the number of free connections plus those connections in a half- connected (SYN_RECEIVED) state. No attempt is made to create additional free connections if doing so would exceed this value.
DynamicBacklogGrowthDelta controls the number of free connections to create when additional connections are necessary. Be careful with this value, as a large value could lead to explosive free connection allocations.
MaximumDynamicBacklog, To take advantage of the changes to Afd.sys, Windows Sockets applications must specifically request a backlog greater than the value configured for MinimumDynamicBacklog when they issue their listen() call. Microsoft applications such as Internet Information Server (which has a default backlog of 25) are configurable. Application-specific details are available from the Microsoft Knowledge Base at http://www.microsoft.com/kb. The modified drivers for Windows NT and instructions for installing them are available from Microsoft support channels or directly from the following Internet locations: For Windows NT 3.51: ftp://ftp.microsoft.com/bussys/winnt /winnt-public/fixes/usa/nt351/hotfixes-postsp5/syn-attack STATUSWindows NT 4.0This problem has been corrected in the latest Microsoft Windows NT U.S. Service Pack for Windows NT 4.0. For information on obtaining the Service Pack, query on the following word in the Microsoft Knowledge Base (without the spaces):S E R V P A C K Windows NT 3.51Microsoft has confirmed this problem could result in some degree of security vulnerability in Windows NT version 3.51. A fully supported fix is now available, but it has not been fully regression tested and should only be applied to systems determined to be at risk of attack. Please evaluate your system's physical accessibility, network and Internet connectivity, and other factors to determine the degree of risk to your system. If your system is sufficiently at risk, Microsoft recommends you apply this fix. Otherwise, wait for the next Windows NT service pack, which will contain this fix. Please contact Microsoft Technical Support for more information.Additional query words: CERT hack flood denial of service attack
Keywords : kbnetwork nttcp NTSrv |
Last Reviewed: February 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |