MCPcopy Create free account
hub / github.com/T3nb3w/ComDotNetExploit / CleanDcomReflection

Method CleanDcomReflection

Bypass_COM_PPL/registry_utils.cpp:20–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20bool RegistryUtils::CleanDcomReflection() {
21 HKEY hKey;
22 LPCWSTR subKey = L"SOFTWARE\\Microsoft\\.NETFramework";
23 LPCWSTR valueName = L"AllowDCOMReflection";
24
25 // Open the key first
26 LONG result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, &hKey);
27 if (result != ERROR_SUCCESS) return false;
28
29 // Delete the value
30 result = RegDeleteValue(hKey, valueName);
31 RegCloseKey(hKey);
32
33 return (result == ERROR_SUCCESS || result == ERROR_FILE_NOT_FOUND);
34}
35
36bool RegistryUtils::SetTreatAs(const CLSID& originalClsid, const CLSID& newClsid) {
37 WCHAR originalClsidStr[40], newClsidStr[40];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected