Patrick Bertholon
2002-Jul-19 07:09 UTC
[Samba] Howto open NULL session with samba clients ?
Hi samba gurus, I'm actually writing a security audit tool, so as to see if our Windows computers are well configured. Basicly, here are the steps of the tool, given an IP address: 0. Ping the computer... 1. Get all names associated to that IP (nmblookup -A IP) 2. Open a null session to the computer to get the user list and share list. 3. Attempt to connect to each share, using each user, with some trivial passwords and see what happens. I'd like to program that under linux, using samba, in perl if possible, C otherwise. The problem is that I was not able to establish a null session with a remote computer, using rpcclient (to get the user list) or smbclient (to get the share list). Does anybody have any clue ? Any help will be appreciated, Patrick P.S.: Please cc me the answers since I'm not on the list.
Andrew Bartlett
2002-Jul-19 16:04 UTC
[Samba] Howto open NULL session with samba clients ?
Patrick Bertholon wrote:> > Hi samba gurus, > > I'm actually writing a security audit tool, so as to see if our Windows > computers are well configured. > > Basicly, here are the steps of the tool, given an IP address: > 0. Ping the computer... > 1. Get all names associated to that IP (nmblookup -A IP) > 2. Open a null session to the computer to get the user list and share > list. > 3. Attempt to connect to each share, using each user, with some trivial > passwords and see what happens. > > I'd like to program that under linux, using samba, in perl if possible, C > otherwise. > The problem is that I was not able to establish a null session with a > remote computer, using rpcclient (to get the user list) or smbclient (to > get the share list). > > Does anybody have any clue ? > Any help will be appreciated,Use progname -U% Thats a blank username and password. That should do what you want.> P.S.: Please cc me the answers since I'm not on the list.-- Andrew Bartlett abartlet@pcug.org.au Manager, Authentication Subsystems, Samba Team abartlet@samba.org Student Network Administrator, Hawker College abartlet@hawkerc.net http://samba.org http://build.samba.org http://hawkerc.net