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

openftpd.txt

openftpd.txt
Posted Nov 2, 2005
Authored by unl0ck | Site exploiterz.org

OpenFTPD format string.

SHA-256 | a8032a2d183273e02f396cf5f3841e754e681f16de385389898314da77a7b48f

openftpd.txt

Change Mirror Download
                        -= Unl0ck Team Security Advisory =-

____ ___ __ _______ __ ___________
| | \____ | | \ _ \ ____ | | __ \__ ___/___ _____ _____
| | / \| | / /_\ \_ / ___\| |/ / | |_/ __ \\__ \ / \
| | / | \ |_\ \_/ \ \___ | < | |\ ___/ / __ \| Y Y \
|______/|___| /____/\_____ /\_____ >__|_ \ |____| \___ >____ /__|_| /
\/ \/ \/ \/ \/ \/ \/
... the best way of protection is attack

Advisory : #8 by unl0ck team
Product : openftpd (latest version)
Vendor : https://openftpd.org
Date : 24.09.2004.
Impact : format string vulnerability
Advisory URL : https://unl0ck.info/advisories/openftpd.txt

-=[ Overview

OpenFTPD is a free, open source FTP server
implementation for the UNIX platform. It is based
on FTP4ALL (www.ftp4all.de) but the differences
are quite big already.

]=-

-=[ Vulnerability

Format String Vulnerability exists in folowing files:

\openftpd-daily\src\ftpd\sections.c
\openftpd-daily\src\misc\msg.c

sections.c file:

int f4adp_sec_set(struct child_s* c, char** p, int n)
{
...
char filename[256];
char filenametmp[256];
char *q;
FILE* file;
FILE* filetmp;
...
while (fgets(str, sizeof(str), file)) {
q = str;
while (isspace(*q))
q++;
if (!strncasecmp(q, p[1], strlen(p[1])) && *(q + strlen(p[1])) == ' ') {
found = 1;
g_snprintf(str, sizeof(str), "%-20s %s\n", p[1], p[2]);
}
fprintf(filetmp, str); // <--- format string vulnerability
}

...

msg.c file:

void cat_help()
{
char name[256];
FILE *file;
char *serverdir = NULL;
...
if (!(file=fopen(name,"rt"))) {
printf("Error opening msg help file\n");
return;
}
while (fgets(name, sizeof(name)-1, file)) {
printf(name); // <--- format string vulnerability
}
...

I must say that in function cat_help() you can't manipulate. But also it's wrong and this function must be fixed!

To avoid bug use:

fprintf(filetmp, "%s", str);
and
printf("%s", name);

]=-

-=[ Credits

Found this bug D4rk Eagle
mailto:darkeagle@list.ru
Unl0ck Team [https://unl0ck.net.ru] || [https://unl0ck.info]

]=-
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