| (c) teso. all rights reversed. | ||
| exploiting format string vulnerabilities - Wo treten Format String Vulnerabilities auf ? | ||
|
Es gibt zwei typische Situationen in denen Format String Vulnerabilities auftreten: Typ 1 (z.B. Linux rpc.statd, IRIX telnetd):
char tmpbuf[512];
snprintf (tmpbuf, sizeof (tmpbuf), "foo: %s", user);
tmpbuf[sizeof (tmpbuf) - 1] = '\0';
syslog (LOG_NOTICE, tmpbuf);
Typ 2 (z.B. wuftpd, Qualcomm Popper QPOP 2.53):
int Error (char *fmt, ...);
...
Error (user);
...
Typ 1 wird von automatischen Tools schnell und sicher erkannt (zum Beispiel
von pscan oder TESOgcc). Typ 2 wird auch erkannt, vorher muss jedoch dem
Scan-Programm bekanntgemacht werden, welche Funktionen sich wie eine
format-Funktion verhalten (in diesem Falle Error), und wieviel Parameter sie
erhalten. | ||
| << - < - > - >> | ||