varwara / CVE-2024-35250

PoC for the Untrusted Pointer Dereference in the ks.sys driver
MIT License
190 stars 43 forks source link

unresolved link #1

Open johnjohnsp1 opened 2 weeks ago

johnjohnsp1 commented 2 weeks ago

Hi, thanks for sharing the pic, using VStudio2022 to compile the code but once I hit build I have as return those 2 error

Error LNK2019 unresolved external symbol WinMain referenced in function "int cdecl scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ) CVE-2024-35250 C:\temp\CVE-2024-35250\MSVCRT.lib(exe_winmain.obj) 1

Error LNK1120 1 unresolved externals CVE-2024-35250 C:\temp\CVE-2024-35250\x64\Release\CVE-2024-35250.exe 1

I miss anything or did something wrong ? thanks

varwara commented 2 weeks ago

@johnjohnsp1 hi, you are probably creating application with /SUBSYSTEM:WINDOWS and not /SUBSYSTEM:CONSOLE. For the first one you need to change entry point to the WinMain.

https://learn.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem?view=msvc-170

sec13b commented 1 week ago

and what is the correct command to compile ?

varwara commented 1 week ago

https://github.com/varwara/CVE-2024-35250/issues/4#issuecomment-2429726174