Da Peter prav, ne morshite popu Idioti,
dla teh kto ne znaet chto takoe NASM voobshe sdes delatj neher!!!
Peter izvinite no pohoshe vi pisali exploit naskorjak, ja ego malenko podrabotal potomu kak eta proga moget teper lubie shellcode testen ( estestvenno na sebe)
vot Source (VC++6.0):
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
///////////////////////////
Kstati dla teh kto v Tanke:
1. Generiruem binarnik tak: nasm -fbin -obindshell.bin bindshell.asm (estestvenno ishodnik dolshen nazivatsa bindshell.asm)
2. Compilim moj shellcode_tester (tak ya ego nazwal)
3. Zapuskaem vse eto tak CMD->shellcode_tester bindshell.bin
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
///////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys\stat.h>
void(*func)(); // Pointer na Function
int main(int argc, char *argv[])
{
FILE *f;
char *shellcode = NULL;
char filename[255];
struct stat file;
int i;
printf("\n\n");
if(argc == 1) // esli bez parametrov vsetaki zapustili, to sprosim sami
{
printf("Put filename and press <ENTER>\n");
scanf("%254s", &filename);
}
else
strncpy(filename, argv[1], sizeof(filename)-1);
if( (f = fopen(filename, "rb")) == NULL )
{
printf("Couldn't open file \"%s\"\n\n", filename);
exit(1);
}
else
printf("File for reading opened success\n");
stat(filename, &file); // Poluchim informaciyu o file, nas razmer interesuet
printf("Total bytes: %d\n", file.st_size);
if( (shellcode = (char *)malloc(file.st_size)) == NULL ) // Rezerviruem mesto dla coda
{
printf("Cann't allocate memory for shellcode data\n\n");
exit(1);
}
for( i = 0; i < file.st_size; i++) // Chitaem code v rezervirovanoe mesto
shellcode[i] = getc(f);
printf("Bytes readed: %d\n", i);
printf("Executing shellcode\n");
func = (void *) shellcode; // Nu a teper zapuskaem sam shellcode
func();
printf("\nDone...\n\n\n");
fclose(f);
free(shellcode);
return 0;
}
Esli i tut u kogo voprosi pojavatsa to togda vam tochno tut neher delatj