hook对应的汇编码0x8B, 0xFF,0x55,0x8B, 0xEC, // mov ebp,esp
来源:互联网 发布:wireshark过滤端口抓包 编辑:程序博客网 时间:2024/03/29 16:24
void lockUnhandledExceptionFilter() { HMODULE kernel32 = LoadLibraryA("kernel32.dll"); Assert(kernel32); if (FARPROC gpaSetUnhandledExceptionFilter = GetProcAddress(kernel32, "SetUnhandledExceptionFilter")) { unsigned char expected_code[] = { 0x8B, 0xFF, // mov edi,edi 0x55, // push ebp 0x8B, 0xEC, // mov ebp,esp }; // only replace code we expect if (memcmp(expected_code, gpaSetUnhandledExceptionFilter, sizeof(expected_code)) == 0) { unsigned char new_code[] = { 0x33, 0xC0, // xor eax,eax 0xC2, 0x04, 0x00, // ret 4 }; BOOST_STATIC_ASSERT(sizeof(expected_code) == sizeof(new_code)); DWORD old_protect; if (VirtualProtect(gpaSetUnhandledExceptionFilter, sizeof(new_code), PAGE_EXECUTE_READWRITE, &old_protect)) { CopyMemory(gpaSetUnhandledExceptionFilter, new_code, sizeof(new_code)); DWORD dummy; VirtualProtect(gpaSetUnhandledExceptionFilter, sizeof(new_code), old_protect, &dummy); FlushInstructionCache(GetCurrentProcess(), gpaSetUnhandledExceptionFilter, sizeof(new_code)); } } } FreeLibrary(kernel32);}
0 0
- hook对应的汇编码0x8B, 0xFF,0x55,0x8B, 0xEC, // mov ebp,esp
- 恢复平衡0x8b,0xff,0x55,0x8b,0xec
- python | pandas 读csv数据报错: 0x8b 解决方案
- 解决 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
- 解决 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
- 'utf8' codec can't decode byte 0x8b in position 14: invalid start byte
- 解决 python爬虫'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte‘错误
- python 网络爬虫报错“UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position”解决方案
- 解决UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 6: ordinal not in range(128)
- python3 读入csv文件报错('utf-8' codec can't decode byte 0x8b in position 2: invalid start byte)的解决
- 【汇编与C之间的关系】 push bp(或 push %ebp)mov ebp esp的作用!!!
- & 0xFF 的作用
- &0xFF 的意义
- &0xff的原因
- &0xff的作用
- 关于0xAA和0x55
- 关于0xAA和0x55
- python 3以上版本使用pickle.load读取文件报UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 6
- 关于排序问题
- 从菜鸟成为数据科学家的 9步养成方案
- Android:Material Design on Android Checklist!
- 配置git for eclipse
- 图像处理之应用篇-大米计数续
- hook对应的汇编码0x8B, 0xFF,0x55,0x8B, 0xEC, // mov ebp,esp
- 错误1error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用D:\C+
- 图像处理之添加高斯与泊松噪声
- diamond types are not supported at this language level
- CentOS-minimal 6.5 安装mysql
- spring aop的案例(二)缓存配置
- 异常情况下Activity生命周期分析
- C#: 向Word插入排版精良的Text Box
- AndroidUI-TxetView嵌套Html的使用