Thursday, March 31, 2011

nbnspoof.py on BackTrack 4 R2

This morning I ran into a little bit of trouble when I decided that I wanted to play around with NetBIOS Name Service Spoofing on BackTrack. I wanted to use the tool nbnspoof.py, but found that it was not included with the BackTrack distribution.

So the first thing I needed to do was download the software, which was pretty simple. You can find the link here.

I ran into two problems when I tried to run it. The first was an input error. No matter what I typed at the command line, it would display the usage() message and exit. I had to dive into the source code a bit, but I figured out that the regular expression that you send it needs to be included in quotes.

The second problem I needed a little extra help with. After I figured out how to make the program accept my input, it would error out with: NameError: global name 'sniff' is not defined

I tried many tricks to figure this one out, but ultimately my man @timmedin hooked me up with the fix. I needed to change line 17 of the script from
from scapy import *
to
from scapy.all import *

That's it. Then it worked as expected. Thanks for the help, Tim.

1 comment:

enteptain said...

thanks!!! it fixed wpspy.py and wifinger.py AND wpscan.py all at once!!!