nbss.rb is a NetBIOS shares scanner, well not really, but more of a wrapper for
smbclient and
nmblookup to search for shares on Windows machines. the scan result is somewhat-nicely formatted in html (
sample). it was written in a haste during a recent pen-test assignment a few enhancements would make it better:
- using threads for faster scans. currently, the IPs are scanned sequentially, scanning a large network (especially when there are non-Windows machines around) take some time. however, i haven't really tested Ruby threads, so...
- the HTML output needs face lift

- results of scans are concatenated and printed after all scans are done - reducing memory usage by writing results of each scanned IP will solve this.
- some of the error messages in the output file need to be supressed.
- a -u username and -p password arguments for scanning. right now the scans are done as anonymous user.
- testing whether the shares are readable and writeable using supplied credentials (or anonymous user) - very good for penetration testing
like i say, it was written in a haste, but it works for me. the preferred usage is by feeding nbss.rb with a file containing a list of IPs to scan (IPs of windows machine already scanned using nmap), and then piping the output to a file (nbss.rb ip.txt > result.html). also, you need to have
samba and
ipadmin installed.
listening to: everything but the girl - each and everyone