Skip to main content

Disable NetBIOS

NetBIOS an acronym for Network Basic Input/Output System. It provides services related to the session layer of the OSI model allowing applications on separate computers to communicate over a local area network. As strictly an API, NetBIOS is not a networking protocol. [Reference:http://en.wikipedia.org/wiki/NetBIOS]

Risks of NetBIOS:
1)NetBIOS Null Session Enabled: A NetBIOS null session allows users to connect to a host remotely with no username and password and perform a limited set of administrative tasks. Null sessions allow the remote user to gather information such as:
1. List users
2. List groups
3. List shares (including hidden shares)
4. Policies (such as minimum password length, etc.) While the enumerated information is not an immediate risk, much of the information can be leveraged to launch an attack to gain user or administrative privilege. All steps should be taken to eliminate the vulnerability and/or reduce the information available to the attacker.

2)NBTSTAT : All Microsoft Windows platforms include support for the NetBIOS network protocol stack. The NetBIOS protocol provides the underlying support for Microsoft Windows file and resource sharing. One component of all Microsoft Windows NetBIOS implementations is the NetBIOS Name Service. The NetBIOS Name Service listens for name service requests on UDP port 137. It can be queried to retrieve a listing of currently logged in user accounts and groups. In addition, the MAC address for the network interface over which the query is performed is included in the response to a nbtstat -A request.
The DOS nbtstat command can be used to perform this operation.
To do so, open a DOS command prompt and run the following command: nbtstat -A target_system Where target_system is the IP address or hostname of the target system.
See the picture below:

It shows that the Sharing is enabled on the target machine-see the code <20>. The attacker can now use other similar commands to get access to the shared resource:
net view \\target-ip

It will list down all the shared resources on the remote machine. Now you can map them to your own disk:
net use K: \\target-ip\shared-resource-name

Now the shared resource on the remote machine is shared on your machine with Drive letter K:


The content of the shared resource is available to you. You can browse them as they are on your own computer. As the NetBIOS is not a big issue on LAN, it may be big risk if your PC is connected over WAN.
Blocking NetBIOS on the system can be done one of three ways: [Reference: Cisco.com]

1) Use a network router upstream from the affected system to block TCP port 139 and port 445 to your network.

2) Use a software firewall on the affected system and block TCP port 139 and TCP port 445.

3) Disable 'WINS TCP/IP Client' bindings in Windows NT or Windows 2000.

How to disable NetBIOS:

To disable NetBIOS in Windows XP:
a)Click ‘Start’ from the Start Menu
b)Go to ‘Control Panel’
c)Go to ‘Network Connections’
d)Click on the interface for you wish to disable Netbios
e) Select Internet Protocol (TCP/IP) and then the Properties button.
f) Now select the Advanced button.
g) Then click on the WINS tab.
h) From there, click Disable NetBIOS over TCP/IP.
i) Click Ok 2 times after you've finished making your changes and restart as requested.

To disable NetBIOS in Windows 2000:
a) Click 'Start' from the Start Menu
b) Click 'Settings'
c) Click 'Network and Dialup Connections'
d) Click on the interface for you wish to disable Netbios
e) Select the 'Internet Protocol (TCP/IP) component
f) Select 'Properties'
g) Click the 'Advanced' button
h) Select the 'WINS' tab
i) Click 'Disable Netbios over TCP/IP'
j) Click 'OK'

To disable NetBIOS in Windows NT 4.0:
a) Click 'Start' from the Start Menu
b) Click 'Settings'
c) Click 'Control Panel'
d) Double click on 'Network'
e) Click on the Bindings tab
f) Under 'Show Bindings for:' select 'all adapters'
g) Find the network card you wish to disable Netbios for and expand it
h) Select 'WINS Client (TCP/IP)', and hit the 'Disable' button
I) Then reboot for the change to take effect


Comments

Popular posts from this blog

File Upload through Null Byte Injection

Sometimes, during file upload we come across situation wherein there would be check on the file extension at the client side as well as server side too. If the application does allow only .jpeg extension to be uploaded, the client side java script checks for the extension of the file before passing the request. We all know that how easily this can be defeated. Some applications, checks for the extension at the server side also. That's not easy to bypass. However there are some ways with which it still can be bypassed. Most of server side scripts are written in high level languages such as Php, Java etc who still use some C/C++ libraries to read the file name and contents. That leads to the problem. In C/C++ a line ends with /00 or which is called Null Byte. So whenever the interpreter sees a null byte at the end of the a string, it stops reading thinking it has reached at the end of the string. This can be used for the bypass. It works for many servers, specially php servers. T...

'Information Leakage-Improper Error Handling' dropped

From Owasp Top 10 2010 List, the issue 'Information Leakage-Improper Error Handling' has been dropped. But it's not the final list,its child release actually. Bu I feel it shouldn't be set aside because its still the one of the prevalent issues these days. That's why I mailed to Dave Wicher: Hi Dave, Excellent work, Congrats! Just one little query- Don't you think that Information Leakage & Improper Error Handling still deserves to be in Top 10? Dave replied: This topic is clearly a very prevalent issue that deserves attention by most organizations. However, the typical impact of such a flaw is usually very low. Therefore, the overall risk of this type of flaw is lower than the other items in the top 10, which is why it was replaced in this update with one of the 2 new items. Regarding dropping Info Leak/Error handling - It is incredibly prevalent, no question. But their impact is typically very low, so the overall risk is low, which is why it fell out of t...

jtool - an alternative to otool

jtool comes with a capability of running on Linux environment. Some ipa scanning tools are created to run on Linux environment where mac environment is not available. In such cases tools such as otool and class-dump-z will not work. So jtool can be an alternative to otool. For more information on jtool please refer to http://www.newosxbook.com/tools/jtool.html . It lists down various commands which have same output as otool or a equivalent. There are several commands mentioned in link. But for our customized requirements and basis checks I have listed down the below ones after running on many binaries. The outputs are similar or equivalent to otool and class-dump-z: Commands for checking PIE flag (ASLR) in jTool jtool -d -v -arch | grep stack ·           Automatic Reference Counting (ARC) protection: jtool -d -v -arch | grep _objc_release ·           To check if the devic...