11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 16: Securing Your <strong>Web</strong> Server 441For information about how to harden the TCP/IP stack see “How To: Harden theTCP/IP Stack” in the “How To” section of this guide.Disable NetBIOS <strong>and</strong> SMBDisable all unnecessary protocols, including NetBIOS <strong>and</strong> SMB. <strong>Web</strong> servers do notrequire NetBIOS or SMB on their Internet-facing network interface cards (NICs).Disable these protocols to counter the threat of host enumeration.Note The SMB protocol can return rich information about a computer to unauthenticated usersover a Null session. You can block null sessions by setting the RestrictAnonymous registry key asdescribed in “Step 9. Registry.”Disabling NetBIOSNetBIOS uses the following ports:● TCP <strong>and</strong> User Datagram Protocol (UDP) port 137 (NetBIOS name service)● TCP <strong>and</strong> UDP port 138 (NetBIOS datagram service)● TCP <strong>and</strong> UDP port 139 (NetBIOS session service)Disabling NetBIOS is not sufficient to prevent SMB communication because if ast<strong>and</strong>ard NetBIOS port is unavailable, SMB uses TCP port 445. (This port is referredto as the SMB Direct Host.) As a result, you must take steps to disable NetBIOS <strong>and</strong>SMB separately. To disable NetBIOS over TCP/IPNote This procedure disables the Nbt.sys driver <strong>and</strong> requires that you restart the system.1. Right-click My Computer on the desktop, <strong>and</strong> click Manage.2. Exp<strong>and</strong> System Tools, <strong>and</strong> select Device Manager.3. Right-click Device Manager, point to View, <strong>and</strong> click Show hidden devices.4. Exp<strong>and</strong> Non-Plug <strong>and</strong> Play Drivers.5. Right-click NetBios over Tcpip, <strong>and</strong> click Disable.This disables the NetBIOS direct host listener on TCP 445 <strong>and</strong> UDP 445.Disabling SMBSMB uses the following ports:● TCP port 139● TCP port 445To disable SMB, use the TCP/IP properties dialog box in your Local AreaConnection properties to unbind SMB from the Internet-facing port.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!