I would, however, like to see a module that is able to connect to the windows SMB shares and send and receive packets with out using the standard Windows API to do so. The reason being is that there is a hefty timeout delay for an incorrect password.
Per request, here are some source examples of how this can be useful:
1.) Make a connection to the IPC$ share.
if (ConnectIPC($server, "", "", "")) { $this->{f_resultsTB}->AppendText("Null Session to $server successf +ul. \n"); # Now try getting some information $this->{f_resultsTB}->AppendText("Connecting to Registry...\n"); $this->{f_resultsTB}->AppendText("Succesful!\n"); \&RegConnect($server);
What have we done here? We've established a connection to the server's ($server) IPC$ share with null credentials, i.e., ConnectIPC(server, user, pass, domain), with null for user, pass, and domain.
2.) Enumerate users$this->{f_resultsTB}->AppendText("[Local Users] \n"); @users = GetLocalUsers($server); if (@users) { foreach (@users) { $this->{f_resultsTB}->AppendText("$_ \n"); $user = (split(/:/,$_))[1]; $l_user = (split(/\\/,$user))[1]; \&GetUserInfo($server,$l_user); } } else { $this->{f_resultsTB}->AppendText("Did not retrieve local users +. \n"); }
Its important to recoginize that this should be within the if(ConnectIPC(...)) block. I will post the whole code bellow.
if (ConnectIPC($server, "", "", "")) { $this->{f_resultsTB}->AppendText("Null Session to $server successf +ul. \n"); # Now try getting some information $this->{f_resultsTB}->AppendText("Connecting to Registry...\n"); $this->{f_resultsTB}->AppendText("Succesful!\n"); \&RegConnect($server); $this->{f_resultsTB}->AppendText("[Local Users] \n"); @users = GetLocalUsers($server); if (@users) { foreach (@users) { $this->{f_resultsTB}->AppendText("$_ \n"); $user = (split(/:/,$_))[1]; $l_user = (split(/\\/,$user))[1]; \&GetUserInfo($server,$l_user); } } else { $this->{f_resultsTB}->AppendText("Did not retrieve local users +. \n"); } } else { $this->{f_resultsTB}->AppendText("Could not establish null ses +sion with $server. \n"); }
I apologize, this code has been made for Visual Perl.NET, hopefully some of you will find that helpful. Here is a link to the actual Perl script I used to help me figure out the module: Null.pl
In reply to Win32::Lanman by SyN/AcK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |