【转帖】隐藏DLL模块( HideDll)
<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/> </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/> </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/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">PPEB_LDR_DATA ldr</font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">;<br/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">PLDR_MODULE ldm</font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">;<br/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">__asm<br/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">{<br/> </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/> </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/> </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/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">}<br/> </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">ldr</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/> </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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">;<br/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #0000ff">do<br/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">{<br/> </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/> </font><font style="FONT: 10pt="10pt"Comic="Comic"Sans="Sans"MS; COLOR: #008000">//printf("EntryPoint \n",ldm->BaseAddress);<br/> </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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">BaseAddress</font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">)<br/> {<br/> </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">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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Flink </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">=<br/> </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">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/> </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">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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Blink </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">=<br/> </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">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/> </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">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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Flink </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">=<br/> </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">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/> </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">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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Blink </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">=<br/> </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">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">; <br/> </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">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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Flink </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">=<br/> </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">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/> </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">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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Blink </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">=<br/> </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">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">; <br/> </font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #0000ff">break</font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">;<br/> }<br/> </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">-></font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000000">Flink</font><font style="FONT: 10pt="10pt"Fixedsys; COLOR: #000080">; <br/> }</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> {:2_29:} 可以隐藏么。。一会试试... 修改PEB 隐藏不错 强度还是低了点,在ring0下更逼真 不错,下来看看。 挺简洁的~!不过已经过时了
页:
[1]