Home > Articles > Operating Systems, Server > Microsoft Servers

NetBIOS and SMB-Based Vulnerabilities

NBT is the default network protocol in most built-in Windows NT network functions. This protocol consists of both the NetBIOS (the upper half) and the TCP/IP protocols (the lower half). NetBIOS serves as an abstraction layer in this arrangement. The NetBIOS protocol is used to communicate a considerable amount of information about the status of machines within the network, in particular the nature of processes and sessions running at this layer. Accordingly, this protocol can allow users and processes to query NetBIOS for information helpful in attacking Windows NT hosts and domains. Users with access to a Windows command line can, for example, initiate a node status query to discover information about other machines on the network. The data in the following example shows a data dump from a packet analyzer on a network in which an external user initiated a "wildcard query" (using the nbtstat -a command). Note that this query contains a string of 30 zeros followed by 2 zeros, the format used in NetBIOS names. The external user (possibly an attacker) is requesting that the target host dump its NetBIOS name table, a very dangerous request indeed.

"Flags""Frame", "Delta
Time", "Destination", "Source", "Protocol", "Summary"
"M",  1,    0, " [90.128.192.131]  ","[141.192.128.233]
","DNS","C ID=15 OP=QUERY
NAME=*<00000000000000000000000000000000><00>"
" ",  2,  1., 5121, "[90.128.192.131] ","[141.192.128.233]
","DNS","C ID=16 OP=QUERY
NAME=*<00000000000000000000000000000000><00>"
" ",  3,  1., 5108, "[90.128.192.131] ","[141.192.128.233]
","DNS","C ID=17 OP=QUERY
NAME=*<00000000000000000000000000000000><00>"

In addition, certain commands can allow unauthorized persons to attempt access to administrative shares (default shares set up for the convenience of administrators who must remotely access the systems they administer). Attackers must, however, guess the password of one administrator to successfully do so.


Protocol Analysis in Windows NT Networking

Monitoring network traffic in the Windows NT network environment is extremely important, both in troubleshooting and in discovering possible network-based attacks. You can, for example, use a packet-capture device to determine whether users have initiated NetBIOS status queries (as previously shown in Figure 3.9). Windows NT has a built-in packet-capture program, the Network Monitor (NM), that comes in two varieties. The simpler version comes with NT Server; it captures only the packets bound for the particular machine on which NM is installed. To install this version, open the Network Control Panel. Click on the Services tab at the top. Click Add. Scroll through the names of services that appear until you reach Network Monitor Tools and Agent, RefSeOK. There is also a Network Monitor Agent service. It is used by the Systems Management Server (SMS) version of Network Monitor to remotely capture data. Because of risks due to the potential for unauthorized access, it should not be installed unless there is a particular reason. Now reboot the server. Once NM is running, you need to go from Start to Programs to Administrative Tools to Network Monitor to see this output.

Another, more powerful version of NM comes with Microsoft's (SMS), a system administration tool that you can purchase. The SMS version can connect to remote computers running the Network Monitor Agent and capture data from there. This latter version is more useful for system administration purposes because it allows packet capture for a potentially wide range of hosts. It also unfortunately poses even greater possible security-related hazards because it allows anyone who obtains unauthorized access to it to view network traffic for potentially many machines on the network. Installing this version is more or less parallel to installing the simpler version except for several steps. You must, for example, find the right path in the SMS Distribution Kit. First locate the top-level SMS directory within this kit, then go down one level to the NMEXT subdirectory, then to your platform (Alpha or i386). Now invoke SETUP.EXE (path: SMS_TOP_DIRECTORY\NMEXT\I386\SETUP.EXE. Next start the Network Monitor Agent by clicking on Network, Services, Network Monitor Agent, Start, OK. Now reboot the SMS server. After installation, you can find Network Monitor Tools in Network Analysis Tools and the Network Monitor Agent in your system's Control Panel. You must also install the Network Monitor Agent on all computers for which you want to obtain packet dumps. You must then start the capture capability for each of these computers from Network Monitor's Capture menu. Finding the specific capture file for each computer may not be trivial. Choose the Find All Names option from the Capture menu to set the computer name that goes with each particular IP and MAC address. To read the logs for the first time, you may also have to experiment a bit by selecting a variety of different names from the Capture menu until you discover the particular log for each system that runs the Network Monitor Agent.

