找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 7481|回复: 5

[开源] 【转帖】隐藏DLL模块( HideDll)

 火.. [复制链接]

1214

主题

352

回帖

11

精华

管理员

菜鸟

积分
93755

贡献奖关注奖人气王精英奖乐于助人勋章

发表于 2009-8-23 14:05:37 | 显示全部楼层 |阅读模式
<p><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #0000ff">原帖:<font face="Verdana">http://hi.baidu.com/zoo_/blog/item/4b695c8737e7862fc75cc33c.html</font></font></p>
<p><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #0000ff">void </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">HideDll</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">()<br/>{<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">HMODULE hMod </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">= ::</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">GetModuleHandle</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">(</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #808080">"MyHook.dll"</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">); <br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">PLIST_ENTRY Head</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">,</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Cur</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">PPEB_LDR_DATA ldr</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">PLDR_MODULE ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">__asm<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">mov eax </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">, </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">fs</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">:[</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #800080">0x30</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">]<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">mov ecx </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">, [</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">eax </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">+ </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #800080">0x0c</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">] </font><font style="FONT: 10pt="10pt"  Comic="Comic"  Sans="Sans"  MS; COLOR: #008000">//Ldr<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">mov ldr </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">, </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ecx<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">}<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Head </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">= &amp;(</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldr</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InLoadOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">);<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Cur </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">= </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Head</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #0000ff">do<br/>&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">{<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">= </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">CONTAINING_RECORD</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">( </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Cur</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">, </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">LDR_MODULE</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">, </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InLoadOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Comic="Comic"  Sans="Sans"  MS; COLOR: #008000">//printf("EntryPoint [0x%X]\n",ldm-&gt;BaseAddress);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #0000ff">if</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">( </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">hMod </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">== </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">BaseAddress</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InLoadOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InLoadOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InLoadOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InLoadOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InInitializationOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InInitializationOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InInitializationOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InInitializationOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InMemoryOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InMemoryOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InMemoryOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">=<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">ldm</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">InMemoryOrderModuleList</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">.</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Blink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #0000ff">break</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Cur</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">= </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Cur</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">-&gt;</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">; <br/>&nbsp;&nbsp;&nbsp;&nbsp; }</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #0000ff">while</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">(</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Head </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">!= </font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000000">Cur</font><font style="FONT: 10pt="10pt"  Fixedsys; COLOR: #000080">);<br/>}</font> </p>
【VB】QQ群:1422505加的请打上VB好友
【易语言】QQ群:9531809  或 177048
【FOXPRO】QQ群:6580324  或 33659603
【C/C++/VC】QQ群:3777552
【NiceBasic】QQ群:3703755

2

主题

7

回帖

0

精华

铜牌会员

积分
202
发表于 2010-1-22 14:07:36 | 显示全部楼层
{:2_29:} 可以隐藏么。。一会试试...

29

主题

134

回帖

4

精华

论坛元老

积分
5970
QQ
发表于 2010-5-17 09:23:56 | 显示全部楼层
修改PEB 隐藏不错

16

主题

81

回帖

0

精华

银牌会员

积分
611
发表于 2010-5-17 12:51:43 | 显示全部楼层
强度还是低了点,在ring0下更逼真

280

主题

203

回帖

0

精华

版主

积分
1808
发表于 2010-5-23 20:46:59 | 显示全部楼层
不错,下来看看。

2

主题

17

回帖

0

精华

铜牌会员

积分
35
发表于 2010-9-20 11:55:43 | 显示全部楼层
挺简洁的~!不过已经过时了
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

快速回复 返回顶部 返回列表