Nmap Development mailing list archives

Re: [NSE + NSELib] Netbios and SMB [stable!]


From: Sven Klemm <sven () c3d2 de>
Date: Sat, 13 Sep 2008 11:30:01 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ron,
|
| I've spent the last week or two working on a NetBIOS and SMB library.
| Finally, as of right now, I have a stable version that's documented,
| clean, and works against every system I tried it on (with a minor
| exception -- I'll talk about it below). So, with that, I'm submitting it
| to be tested/beaten up as a real script.
|
| I included two nselib libraries:
| - smb.lua
| - netbios.lua
|
| And four scripts:
| - nbstat.nse (enhanced version of the current one)
| - smb-os-discovery.nse (makes netbios-smb-os-discovery.nse obsolete)
| - smb-security-mode.nse
| - smb-enum.nse
|
| I am going to start working on new functionality over the next few
| weeks, but as of right now it's useful and works, so it seems like a
| good place to submit it.
|
| The only time it DOESN'T work is against hosts with a specific firewall
| configuration -- if ports 445 and 137 are blocked, but 139 is allowed
| through, it will have trouble establishing a session. A couple tricks
| are tried (using the generic '*SMBSERVER' name, and using the reverse
| DNS name), but if those don't work it fails. I'm going to look for a way
| to fix that, but I'm not sure if it's possible short of asking the user
| for the server's name.
|
| I also included
| * Debug output if -d or -d -d are on (using stdnse library)
| * Used Mutexes to help control connections (SMB doesn't like having
| multiple connections from the same ip at the same time)
| * nsedocs for every file/script/function
| * Heavy use of 'bin' and 'bit' libraries for building packets
|
| I should also say, thanks to those who've been working on those
| libraries before me. Thanks to all the pre-written bits, this came
| together incredibly fast and with little pain!
|
| So yeah, comments are greatly appreciated!
|
| Ron
|
| PS: One of the next things I'd like to add is the ability to log into
| SMB proper, with a user-submitted username/password. But first, I need
| somebody to enhance OpenSSL bindings for Lua. Takers? :)

What exactly do you need? I just added MD2, MD4, MD5, SHA1 and
RIPEMD160 to the openssl bindings. I am willing to add anything else
you might need.

Cheers,
Sven


- --
Sven Klemm
http://cthulhu.c3d2.de/~sven/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjLiBkACgkQevlgTHEIT4ZxVACeKoSwuG5POlw5BSF2kRWca9KI
EDIAn0oPf9pG0b9iyk2viJCvyzZq39i6
=TmHq
-----END PGP SIGNATURE-----

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: