Train

PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : Wu-Ftpd S/KEY Authentication Buffer Overflow Vulnerability


NI3
10-30-2003, 11:00 AM
Date de Publication: 2003-10-28 K-OTik.COM
Titre: WU-FTPD S/KEY Authentication Buffer Overflow Vulnerability
K-Otik ID : 0401
Risque : Critique
Exploitable distance : Oui
Exploitable en local : Oui


* Description Technique - Exploit *

Une vulnrabilit de type buffer overflow a t identifie dans Wu-Ftpd. Le problme se situe dans le processus d'authentification S/KEY qui ne gre pas correctement les long noms d'utilisateurs, ce qui pourrait provoquer un buffer overflow et donc l'excution de commandes arbitraires.

Wu-Ftpd est vulnrable si l'authentification S/KEY est active.

------------------------------ Vulnrable src/ftpd.c ------------------------------
char *skey_challenge(char *name, struct passwd *pwd, int pwok)
{
static char buf[128];
...
if (pwd == NULL || skeychallenge(&skey, pwd->pw_name, sbuf))
sprintf(buf, "Password required for %s.", name);
else
sprintf(buf, "%s %s for %s.", sbuf,
pwok ? "allowed" : "required", name);
return (buf);
}
----------------------------------------------------------------------------------

* Versions Vulnrables *

WU-FTPD version 2.6.2


* Solution *

Dsactiver S/KEY - ou appliquer ce patch :

--------------------------
% diff -u ftpd.c fixed-ftpd.c
--- ftpd.c 2001-11-29 17:56:11.000000000 +0100
+++ fixed-ftpd.c 2003-10-20 20:43:58.000000000 +0200
@@ -1662,9 +1662,9 @@
/* Display s/key challenge where appropriate. */

if (pwd == NULL || skeychallenge(&skey, pwd->pw_name, sbuf))
- sprintf(buf, "Password required for %s.", name);
+ snprintf(buf, 128-1, "Password required for %s.", name);
else
- sprintf(buf, "%s %s for %s.", sbuf,
+ snprintf(buf, 128-1, "%s %s for %s.", sbuf,
pwok ? "allowed" : "required", name);
return (buf);
}
%
--------------------------


* Crdit *

Vulnrabilit dcouverte par Michael Hendrickx (Octobre 2003)