<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="css/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Langouster 's   Blog(虾 窝)</title><link>http://www.langouster.com/</link><description>欢迎来到“虾 窝” </description><generator>RainbowSoft Studio Z-Blog 2.0 bate Build</generator><language>zh-CN</language><copyright>Copyright langouster. Some Rights Reserved.&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;苏ICP备06046736号 &amp;amp;nbsp;&amp;amp;nbsp;</copyright><pubDate>Mon, 26 Dec 2011 09:36:20 +0800</pubDate><item><title>微软在X64中强推PatchGuard技术是一个失败</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/128.html</link><pubDate>Sun, 21 Aug 2011 12:41:42 +0800</pubDate><guid>http://www.langouster.com/HTML/128.html</guid><description><![CDATA[<p><span class="Apple-style-span" style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Arial,Microsoft Yahei,Simsun,sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="text-align: left; line-height: 19px; font-family: Arial, sans-serif, 宋体, 黑体; color: rgb(58,58,58); font-size: 13px">微软在64位系统中强制加入了一项PatchGuard技术，它的作用是防止操作系统自身代码及一些关键数据被Hook或修改，当操作系统检测到这些修改时会引发一个蓝屏错误。</span></span></p><p>...</p>]]></description><category>驱动开发</category><comments>http://www.langouster.com/HTML/128.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=128</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=128&amp;key=1d43bc02</trackback:ping></item><item><title>虚拟地址转物理地址</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/127.html</link><pubDate>Fri, 19 Aug 2011 19:33:55 +0800</pubDate><guid>http://www.langouster.com/HTML/127.html</guid><description><![CDATA[<P>老规矩，高手莫进，方便自己日后查阅。</P><P>在开启PAE的情况下，转虚拟地址<FONT face=Verdana>80871f24到物理地址。</FONT></P><P><FONT face=Verdana>kd&gt; .formats 80871f24<BR>Evaluate expression:<BR>&nbsp; Hex:&nbsp;&nbsp;&nbsp;&nbsp; 80871f24<BR>&nbsp; Decimal: -2138628316<BR>&nbsp; Octal:&nbsp;&nbsp; 20041617444<BR>&nbsp; Binary:&nbsp; <STRONG>10</STRONG>000000 100<STRONG>00111 0001</STRONG>1111 00100100</FONT></P>...]]></description><category>驱动开发</category><comments>http://www.langouster.com/HTML/127.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=127</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=127&amp;key=dda27dfe</trackback:ping></item><item><title>中断服务程序（ISR）的调用参数</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/126.html</link><pubDate>Fri, 19 Aug 2011 19:22:02 +0800</pubDate><guid>http://www.langouster.com/HTML/126.html</guid><description><![CDATA[<P><FONT face=Verdana>老规矩，高手莫进。方便自己日后查询</FONT></P><P><FONT face=Verdana>来看到执行到KiTrap01时的栈数据，首先下一个硬件断点ba e1 NtCreateThread，使KiTrap01函数能执行到，然后在KiTrap01下一个bp断点，千万不要下硬件断点，不然重入。</FONT></P><P><FONT face=Verdana>当执行到KiTrap01时，看栈内存，如下：</FONT></P><P><FONT face=Verdana>kd&gt; dds esp<BR>b9a4cd34&nbsp; 8094ad3a nt!NtCreateThread<BR>b9a4cd38&nbsp; 00000008 cs段寄存器<BR>b9a4cd3c&nbsp; 00000283 EFLags</FONT></P>...]]></description><category>驱动开发</category><comments>http://www.langouster.com/HTML/126.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=126</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=126&amp;key=25b55f28</trackback:ping></item><item><title>kpcr、prcb、tss、fs、tr</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/125.html</link><pubDate>Thu, 18 Aug 2011 19:40:41 +0800</pubDate><guid>http://www.langouster.com/HTML/125.html</guid><description><![CDATA[<p>给自己做个记号，方便日后查找。</p><p>在ring0中 fs:[0]指向<font face="Courier">KPCR</font>，等于地址<font face="Verdana">ffdff000</font>，<font face="Courier">KPCR 叫CPU控制区（Processor Control Region），在线程调试时需要用到</font></p><p>在ring3中 fs:[0]指向TEB：</p><p><font face="Courier">kd&gt; dt _teb<br />nt!_TEB<br />&nbsp;&nbsp; +0x000 NtTib&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : _NT_TIB<br />&nbsp;&nbsp; +0x01c EnvironmentPointer : Ptr32 Void<br />&nbsp;&nbsp; +0x020 ClientId&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : _CLIENT_ID<br />&nbsp;&nbsp; +0x028 ActiveRpcHandle&nbsp; : Ptr32 Void<br />&nbsp;&nbsp; +0x02c ThreadLocalStoragePointer : Ptr32 Void<br />&nbsp;&nbsp; <strong>+0x030 ProcessEnvironmentBlock : Ptr32 _PEB</strong></font></p><p>...</p>]]></description><category>驱动开发</category><comments>http://www.langouster.com/HTML/125.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=125</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=125&amp;key=25fe345e</trackback:ping></item><item><title>驱动回溯Ring3堆栈(高手莫进)</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/124.html</link><pubDate>Wed, 17 Aug 2011 18:08:47 +0800</pubDate><guid>http://www.langouster.com/HTML/124.html</guid><description><![CDATA[<P><FONT face=Verdana>都知道一般情况下从Ring3进入Ring0是通过sysenter或int 2e。下面以win2k3为例分析下Ring3进入Ring0栈变化，本文不讲具体代码。</FONT></P><P>分别在<FONT face=Verdana>ntdll!KiFastSystemCall和<FONT face=Verdana>nt!KiFastCallEntry以及<FONT face=Verdana>nt!KiFastCallEntry中call SSDT的地方下线程条件断点，观察栈变化。</FONT></FONT></FONT></P>...]]></description><category>驱动开发</category><comments>http://www.langouster.com/HTML/124.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=124</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=124&amp;key=88e0f47c</trackback:ping></item><item><title>终于见识了内存条位错误导致的程序异常</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/123.html</link><pubDate>Sat, 13 Aug 2011 10:57:05 +0800</pubDate><guid>http://www.langouster.com/HTML/123.html</guid><description><![CDATA[<P>我们的xx软件中，有一个功能是代码校验，它会定时对内存计算Hash，并与原始的hash比较，检查是否被修改。</P><P>前两天有个用户来反馈这个功能一直误报，根据我们的经验一般是木马或外挂引起的，但是我们仔仔细细检查了他的系统，一切正常。后来不得不建议他重装系统，没想到的是重装系统后不装任何软件问题依旧。</P><P>于是我们专门为他做了一个特制的版本，这个版本会把异常时的内存数据完整dump到文件里，后来我们比较了异常前后的dump文件，发现就一个字节的差异，准确的说是一个数据位的差异，而且每次出异常时被修改的位置是不同的，这个诡异的问题纠结了我们团队整整几天。</P>...]]></description><category>其它技术</category><comments>http://www.langouster.com/HTML/123.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=123</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=123&amp;key=446fa02d</trackback:ping></item><item><title>刚创建了一个windbg群</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/122.html</link><pubDate>Wed, 10 Aug 2011 22:26:15 +0800</pubDate><guid>http://www.langouster.com/HTML/122.html</guid><description><![CDATA[<p>工作中Windbg用的比较多，在这方面慢慢摸索了几年，也略有心得，但正因为是一个人摸索的，很多方法可以能不是最好的方法。所以希望能和大家一起交流分享。</p><p>为吸引人气，在群创建初期，提供无偿分析dump服务（非工作时间）。</p><p>引用群内介绍&ldquo;分享<font face="Verdana">Windbg调试技术，dump分析技术，Windbg插件开发，以及各种软件排错技术。</font>&rdquo;</p><p>群QQ：<font face="Verdana">169225649</font></p><p>...</p>]]></description><category>其它技术</category><comments>http://www.langouster.com/HTML/122.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=122</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=122&amp;key=129e2fc3</trackback:ping></item><item><title>中国银行安全控件伤不起</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/121.html</link><pubDate>Wed, 03 Aug 2011 14:59:20 +0800</pubDate><guid>http://www.langouster.com/HTML/121.html</guid><description><![CDATA[<P>今天拿到一个蓝屏文件，反映运行xx的时候打开中国银行登录页面就会蓝屏。</P><P>分析了一下，中国银行的控件写的实在太不专业的。</P><P>我们的XX Hook了SSDT中的NtOpenProcess,跳到<FONT face=Verdana>88e06b40，</FONT></P><P><FONT face=Verdana>HProtect+0x1ab40:<BR>88e06b40 e91ba6572f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jmp&nbsp;&nbsp;&nbsp;&nbsp; Protector+0x1160 (b8381160)<BR>88e06b45 e96ccf0200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; jmp&nbsp;&nbsp;&nbsp;&nbsp; HProtect+0x47ab6 (88e33ab6)&nbsp; //这行是永远不应该执行到的。</FONT></P>...]]></description><category>驱动开发</category><comments>http://www.langouster.com/HTML/121.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=121</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=121&amp;key=9a8df906</trackback:ping></item><item><title>Windows CreateToolhelp32Snapshot函数Bug</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/120.html</link><pubDate>Wed, 27 Jul 2011 16:16:41 +0800</pubDate><guid>http://www.langouster.com/HTML/120.html</guid><description><![CDATA[<FONT face=Verdana><P><FONT face=Verdana>当使用CreateToolhelp32Snapshot枚举进程时有可能导致程序崩溃，出错栈信息如下：</FONT></P><P><FONT face=Verdana><FONT face=Verdana>ntdll!RtlpChangeQueryDebugBufferTarget+0xf<BR>ntdll!RtlDestroyQueryDebugBuffer+0x18<BR>kernel32!ThpAllocateSnapshotSection+0x15b<BR>kernel32!CreateToolhelp32Snapshot+0x49</FONT></FONT></P>...</font>]]></description><category>Windows程序设计</category><comments>http://www.langouster.com/HTML/120.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=120</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=120&amp;key=da93f826</trackback:ping></item><item><title>VC程序查错之内存句柄泄露</title><author>langouster@163.com (langouster)</author><link>http://www.langouster.com/HTML/119.html</link><pubDate>Mon, 09 May 2011 21:16:19 +0800</pubDate><guid>http://www.langouster.com/HTML/119.html</guid><description><![CDATA[<FONT face=Verdana><P><BR>一.先讲内存泄露</P><P>在MFC程序中，如果程序是调试模式经常会看到如下信息提示有内存泄露。</P><P>testdlg.cpp(108) : {1423} normal block at 0x003BF030, 100 bytes long。</P><P>这行表示的含义是，第1423次申请的内存没有释放，它还指出了申请的内存的起始地址与大小，它还告诉你是哪一行申请的内存。</P><P>在程序开头插入代码_CrtSetBreakAlloc(1423)，重新编译运行，当程序执行到第1423次申请内存时就会自动中断下来，这时就可以看到程序调用栈了。</P>...</font>]]></description><category>Windows程序设计</category><comments>http://www.langouster.com/HTML/119.html#comment</comments><wfw:comment>http://www.langouster.com/</wfw:comment><wfw:commentRss>http://www.langouster.com/feed.asp?cmt=119</wfw:commentRss><trackback:ping>http://www.langouster.com/cmd.asp?act=tb&amp;id=119&amp;key=7f7672fb</trackback:ping></item></channel></rss>

