三个nop的玄机
2014-2-10 Nie.Meining Debug
最近百度卫士宣传力度挺大,春节在家闲来无事下载了一个看看。第一印象感觉界面简约,功能干净不臃肿,是我喜欢的风格。首先在x86环境下看看hook点:
跟360、金山卫士、QQ管家等其它主动防御一样,hook点选择了系统调用的分发函数KiSystemServiceRepeat。而且hook方式跟QQ管家很像,将mov edi, esp; cmp esi, xxx; 这两条指令替换成了三个nop和一个jmp,但是他们之间的区别是,QQ管家是先nop再jmp,百度卫士是先jmp再nop。其实这个顺序是有玄机的!(以前逆向过QQ管家,感谢sysnap大牛点拨)
我们先看看hook前的原始指令截图如下:
我们现在来考虑一个小概率的特殊情况,假如某个内核线程正好执行完图中的mov edi, esp指令(即将执行下一条指令cmp esi, xxx)时,hook操作发生了。在这种情况下,按照QQ管家的hook方式,该内核线程可以安全着陆(下一条指令变成了nop而已),但是百度卫士的hook方式可能会导致蓝屏。因此从hook安全的角度上来讲还是先nop后jmp好一些。不过这是个小概率事件。
接着看了看jmp到的地址,在bd0001.sys驱动中:
各种需要的信息压栈后,call过滤函数。过滤函数部分截图如下:
感觉跟其它主动防御的处理方式也差不多。由于曾经逆向过QQ管家(《QQ电脑管家中的TsFltMgr Hook框架分析》、《QQ电脑管家中的 Hook 过程分析》),这里就没再继续了。另外由于这种处理框架在现有的主动防御软件中非常流行,我曾经也自己手痒仿照这种框架完成过一个主动防御的雏形,开源放到了看雪上了:《发一个主动防御的代码》。
接下来用64位的win8系统也做了一下测试。由于PatchGuard的原因,64位主动防御目前主要采用对象钩子实现。测试的截图如下:
图中 CallbackDetect.sys 中的钩子是我的检测模块注册的假钩子;bd0001.sys 中的钩子是百度卫士注册的钩子;其它是360注册的钩子。对象钩子的检测方法可以参考我前几天写的《ObCallback 回调钩子检测》。不过该文章中有些结构逆向得不太精确,感谢FlowerCode大牛的讨论和补充,两个关键结构精确描述如下:
typedef struct _CALLBACK_BODY { LIST_ENTRY CallbackList; OB_OPERATION Operations; ULONG Active; OB_HANDLE Handle; POBJECT_TYPE ObjectType; POB_PRE_OPERATION_CALLBACK PreOperation; POB_POST_OPERATION_CALLBACK PostOperation; EX_RUNDOWN_REF RundownProtection; } CALLBACK_BODY, *PCALLBACK_BODY; typedef struct _CALLBACK_NODE { USHORT Version; USHORT OperationRegistrationCount; PVOID RegistrationContext; UNICODE_STRING Altitude; CALLBACK_BODY Entries[1]; } CALLBACK_NODE, *PCALLBACK_NODE;
评论:
2021-12-17 21:23
https://diigo.com/0mtsgx
https://www.pinterest.ru/pin/620511654918282759/
https://pr-cy.ru/vsemfutbolki.ru/
https://www.pinterest.ru/pin/620511654918282773/
https://seosanin.blogspot.com/2021/12/80.html
https://www.tumblr.com/blog/wildwebtop
https://www.pinterest.ru/pin/620511654918282780/
https://www.pinterest.ru/pin/620511654918282766/
https://www.primorsk.top/
https://www.pinterest.ru/pin/620511654918282777/
https://www.pinterest.ru/pin/620511654918282787/
https://twitter.com/dmitrymarihin/status/1471814227820220418
https://www.cy-pr.com/a/vsemfutbolki.ru
http://www.pearltrees.com/seosanin
https://digg.com/news/link/futbolke-po-skidke-80-KkgePr9yjQ
https://www.pinterest.ru/pin/620511654918282778/
https://flipboard.com/@3qnk443/-sl4thvtpy
https://www.pinterest.ru/pin/620511654918282760/
https://papaly.com/alexandersanin
https://www.liveinternet.ru/users/seosanin/post489014098/
https://www.pinterest.ru/pin/620511654918282774/
https://dribbble.com/seosanin/about
https://www.pinterest.ru/pin/620511654918282761/
2021-11-29 17:47
https://www.google.com.do/url?q=https://dcs-rent.ru/arenda-ekskavatora
https://www.google.gf/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.cz/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.ht/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.dz/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.co.jp/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.co.uz/url?q=https://dcs-rent.ru/arenda-samosvala
https://images.google.co.ve/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.ru/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.com.ng/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.com.kh/url?q=https://dcs-rent.ru/arenda-samosvala
https://www.google.com.ni/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.co.ke/url?q=https://dcs-rent.ru/arenda-samosvala
https://www.google.st/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.mu/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.co.jp/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.fm/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.at/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.ae/url?q=https://dcs-rent.ru/arenda-ekskavatora
https://www.google.lt/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.ru/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.ee/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.com.cy/url?q=https://dcs-rent.ru/arenda-ekskavatora
https://www.google.com.kh/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.sm/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.ge/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.co.kr/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.bg/url?q=https://dcs-rent.ru/arenda-trala
https://images.google.fi/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.sc/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.com.tj/url?q=https://dcs-rent.ru/arenda-samosvala
https://www.google.cat/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.bs/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.cn/url?q=https://dcs-rent.ru/arenda-samosvala
https://www.google.md/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.us/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.al/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.hn/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.co.uz/url?q=https://dcs-rent.ru/arenda-ekskavatora
https://www.google.hn/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.ws/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.com.br/url?q=https://dcs-rent.ru/arenda-samosvala
https://www.google.ml/url?q=https://dcs-rent.ru/arenda-samosvala
https://www.google.co.zm/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.co.ug/url?q=https://dcs-rent.ru/arenda-ekskavatora
https://www.google.ad/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.nr/url?q=https://dcs-rent.ru/arenda-trala
https://www.google.co.ug/url?q=https://dcs-rent.ru/arenda-ekskavatora-pogruzchika
https://www.google.es/url?q=https://dcs-rent.ru/arenda-manipulyatora
https://www.google.rs/url?q=https://dcs-rent.ru/arenda-ekskavatora
СУпер цены на аренду
链接
分类
最新日志
最新评论
- Billyscado
Valuable write ups. ... - Lowellmiz
Nicely put, Many tha... - Billyscado
Really all kinds of ... - Lowellmiz
Beneficial knowledge... - Billyscado
Reliable forum posts... - Billyscado
Many thanks. A lot o... - Lowellmiz
Kudos! Wonderful inf... - Lowellmiz
Amazing many of awes... - Billyscado
Seriously tons of su... - Billyscado
You actually reveale...
存档
- 2017年5月(1)
- 2017年4月(1)
- 2017年3月(1)
- 2015年3月(1)
- 2014年11月(2)
- 2014年10月(2)
- 2014年8月(1)
- 2014年2月(2)
- 2014年1月(6)
- 2013年12月(15)
- 2012年11月(2)
- 2012年6月(1)
- 2012年3月(1)
- 2012年2月(3)
- 2011年12月(1)
- 2011年11月(1)
- 2011年5月(5)
- 2010年12月(1)
- 2010年11月(3)
- 2010年9月(3)
- 2010年8月(2)
- 2010年4月(1)
- 2010年3月(2)
- 2010年1月(1)
- 2009年12月(8)
- 2009年11月(2)
- 2009年10月(1)
- 2009年9月(1)
- 2009年8月(9)
- 2009年3月(3)
- 2008年7月(2)
- 2008年6月(1)
- 2008年5月(1)
- 2008年4月(5)
- 2008年2月(1)
- 2007年12月(2)
- 2007年11月(1)
- 2007年8月(1)
- 2007年7月(1)
2022-05-29 05:29