Coder Social home page Coder Social logo

myfreeer / dll-hijack Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 5.0 43 KB

DLL hijack codes for cmake on windows.

License: GNU Lesser General Public License v2.1

CMake 3.26% Shell 3.30% C 92.45% Batchfile 0.99%
c cmake dll-hijack dll-hijacking windows

dll-hijack's People

Contributors

myfreeer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dll-hijack's Issues

Cmake does not built anything

By first executing:

User@WinDev2002Eval MSYS /c/Users/User/Desktop/dll-hijack-master
# ./gen_code.sh winsta.dll
*** [-f] failed to open()
* [C:/Windows/system32/winsta.dll] Found PE image
Generated winsta.h
Generated winsta.c
Added winsta entry to CMakeLists.txt

I get the error "*** [-f] failed to open()" even though MSYS2 is run as administrator. Nevertheless, winsta.h and winsta.c are populated.
Next I run:

PS C:\Users\User\Desktop\dll-hijack-master\build> cmake -GNinja ..
-- The C compiler identification is GNU 9.2.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/User/Desktop/dll-hijack-master/build

The problem is now that C:\Users\User\Desktop\dll-hijack-master\build\CMakeFiles\winsta.dir\ is just empty...

CMakeOutput.txt shows the following:

The system is: Windows - 10.0.18363 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:

The output was:
0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/Users/User/Desktop/dll-hijack-master/build/CMakeFiles/3.16.5/CompilerIdC/a.exe"

Determining if the C compiler works passed with the following output:
Change Dir: C:/Users/User/Desktop/dll-hijack-master/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/ninja/ninja.exe cmTC_c1b36 && [1/2] Building C object CMakeFiles/cmTC_c1b36.dir/testCCompiler.c.obj

[2/2] Linking C executable cmTC_c1b36.exe

Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/Users/User/Desktop/dll-hijack-master/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/ninja/ninja.exe cmTC_116d6 && [1/2] Building C object CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj

Using built-in specs.

COLLECT_GCC=C:\MinGW\bin\gcc.exe

Target: mingw32

Configured with: ../src/gcc-9.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-static --enable-shared --enable-threads --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libgomp --disable-libvtv --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --disable-build-format-warnings --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --enable-nls --with-pkgversion='MinGW.org GCC Build-20200227-1'

Thread model: win32

gcc version 9.2.0 (MinGW.org GCC Build-20200227-1)

COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586'

c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/cc1.exe -quiet -v -iprefix c:\mingw\bin../lib/gcc/mingw32/9.2.0/ C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=i586 -auxbase-strip CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj -version -o C:\Users\User\AppData\Local\Temp\ccUNsVzG.s

GNU C17 (MinGW.org GCC Build-20200227-1) version 9.2.0 (mingw32)

compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

ignoring nonexistent directory "c:\mingw\bin../lib/gcc/mingw32/9.2.0/../../../../mingw32/include"

ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include"

ignoring duplicate directory "/mingw/lib/gcc/mingw32/9.2.0/../../../../include"

ignoring duplicate directory "c:/mingw/lib/gcc/../../include"

ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include-fixed"

ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/../../../../mingw32/include"

ignoring duplicate directory "/mingw/include"

#include "..." search starts here:

#include <...> search starts here:

c:\mingw\bin../lib/gcc/mingw32/9.2.0/include

c:\mingw\bin../lib/gcc/mingw32/9.2.0/../../../../include

c:\mingw\bin../lib/gcc/mingw32/9.2.0/include-fixed

End of search list.

GNU C17 (MinGW.org GCC Build-20200227-1) version 9.2.0 (mingw32)

compiled by GNU C version 9.2.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.21-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

Compiler executable checksum: 4466b5eb55ee496e209b8a8fdff6557f

COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586'

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/as.exe -v -o CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj C:\Users\User\AppData\Local\Temp\ccUNsVzG.s

GNU assembler version 2.32 (mingw32) using BFD version (GNU Binutils) 2.32

COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/

LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/9.2.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../

COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586'

[2/2] Linking C executable cmTC_116d6.exe

Using built-in specs.

COLLECT_GCC=C:\MinGW\bin\gcc.exe

COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe

Target: mingw32

Configured with: ../src/gcc-9.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-static --enable-shared --enable-threads --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libgomp --disable-libvtv --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --disable-build-format-warnings --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --enable-nls --with-pkgversion='MinGW.org GCC Build-20200227-1'

Thread model: win32

gcc version 9.2.0 (MinGW.org GCC Build-20200227-1)

COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/

LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/9.2.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../

COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_116d6.exe' '-mtune=generic' '-march=i586'

