QBDI icon indicating copy to clipboard operation
QBDI copied to clipboard

Winpreload

Open deesse-k opened this issue 6 years ago • 2 comments

Add support for Windows QBDIPreload x86-64 in 2 modes:

  • process creation mode (QBDIPreload aims to be used on a process once it is started)
  • attach mode (QBDIPreload is injected in an already running process)

deesse-k avatar Aug 30 '19 10:08 deesse-k

Just added support for 32 bits windows (with attach mode too) in same branch

deesse-k avatar Sep 10 '19 07:09 deesse-k

I have had to make the following change to make it work on my end:

diff --git a/tools/QBDIPreload/CMakeLists.txt b/tools/QBDIPreload/CMakeLists.txt
index 5f24c33..a6c1f6f 100644
--- a/tools/QBDIPreload/CMakeLists.txt
+++ b/tools/QBDIPreload/CMakeLists.txt
@@ -2,11 +2,11 @@ set(SOURCES "")

 if((${OS} STREQUAL "linux") OR (${OS} STREQUAL "android"))
     set(SOURCES ${SOURCES} "src/linux_preload.c")
-elseif(WIN32)
+elseif(${OS} STREQUAL "win")
     if(${ARCH} STREQUAL "X86")
         set(SOURCES ${SOURCES} "src/win_preload.c" "src/trampoline_x86.asm")
         set_source_files_properties("src/trampoline_x86.asm" PROPERTIES COMPILE_FLAGS "/safeseh")
-    elseif(${ARCH} STREQUAL "X86-64")
+    elseif(${ARCH} STREQUAL "X86_64")
         set(SOURCES ${SOURCES} "src/win_preload.c" "src/trampoline_x64.asm")
     endif()
 elseif(${OS} STREQUAL "macOS")

Otherwise, I was getting the following error:

CMake Error at tools/QBDIPreload/CMakeLists.txt:20 (add_library):
  No SOURCES given to target: QBDIPreload

NeatMonster avatar Dec 13 '19 09:12 NeatMonster

move to #227

nsurbay avatar Jan 23 '23 17:01 nsurbay