Windows NMAP “refresh_hostbatch: Failed to determine dst MAC address for target” error

The “refresh_hostbatch: Failed to determine dst MAC address for target” is a long standing error in NMAP for Windows, and will still be there for a while.

The error appears usually if you are trying to scan an ip address from the same network with the MAIN IP on your scan machine. Try to scan a www.anywebsite.net address. If you get no error, read on.

There are a few fixes available:
1)      If you do not have access to “Network settings” on your Windows machine, you may add the “–unprivileged” parameter to your NMAP command line. This will not work for the raw modes, but it will give you at least quick access to basic scan.

2)      You may add another IP Address to your local machine, as FIRST IP. On Windows XP go to Start->Control Panel->Network connections->Right click on “Local area connection(or whatever name you may have for)”->Properties->Internet Protocol(TCP/IP)->Properties->Advanced. Here, add an IP address form another bogus network you are not using on your Lan (like 10.125.120.100/255.255.255.0). You may need to delete the main IP and add it after the bogus one. The trick is that, if you type ipconfig in your console, you should see the bogus IP first, the main IP address second.

It looks like NMAP is confused by some things in Windows, and one of those things are the IP addresses in the same broadcast domain.

Enjoy the dirty trick, and, if NMAP developers are reading this, they will definitely know what to do in order to fix it 😉

Leave a Reply

Your email address will not be published. Required fields are marked *