Regardless of which version of NM you choose to run, several critical security considerations apply. Having NM packet dumps fall into the wrong hands enables a perpetrator to potentially obtain passwords (some or all of which may be clear text) and data transmitted across the network. Clear text passwords traversing any network pose a high level of security risk because anyone who captures them can use them to illegally log on to systems. You should, therefore, ensure that permissions on your SMS console allow access of any kind only to SMS administrators.

Note that you need to do more than just run a program or suite of programs to capture network traffic. Remember, too, that NM is only one of many available options for dumping packets. Other alternatives include NetXRay by Network General, Surveyer by Shomiti, LANDecoder by Triticom, Observer by Network Instruments, EtherPeek by AG Group, and many others.


NetBIOS Solutions

Although piecemeal solutions that control against certain types of unauthorized access exist, no effective, comprehensive solutions for controlling NetBIOS vulnerabilities currently exist. Consider one solution—disabling the bindings between the TCP/IP and NetBIOS layers of networking. To disable these bindings, bring up the Control Panel, double-click on Network, and then click on the Bindings tab. The screen shown in Figure 3.9 displays. To disable NetBIOS over TCP/IP, click the plus sign next to NetBIOS Interface, select WINS Client (TCP/IP), and then click the Disable button. This effectively eliminates the possibility of a long-range attack that exploits weaknesses in NetBIOS, but again at a cost. Disabling these bindings interferes with services such as share access in wide area networking because the NetBIOS protocol (which is not a particularly good wide area protocol) depends on the underlying TCP and IP layers (both of which are well suited for wide area transmissions) in wide area networking.

Figure 3.9
Network panel.

Consider a second solution, the Policy Editor, a tool in the Windows NT 4.0 Resource Kit that disables all Administrative Shares.

Consider yet another solution: disabling the administrative shares.12 To disable these shares on a server, set the following Registry value:

    Hive: HKEY_LOCAL_MACHINE

    Key: System\CurrentControlSet\Services\LanmanServer\Parameters

    Value: AutoShareServer

    Type: REG_DWORD

    Data: 1 (default) to create these shares, 0 to disable them.

On workstations, the procedure is the same, but the eegistry value is named AutoShareWks instead.

Disabling these shares, however, is in general not advisable because doing so is likely to cause severe disruption or at least inconvenience in system administration activities. Several commercial backup utilities, for example, require remote access to systems via Administrative Shares as they back-up systems. In short, no genuinely suitable solutions for most environments currently exist. Until Microsoft discontinues basing its implementation of Windows NT networking on the NetBIOS API (something that Windows 2000 does), security-related concerns with NetBIOS-related vulnerabilities will continue to be a source of worry.

Problems with SMB/CIFS

Microsoft calls its implementation of SMB the Common Internet File System. The following are some of the most serious types of SMB/CIFS related vulnerabilities and the ways these vulnerabilities could be exploited:

  • A perpetrator may repeatedly attempt to gain access to a share even though denied access—the perpetrator may get share access anyway! Flooding a server with share requests can cause it to become so overloaded that it fails to process some of them normally.

  • An attacker may break out of the share constraints that exist to gain access to the whole volume, even though the share attaches to a lower point than the root of the volume. This attack, commonly called a "dotdot" attack, requires that the perpetrator repeatedly use the command line (to enter cd.., then cd.., and so forth, repeatedly) after a TID connect is in place to gain access to a higher point in the file system than the TID specifies. SMB/CIFS-based connection mechanisms may ignore the TID if users repeatedly attempt to gain access to another point in the file system.

  • Someone may exploit differences in naming conventions among compatible operating systems to attempt to gain access to files for which access is not allowed.13 The trick here is initiating an SMB degradation attack in which the client is an older release of Windows or runs a malicious routine that convinces the server that the client understands only a very primitive SMB dialect. The server assumes that the client understands only the 8.3 file naming convention. An attacker must now own one or more file(s) within the same directory or subdirectory that holds a file to which the attacker desires unauthorized access. The attacker may be able to use a command line to access a file that begins with the same 8 characters and has the last 3 character extension as the file to which the attacker has access, even though the file to which the attacker has access and the target file do not have the same name when the extended (256-character5 character) naming convention is used. For example, the target file's name could be MARKETING.XCL and the file owned by the attacker could be MARKETINXXX.XCL. The particular file that the attacker tor access is now a matter of chance; the attacker may now be considered the owner of the target file because of confusion over the naming convention used!

  • A perpetrator can replay the SMB/CIFS connection creation sequence from a bogus client. If the attacker can do this soon after this sequence is captured through use of a packet-capture device or program, the target server may not be able to detect whether this sequence is from a legitimate client.14

  • Someone may forge SMB/CIFS request packets. The server will create a TCP session because it does not check the identity of the client.

  • An attacker may gain access to shares that currently exist or that have existed recently (even though the share is to another user ID). The relatively primitive conventions involved in CIFS-based networking allow someone to break in to an existing connection and take it over.

  • Someone can access resources as an anonymous user through a null session, as exemplified by the mechanisms used by a program called Red Button. Red Button sets up a null session to a designated host, and then exploits the fact that the anonymous user is by default a member of the Everyone group on the target host to read certain key values from the Registry on that machine.

  • Someone can send an incorrect IP address but correct computer name to allow rogue hosts to access resources on CIFS servers. Remember, these servers do not check the IP address of clients before creating a session for the client.

  • A malicious user may attempt to abuse weaknesses in the CIFS implementation of the SMB protocol to cause denial-of-service. A fairly recent vulnerability of this type results from the way Windows NT Server 4.0 processes SMB logon requests. A perpetrator who does not even have an account on a target system can send an authentication request with SMB packets that contain illegal values. The victim host that receives these packets processes the authentication request anyway, but the illegal data corrupt memory in the kernel. One of two errors typically results:

      STOP 0x0000000A

      or

      STOP 0x00000050

The server now will either reboot or hang displaying the notorious Blue Screen of Death. Microsoft has developed and distributed a patch for this bug; the patch is incorporated into Service Pack 4 (but not 3). This vulnerability illustrates only one of a wide range of vulnerabilities of this nature.

How Serious Are SMB Vulnerabilities?

At the time this chapter is being written, the exposures resulting from Windows NT's implementation of SMB in many respects constitute the most serious type of Windows NT security-related vulnerability. The basic problem is that many Windows NT network mechanisms and protocols incorporate too many legacy negotiation and connection methods. The fact that the client for the most part drives the level of security in SMB connectivity is also a serious concern. The resulting exposures potentially allow unauthorized users to remotely obtain copies of critical objects, including the SAM database, proprietary applications, business-critical data, and the like, stored on any Windows NT Server. The sheer potential for denial-of-service is, however, probably the most serious concern in many operational environments.

Chapters 6 and 7 discuss solutions for SMB- and NetBIOS-based vulnerabilities. Many of these solutions involve adopting fundamental network security measures.

Future Solutions

The next release of Windows NT (Windows 2000) incorporates Kerberos, a powerful tool that controls against unauthorized access through use of encryption. Kerberos in and of itself may, however, not solve the entire threat of unauthorized file access using SMB-based exploitation methods because Kerberos does not provide protection at the level of underlying protocols. Chapter 10, "Workstation Security," explores this and related topics in greater detail.


  1. When Windows NT boots, it automatically creates certain "administrative" shares. These are so named because they are only available to administrators and are used for administrative purposes. Administrative shares are created for the %systemroot% directory, as well as for all hard drives.

  2. A Solution for this problem is to disable 8.3 naming by making a Registry change described in Chapter 6.

  3. Fixed in Service Pack 3, with the SMB signing feature

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020