Detecting server version

Christopher R. Hertel crh at ubiqx.mn.org
Mon Jan 26 20:59:05 GMT 2004


I assume you're working on some sort of client software that will want to
know such things.

The server type is included in the Browse List information.  This is only 
available under NBT protocol, however, and only if the server announces 
itself.  See the chart at the end of this section of my book:  

  http://ubiqx.org/cifs/Browsing.html#BRO.4.3.2

So, if your client can access the Browse List it can discover a lot of 
information about the listed servers.

I have no idea whether that information is also available for servers that 
run over naked TCP transport.


Figuring out the server type without the Browse Service information would
probably require some fingerprinting, a. la. nmap.

One set of places to look for clues are in the FLAGS, FLAGS2, and
CAPABILITIES bit fields exchanged in the first few SMB session messages.  
You might also do some guessing based on the information returned in the
NegProt Response.  Almost all clients and servers running today will
request the "NT LM 0.12" dialect, so that won't tell you much.

Hope that helps.

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the samba-technical mailing list