c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/collect2.exe -plugin c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\User\AppData\Local\Temp\ccCQteuO.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -o cmTC_116d6.exe c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../.. CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_116d6.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lmingwex -lgcc -lgcc_eh -lmoldname -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lmingwex -lgcc -lgcc_eh -lmoldname -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtend.o

COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_116d6.exe' '-mtune=generic' '-march=i586'

Parsed C implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/include]
add: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../include]
add: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/include-fixed]
end of search list found
collapse include dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/include] ==> [C:/MinGW/lib/gcc/mingw32/9.2.0/include]
collapse include dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../include] ==> [C:/MinGW/include]
collapse include dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/include-fixed] ==> [C:/MinGW/lib/gcc/mingw32/9.2.0/include-fixed]
implicit include dirs: [C:/MinGW/lib/gcc/mingw32/9.2.0/include;C:/MinGW/include;C:/MinGW/lib/gcc/mingw32/9.2.0/include-fixed]

Parsed C implicit link information from above output:
link line regex: [^( |.[/])(ld.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: C:/Users/User/Desktop/dll-hijack-master/build/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command(s):C:/ninja/ninja.exe cmTC_116d6 && [1/2] Building C object CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\MinGW\bin\gcc.exe]
ignore line: [Target: mingw32]
ignore line: [Configured with: ../src/gcc-9.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-static --enable-shared --enable-threads --enable-languages=c c++ objc obj-c++ fortran ada --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libgomp --disable-libvtv --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --disable-build-format-warnings --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --enable-nls --with-pkgversion='MinGW.org GCC Build-20200227-1']
ignore line: [Thread model: win32]
ignore line: [gcc version 9.2.0 (MinGW.org GCC Build-20200227-1) ]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586']
ignore line: [ c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/cc1.exe -quiet -v -iprefix c:\mingw\bin../lib/gcc/mingw32/9.2.0/ C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=i586 -auxbase-strip CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj -version -o C:\Users\User\AppData\Local\Temp\ccUNsVzG.s]
ignore line: [GNU C17 (MinGW.org GCC Build-20200227-1) version 9.2.0 (mingw32)]
ignore line: [ compiled by GNU C version 9.2.0 GMP version 6.1.2 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.21-GMP]
ignore line: []
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [ignoring nonexistent directory "c:\mingw\bin../lib/gcc/mingw32/9.2.0/../../../../mingw32/include"]
ignore line: [ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include"]
ignore line: [ignoring duplicate directory "/mingw/lib/gcc/mingw32/9.2.0/../../../../include"]
ignore line: [ignoring duplicate directory "c:/mingw/lib/gcc/../../include"]
ignore line: [ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/include-fixed"]
ignore line: [ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/9.2.0/../../../../mingw32/include"]
ignore line: [ignoring duplicate directory "/mingw/include"]
ignore line: [#include "..." search starts here:]
ignore line: [#include <...> search starts here:]
ignore line: [ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include]
ignore line: [ c:\mingw\bin../lib/gcc/mingw32/9.2.0/../../../../include]
ignore line: [ c:\mingw\bin../lib/gcc/mingw32/9.2.0/include-fixed]
ignore line: [End of search list.]
ignore line: [GNU C17 (MinGW.org GCC Build-20200227-1) version 9.2.0 (mingw32)]
ignore line: [ compiled by GNU C version 9.2.0 GMP version 6.1.2 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.21-GMP]
ignore line: []
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: 4466b5eb55ee496e209b8a8fdff6557f]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586']
ignore line: [ c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/as.exe -v -o CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj C:\Users\User\AppData\Local\Temp\ccUNsVzG.s]
ignore line: [GNU assembler version 2.32 (mingw32) using BFD version (GNU Binutils) 2.32]
ignore line: [COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/]
ignore line: [c:/mingw/bin/../libexec/gcc/]
ignore line: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/]
ignore line: [LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/9.2.0/]
ignore line: [c:/mingw/bin/../lib/gcc/]
ignore line: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib/]
ignore line: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=i586']
ignore line: [[2/2] Linking C executable cmTC_116d6.exe]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\MinGW\bin\gcc.exe]
ignore line: [COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe]
ignore line: [Target: mingw32]
ignore line: [Configured with: ../src/gcc-9.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-static --enable-shared --enable-threads --enable-languages=c c++ objc obj-c++ fortran ada --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-libgomp --disable-libvtv --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --disable-build-format-warnings --prefix=/mingw --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --enable-nls --with-pkgversion='MinGW.org GCC Build-20200227-1']
ignore line: [Thread model: win32]
ignore line: [gcc version 9.2.0 (MinGW.org GCC Build-20200227-1) ]
ignore line: [COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/]
ignore line: [c:/mingw/bin/../libexec/gcc/]
ignore line: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/]
ignore line: [LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/9.2.0/]
ignore line: [c:/mingw/bin/../lib/gcc/]
ignore line: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib/]
ignore line: [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_116d6.exe' '-mtune=generic' '-march=i586']
link line: [ c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/collect2.exe -plugin c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\User\AppData\Local\Temp\ccCQteuO.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -o cmTC_116d6.exe c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../.. CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj --out-implib libcmTC_116d6.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lmingwex -lgcc -lgcc_eh -lmoldname -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lmingwex -lgcc -lgcc_eh -lmoldname -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtend.o]
arg [c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/collect2.exe] ==> ignore
arg [-plugin] ==> ignore
arg [c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/liblto_plugin-0.dll] ==> ignore
arg [-plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/9.2.0/lto-wrapper.exe] ==> ignore
arg [-plugin-opt=-fresolution=C:\Users\User\AppData\Local\Temp\ccCQteuO.res] ==> ignore
arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore
arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc_eh] ==> ignore
arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore
arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore
arg [-plugin-opt=-pass-through=-ladvapi32] ==> ignore
arg [-plugin-opt=-pass-through=-lshell32] ==> ignore
arg [-plugin-opt=-pass-through=-luser32] ==> ignore
arg [-plugin-opt=-pass-through=-lkernel32] ==> ignore
arg [-plugin-opt=-pass-through=-lmingw32] ==> ignore
arg [-plugin-opt=-pass-through=-lmingwex] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
arg [-plugin-opt=-pass-through=-lgcc_eh] ==> ignore
arg [-plugin-opt=-pass-through=-lmoldname] ==> ignore
arg [-plugin-opt=-pass-through=-lmsvcrt] ==> ignore
arg [-Bdynamic] ==> ignore
arg [-o] ==> ignore
arg [cmTC_116d6.exe] ==> ignore
arg [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../crt2.o] ==> ignore
arg [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtbegin.o] ==> ignore
arg [-Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0] ==> dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0]
arg [-Lc:/mingw/bin/../lib/gcc] ==> dir [c:/mingw/bin/../lib/gcc]
arg [-Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib] ==> dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib]
arg [-Lc:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../..] ==> dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../..]
arg [CMakeFiles/cmTC_116d6.dir/CMakeCCompilerABI.c.obj] ==> ignore
arg [--out-implib] ==> ignore
arg [libcmTC_116d6.dll.a] ==> ignore
arg [--major-image-version] ==> ignore
arg [0] ==> ignore
arg [--minor-image-version] ==> ignore
arg [0] ==> ignore
arg [-lmingw32] ==> lib [mingw32]
arg [-lmingwex] ==> lib [mingwex]
arg [-lgcc] ==> lib [gcc]
arg [-lgcc_eh] ==> lib [gcc_eh]
arg [-lmoldname] ==> lib [moldname]
arg [-lmsvcrt] ==> lib [msvcrt]
arg [-ladvapi32] ==> lib [advapi32]
arg [-lshell32] ==> lib [shell32]
arg [-luser32] ==> lib [user32]
arg [-lkernel32] ==> lib [kernel32]
arg [-lmingw32] ==> lib [mingw32]
arg [-lmingwex] ==> lib [mingwex]
arg [-lgcc] ==> lib [gcc]
arg [-lgcc_eh] ==> lib [gcc_eh]
arg [-lmoldname] ==> lib [moldname]
arg [-lmsvcrt] ==> lib [msvcrt]
arg [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/crtend.o] ==> ignore
remove lib [gcc_eh]
remove lib [msvcrt]
remove lib [gcc_eh]
remove lib [msvcrt]
collapse library dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0] ==> [C:/MinGW/lib/gcc/mingw32/9.2.0]
collapse library dir [c:/mingw/bin/../lib/gcc] ==> [C:/MinGW/lib/gcc]
collapse library dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/lib] ==> [C:/MinGW/mingw32/lib]
collapse library dir [c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../..] ==> [C:/MinGW/lib]
implicit libs: [mingw32;mingwex;gcc;moldname;advapi32;shell32;user32;kernel32;mingw32;mingwex;gcc;moldname]
implicit dirs: [C:/MinGW/lib/gcc/mingw32/9.2.0;C:/MinGW/lib/gcc;C:/MinGW/mingw32/lib;C:/MinGW/lib]
implicit fwks: []

How do I get rid of this error and is the error even the reason why nothing is built?

Can this project still work? I can't find winternl.h when compiling.

hi , i try compiling this project and get some error:
PS G:\GitLibrary\dll-hijack\build> ninja
[1/16] Building C object CMakeFiles/msimg32.dir/msimg32.c.obj
FAILED: CMakeFiles/msimg32.dir/msimg32.c.obj
G:\cpp\mingw\bin\gcc.exe -Dmsimg32_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/msimg32.dir/msimg32.c.obj -MF CMakeFiles\msimg32.dir\msimg32.c.obj.d -o CMakeFiles/msimg32.dir/msimg32.c.obj -c ../msimg32.c
In file included from ../hijack.h:37:0,
from ../msimg32.h:2,
from ../msimg32.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[2/16] Building C object CMakeFiles/cryptsp.dir/cryptsp.c.obj
FAILED: CMakeFiles/cryptsp.dir/cryptsp.c.obj
G:\cpp\mingw\bin\gcc.exe -Dcryptsp_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/cryptsp.dir/cryptsp.c.obj -MF CMakeFiles\cryptsp.dir\cryptsp.c.obj.d -o CMakeFiles/cryptsp.dir/cryptsp.c.obj -c ../cryptsp.c
In file included from ../hijack.h:37:0,
from ../cryptsp.h:2,
from ../cryptsp.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[3/16] Building C object CMakeFiles/version.dir/version.c.obj
FAILED: CMakeFiles/version.dir/version.c.obj
G:\cpp\mingw\bin\gcc.exe -Dversion_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/version.dir/version.c.obj -MF CMakeFiles\version.dir\version.c.obj.d -o CMakeFiles/version.dir/version.c.obj -c ../version.c
In file included from ../hijack.h:37:0,
from ../version.h:2,
from ../version.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[4/16] Building C object CMakeFiles/wtsapi32.dir/wtsapi32.c.obj
FAILED: CMakeFiles/wtsapi32.dir/wtsapi32.c.obj
G:\cpp\mingw\bin\gcc.exe -Dwtsapi32_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/wtsapi32.dir/wtsapi32.c.obj -MF CMakeFiles\wtsapi32.dir\wtsapi32.c.obj.d -o CMakeFiles/wtsapi32.dir/wtsapi32.c.obj -c ../wtsapi32.c
In file included from ../hijack.h:37:0,
from ../wtsapi32.h:2,
from ../wtsapi32.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[5/16] Building C object CMakeFiles/iphlpapi.dir/iphlpapi.c.obj
FAILED: CMakeFiles/iphlpapi.dir/iphlpapi.c.obj
G:\cpp\mingw\bin\gcc.exe -Diphlpapi_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/iphlpapi.dir/iphlpapi.c.obj -MF CMakeFiles\iphlpapi.dir\iphlpapi.c.obj.d -o CMakeFiles/iphlpapi.dir/iphlpapi.c.obj -c ../iphlpapi.c
In file included from ../hijack.h:37:0,
from ../iphlpapi.h:2,
from ../iphlpapi.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[6/16] Building C object CMakeFiles/winmm.dir/winmm.c.obj
FAILED: CMakeFiles/winmm.dir/winmm.c.obj
G:\cpp\mingw\bin\gcc.exe -Dwinmm_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/winmm.dir/winmm.c.obj -MF CMakeFiles\winmm.dir\winmm.c.obj.d -o CMakeFiles/winmm.dir/winmm.c.obj -c ../winmm.c
In file included from ../hijack.h:37:0,
from ../winmm.h:2,
from ../winmm.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[7/16] Building C object CMakeFiles/winhttp.dir/winhttp.c.obj
FAILED: CMakeFiles/winhttp.dir/winhttp.c.obj
G:\cpp\mingw\bin\gcc.exe -Dwinhttp_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/winhttp.dir/winhttp.c.obj -MF CMakeFiles\winhttp.dir\winhttp.c.obj.d -o CMakeFiles/winhttp.dir/winhttp.c.obj -c ../winhttp.c
In file included from ../hijack.h:37:0,
from ../winhttp.h:2,
from ../winhttp.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
[8/16] Building C object CMakeFiles/winsta.dir/winsta.c.obj
FAILED: CMakeFiles/winsta.dir/winsta.c.obj
G:\cpp\mingw\bin\gcc.exe -Dwinsta_EXPORTS -pipe -Wall -Wextra -nostartfiles -O3 -s -MD -MT CMakeFiles/winsta.dir/winsta.c.obj -MF CMakeFiles\winsta.dir\winsta.c.obj.d -o CMakeFiles/winsta.dir/winsta.c.obj -c ../winsta.c
In file included from ../hijack.h:37:0,
from ../winsta.h:2,
from ../winsta.c:1:
../native_api.h:8:22: fatal error: winternl.h: No such file or directory
#include <winternl.h>
^
compilation terminated.
ninja: build stopped: subcommand failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.