<div class="gmail_quote">2010/7/4 Marcus Meissner <span dir="ltr">&lt;<a href="mailto:marcus@jet.franken.de">marcus@jet.franken.de</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Sun, Jul 04, 2010 at 10:04:01AM +0400, éÌØÑ âÁÓÉΠwrote:<br>
&gt; One widely used dll injection technique is copying the dll path to the<br>
&gt; target process memory and calling CreateRemoteThread() using the address of<br>
&gt; LoadLibraryA as lpStartAddress. This relies on the fact that all processes<br>
&gt; have the same base address of kernel32.dll (and some other system dlls).<br>
&gt; On Wine only ntdll is always loaded to the same base address, so it&#39;s<br>
&gt; potentially possible to do the same for kernel32, right?<br>
<br>
</div></div>kernel32 is also loaded to the same base address.<br>
<br>
(the Makefile has:<br>
EXTRADLLFLAGS = -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b800000<br>
)<br>
<br>
Are you seeing otherwise?<br>
<br>
Ciao, Marcus<br>
</blockquote></div>int main() {<br>š HMODULE hKernel32 = GetModuleHandle(&quot;kernel32.dll&quot;);<br>š printf(&quot;0x%8x\n&quot;, hKernel32);<br>}<br><br>[il@IL winetest]$ wine a.exe<br>0x7edf0000<br>[il@IL winetest]$ wine a.exe<br>
0x7edf0000<br>[il@IL winetest]$ wine a.exe<br>0x7ede0000<br><br>