APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS














(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Testing for Conficker with Nmap


2009/04/29

The latest nmap release can test Windows machines for Conficker infection. If you are running Linux, nmap may already be installed. You can download the latest nmap for OS X from http://nmap.org/book/inst-macosx.htm. You actually get more more than nmap with the .dmg: it also includes Zenmap (an X11 nmap), Ncat (good old netcat), and Ndiff (compares nmap scans). I briefly fired up Zenmap but used the command line tool for everything you'll see here.

For Linux or OS X you could also compile from source.



You need the very latest version to get the scripts that will check for Conficker. The version I used here was 4.85BETA8.

You will need to disable firewalls and security suites on the Windows machine to be checked. For absolute safety, that would mean disconnecting the machines from any external network as you'd potentially be exposed while this was shut off.

The XP machine I used here had Norton Antivirus installed, which includes an "Internet Worm Protection" component that will cause the Conficker check to fail:

nmap -PN -T4 -p139,445 -n -v --script=smb-check-vulns --script-args safe=1 192.168.1.2

Starting Nmap 4.85BETA8 ( http://nmap.org ) at 2009-04-29 16:19 EDT
NSE: Loaded 1 scripts for scanning.
Initiating Connect Scan at 16:19
Scanning 192.168.1.2 [2 ports]
Completed Connect Scan at 16:19, 2.00s elapsed (2 total ports)
NSE: Script scanning 192.168.1.2.
NSE: Script Scanning completed.
Host 192.168.1.2 is up.
Interesting ports on 192.168.1.2:
PORT    STATE    SERVICE
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds

Read data files from: /usr/local/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 2.21 seconds
 

If I scan that machine with a normal "nmap 192.168.1.2", the scan will be detected and the scanning machine will be blocked from all access for 30 minutes. Attempting to run the Conficker script after that will usually just get you a hang.

However, with the Worm protection turned off, the scripts can tell us that this machine is clean:

nmap -PN -T4 -p139,445 -n -v --script=smb-check-vulns --script-args safe=1 192.168.1.2

Starting Nmap 4.85BETA8 ( http://nmap.org ) at 2009-04-29 16:38 EDT
NSE: Loaded 1 scripts for scanning.
Initiating Connect Scan at 16:38
Scanning 192.168.1.2 [2 ports]
Discovered open port 445/tcp on 192.168.1.2
Discovered open port 139/tcp on 192.168.1.2
Completed Connect Scan at 16:38, 1.10s elapsed (2 total ports)
NSE: Script scanning 192.168.1.2.
NSE: Starting runlevel 2 scan
Initiating NSE at 16:38
Completed NSE at 16:38, 0.18s elapsed
NSE: Script Scanning completed.
Host 192.168.1.2 is up (0.00042s latency).
Interesting ports on 192.168.1.2:
PORT    STATE SERVICE
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

Host script results:
|  smb-check-vulns:  
|  MS08-067: Check disabled (remove 'safe=1' argument to run)
|  Conficker: Likely CLEAN
|_ regsvc DoS: Check disabled (add --script-args=unsafe=1 to run)

Read data files from: /usr/local/share/nmap
Nmap done: 1 IP address (1 host up) scanned in 1.56 seconds
 

If you are going to scan your entire network all at once, see How to use Nmap to scan very large networks for Conficker. However, remember that each of those machines probably has something running to prevent that, so it's not going to be all that easy usually.

Of course I also scanned the entire local network out of idle curiosity. Everything was as I expected except for these two machines:

Interesting ports on IP-STB1.home (192.168.1.100):
Not shown: 999 closed ports
PORT     STATE SERVICE
8082/tcp open  blackice-alerts

Interesting ports on IP-STB3.home (192.168.1.102):
Not shown: 999 closed ports
PORT     STATE SERVICE
8082/tcp open  blackice-alerts
 

Huh? What the heck are those? I had a moment of confusion until I realized that STB stands for "Set Top Box". Those are my Verizon TV boxes. It's interesting that they appear to be running a Black-Ice firewall. I wonder if my scan tripped any alarms?


;


Click here to add your comments





Wed Apr 29 23:54:34 2009: Subject:   drag

gravatar
"""
Huh? What the heck are those? I had a moment of confusion until I realized that STB stands for "Set Top Box". Those are my Verizon TV boxes. It's interesting that they appear to be running a Black-Ice firewall. I wonder if my scan tripped any alarms?
"""

I really doubt that the people that work on those crappy set-top boxes are really up to that level of sophistication.

Point your telnet or browser at that port and see what happens.



Thu Apr 30 00:43:47 2009: Subject:   TonyLawrence

gravatar
Well, somewhere somebody has to be concerned about network security.. :-)



Thu Apr 30 14:20:58 2009: Subject:   jtimberman

gravatar
While scanning your home network is a great idea, if you're in a company environment, be careful about scanning systems. Make sure you have written permission from someone with authorization to permit such scans. Nmap scans can cause wild things to happen. In some cases, printers will spit out reams of paper or applications will stop responding. You'll need to disclaim liability for that.




Thu Apr 30 15:49:47 2009: Subject:   TonyLawrence

gravatar
Yes, good point. There have been times when I really could have used a nmap scan but went without it because I couldn't find the right people to approve it.

Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

numly esn 42680-090429-343941-13
numly barcode

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server




pavatar.jpg
More:
       - Security
       - Microsoft
       - Linux
       - MacOSX


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress