0

I have a dll injector app and want inject a 32bit dll file in a 32bit process like for example 32 bit version of cmd.exe on Windows x64, but only is possible inject a 64 bit dll :-(

String sysdir = System.getenv("WINDIR") + "\\System32\\cmd.exe";

Before, my injector executes target process using CreateProcess api by Java Native Access (JNA).

After this execution, i can see from of Process Hacker software that really was executed 32 bit version of cmd.exe.
enter image description here

But when try inject a 32 bit dll, not works, already injecting 64 bit dll works!

Why this is happen?

All suggestion are welcome!

  • 1
    On windows, `c:\Windows\system32` is for 64-bits; the 32-bit stuff lives in [SysWoW64](http://stackoverflow.com/questions/949959/why-do-64-bit-dlls-go-to-system32-and-32-bit-dlls-to-syswow64-on-64-bit-windows). – Elliott Frisch Feb 21 '17 at 01:58
  • In my case, on Win64, Java recognizes only x64 processes, and injection with a 32bit dll fails. If injector is a executable (.exe), works fine! –  Feb 21 '17 at 13:04
  • Some suggestion to solve? –  Feb 21 '17 at 13:05

0 Answers0