当前位置: 首页 > news >正文

做固定背景网站免费发布信息网平台

做固定背景网站,免费发布信息网平台,兴国建设局网站,seo快速排名上首页突然看到了一种反调试的手段#xff0c;检测api函数的首字节是否为0xcc#xff0c;即int 3类型的断点#xff0c;来反调试#xff0c;尝试一下 #includestdio.h #includestdlib.h void fun(int a) {a;a--;a 5;a - 5;return; } int main() {void (*ptr)(i…突然看到了一种反调试的手段检测api函数的首字节是否为0xcc即int 3类型的断点来反调试尝试一下 #includestdio.h #includestdlib.h void fun(int a) {a;a--;a 5;a - 5;return; } int main() {void (*ptr)(int) NULL;ptr fun;int i 0; char *arr(char*)(ptr);for (i 0; i 99; i) {printf(0x%2x\t, arr[i]);}return 0; } 最开始的时候就遇到了一个问题我用的virtual studio 但是这是c编译的导致最后的函数指针不是指向的fun函数这里可以很清楚的看到。 额不太清楚编译的原理那我用纯c直接用devc里面有自带的gcc编译器 然后就和我预想的一样了fun就是那个函数指针在fun里多打一点断点有个问题为什么fun函数编译出来会有个nop不是很懂 执行结果上面就有预期的0xCC了可见ida确实是用的int 3断点 这种方法很简单也很容易绕过我们来看一下硬件断点硬件断点基于DRx寄存器换句话说可以通过检测DRx寄存器来检测硬件断点 可以通过SetThreadContext直接设置指定线程的调试寄存器 DRx寄存器可以直接操作但是需要设置特权级CPL等于0这里采用比较简单的方法直接用GetThreadContext获取当前线程的上下文 我一共下了3个硬件断点执行结果如下 可见确实用DRx寄存器来设置了硬件断点而该程序正常执行情况没有断点如下 #includestdio.h #includestdlib.h #includeWindows.h const char *strr (const char*)hello touful; int main() { printf(enter\n);//获取当前线程的句柄HANDLE hThread GetCurrentThread();//创建一个CONTEXT结构体CONTEXT threadContext;threadContext.ContextFlags CONTEXT_ALL;//获取当前线程的运行上下文if (!GetThreadContext(hThread, threadContext)){printf(GetThreadContext failed\n);return 0;}printf(DRO 0x%x\n, threadContext.Dr0);printf(DR1 0x%x\n, threadContext.Dr1);printf(DR2 0x%x\n, threadContext.Dr2);printf(DR3 0x%x\n, threadContext.Dr3);printf(exit\n);return 0; } 这里顺便贴出CONTEXT结构体的定义 typedef struct DECLSPEC_NOINITALL _CONTEXT {//// The flags values within this flag control the contents of// a CONTEXT record.//// If the context record is used as an input parameter, then// for each portion of the context record controlled by a flag// whose value is set, it is assumed that that portion of the// context record contains valid context. If the context record// is being used to modify a threads context, then only that// portion of the threads context will be modified.//// If the context record is used as an IN OUT parameter to capture// the context of a thread, then only those portions of the threads// context corresponding to set flags will be returned.//// The context record is never used as an OUT only parameter.//DWORD ContextFlags;//// This section is specified/returned if CONTEXT_DEBUG_REGISTERS is// set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT// included in CONTEXT_FULL.//DWORD Dr0;DWORD Dr1;DWORD Dr2;DWORD Dr3;DWORD Dr6;DWORD Dr7;//// This section is specified/returned if the// ContextFlags word contians the flag CONTEXT_FLOATING_POINT.//FLOATING_SAVE_AREA FloatSave;//// This section is specified/returned if the// ContextFlags word contians the flag CONTEXT_SEGMENTS.//DWORD SegGs;DWORD SegFs;DWORD SegEs;DWORD SegDs;//// This section is specified/returned if the// ContextFlags word contians the flag CONTEXT_INTEGER.//DWORD Edi;DWORD Esi;DWORD Ebx;DWORD Edx;DWORD Ecx;DWORD Eax;//// This section is specified/returned if the// ContextFlags word contians the flag CONTEXT_CONTROL.//DWORD Ebp;DWORD Eip;DWORD SegCs; // MUST BE SANITIZEDDWORD EFlags; // MUST BE SANITIZEDDWORD Esp;DWORD SegSs;//// This section is specified/returned if the ContextFlags word// contains the flag CONTEXT_EXTENDED_REGISTERS.// The format and contexts are processor specific//BYTE ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];} CONTEXT; 对于内存断点是以页的方式添加的设置页的权限位就行了最常用的两种断点实现了最常用的检测方式
http://wiki.neutronadmin.com/news/117038/

相关文章:

  • 网站自响应苍南规划建设局网站
  • 查询网站空间的服务商wordpress英文企业模板
  • 深圳品牌网站制作自己设计小程序
  • ppt免费下载雷锋网站wordpress 如何发布文章
  • 公司网页网站建设 ppt直通车推广技巧
  • 上传网站根目录潍坊建设gc局网站
  • 新手如何做服装网站晋中网络推广
  • 化妆品可做的团购网站有哪些重庆做网站的网络公司
  • 陕icp网站建设临沂小程序开发公司哪家好
  • 企业网站招聘可以怎么做做网页
  • 大型网站开发语言排名北京做网站比较有名的公司有哪些
  • 广州设计网站培训班国际新闻最新战争消息
  • 重庆网站建设熊掌号小红书搜索优化
  • google网站推广网站后台如何添加附件
  • 石家庄做网站公司汉狮价格sem推广软件哪家好
  • 搜狗搜索排名优化重庆官网优化乐育公司
  • 手机网页设计制作网站图片设计软件免费版
  • 深圳app外包公司排行榜广州网站制作十年乐云seo
  • 网站后台管理系统开发中山网站只设计
  • 做网站的网络公司网站商城具有哪些功能模块
  • 医疗设备网站建设怎么做湖南省建设厅官网查询证书
  • 棋牌游戏网站建设简约大气风格网站模板
  • 石柱网站建设网站怎么做图片动态图片不显示不出来
  • 佛山行业网站设计小学网站建设方案书
  • 商城网站平台访问网站 流程图
  • 河南平顶山网站建设公司做公司官网需要哪些数据
  • 北京小程序制作卓越华网天下seo和网络推广有什么区别
  • 网站集约化建设做法建设银行网站招聘官网
  • 完整个人网站htmlwordpress幻灯片图片主题
  • 用自己电脑做网站服务器wordpress 变成英文