|
Linux c 程序
//esp.c
/*
* got_jmpesp.c, scanning for JMP %ESP
* - izik@tty64.org
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
int i, jmps;
char *ptr = (char *) 0xffffe000;
jmps = 0;
for (i = 0; i < 4095; i++) {
if (ptr == '\xff' && ptr[i+1] == '\xe4') {
printf("* 0x%08x : jmp *%%esp\n", ptr+i);
jmps++;
}
}
if (!jmps) {
printf("* No JMP %%ESP were found\n");
}
return 1;
}
run esp时总是不能成功,出了什么问题?
[root@localhost ~]# ./esp
程序内存区段错误
[root@localhost ~]#
听说是内存读取权限问题 是吗?
我应该如何做才能成功得到预期的结果,谢谢 |
|