Nmap Development mailing list archives

Hoping to merge my nmap-exp branch soon


From: Ron <ron () skullsecurity net>
Date: Wed, 30 Sep 2009 16:24:26 -0500

Hi all,

I've worked for awhile on revamping my SMB code, and it's been pretty stable since I've written it (a month or so, I would estimate). I've implemented some pretty large scripts in it that aren't quite done yet, but all my old scripts should be functioning as normal.

On the surface, the changes aren't huge. The primary one is how accounts are handled -- previously, the list of accounts, and choosing which one to use, was a bit of a hackjob. Now, however, I store it as a list, and give priority to higher-level accounts (administrator) and less priority to, say, guest accounts.

The other major change is adding the concept of 'overrides' to the packet-building functions, which I experimented with, successfully, in dhcp-discover.nse. Basically, any field in the SMB packet can be overridden by passing in a table with the value set. So I can call: smb.negotiate_protocol(smbstate, overrides={protocol='abc'}) to override the 'protocol' field in the negotiate_protocol function.

I'm using this part in, for example, smbv2-enabled.nse (which I just wrote today) to override some default options. I have to request the smbv2 dialect instead of smb, which I wouldn't have been able to do in the old version. I also use overrides to check if specific files exist on the remote system without creating them (the default behaviour = open or create).

Anyway, the newest script I'm working on, which has made extensive use of this code, is also in my branch (smb-psexec.nse: you've probably seen a few hundred commits if you're subscribed to the svn list). It's getting close, but it isn't quite ready to be tested just yet, unless you want to figure out how to write a proper config for it, I'd suggest holding off on that one (writing a config isn't too hard, strictly speaking, but I'd wait a bit).

In any case, I'd like to merge this in soon, assuming there aren't any showstopping issues. I'm hoping we can do it within the next couple weeks since I'm planning on presenting some of my new stuff at Toorcon, and would like to get things stable with a couple weeks to spare. I'd appreciate it if people (I'm looking at you, Brandon! ;) ) could spend some time testing the old scripts with my new libraries, and making sure there aren't any crazy errors.

The branch is:
svn://svn.insecure.org/nmap-exp/ron/nmap-smb

Thanks!
Ron

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


Current thread: