[Plugins-writers] W2k Esmtp disconnects from NASL script.

From: Steven W Smith (swsmith@private)
Date: Wed Mar 08 2006 - 09:25:38 PST


Good Morning;

Consider the following NASL code fragment:

        *
        *
        *
open_sock_tcp(smtp_port);                # port 25
if( !soc )
        display("Dead socket!\n");

# Reference 1
data = recv(socket: soc, length: 2048, timeout:20);
display(data);

# Reference 2
send(socket:soc, data: string("HELO Mydomain.com"+'\n'));
data = recv(socket: soc, length: 2048, timeout:20);
display(data);
        *
        *
        *

Now, it works fine against a Sendmail server; however, when I run it 
against an ESMTP server (Win 2K is the test server), the code acheives 
"Reference 1" and displays the login banner.  When I get to "Reference 2", 
the socket is as dead as a post.

I can telnet to the server and issue the "HELO" just fine.  I can also 
configure a client such as Evolution and it works perfectly.  When I 
inspect the server log, I see that the NASL script's connection was 
established followed by an immediate "QUIT" that I didn't send.  The 
"recv" following "Reference 2" times out and no data are displayed.

I don't know where to begin looking for a solution.  My guess is that the 
Win 2K ESMTP server may be detecting the client and closing if it's 
unrecognized. (???)

Steven W. Smith
Del Mar College,
Corpus Christi, TX


_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers



This archive was generated by hypermail 2.1.3 : Wed Mar 08 2006 - 09:46:38 PST