varwara / CVE-2024-35250

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

unresolved link #1

Open johnjohnsp1 opened 1 month ago

johnjohnsp1 commented 1 month 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 1 month 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 month ago

and what is the correct command to compile ?

varwara commented 1 month ago

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