#include <windows.h>
#include <stdio.h>
void main()
{
BYTE* ptr;
//position段地址,address偏移地址
int position, address;
HINSTANCE handle;
BOOL isOver = FALSE;
//加载user32库
handle = LoadLibrary(L"user32.dll");
if (!handle)
{
printf(" load dll erro !");
exit(0);
}
ptr = (BYTE*)handle;
for (position = 0; !isOver; position++)
{
try
{
if (ptr[position] == 0xFF && ptr[position + 1] == 0xE4)
{
int address = (int)ptr + position;
printf("jmp esp found at 0x%x\n", address);
}
}
catch (...)
{
int address = (int)ptr + position;
printf("OVER OF 0x%x\n", address);
isOver = true;
}
}
getchar();
}
分享一段用C语言获取系统jmp esp地址的代码
最新推荐文章于 2022-03-22 10:21:05 发布