from * metadata _id, _index, _version | where (registry.path like "*\\\\Control\\\\SafeBoot\\\\Minimal\\\\*" or registry.path like "*\\\\Control\\\\SafeBoot\\\\Network\\\\*") and ends_with(registry.path, "\\(Default)") and registry.data.strings=="Service" and not (process.executable=="C:\\WINDOWS\\system32\\msiexec.exe" and (ends_with(registry.path, "\\Control\\SafeBoot\\Minimal\\SAVService\\(Default)") or ends_with(registry.path, "\\Control\\SafeBoot\\Network\\SAVService\\(Default)")) or ends_with(process.executable, "\\MBAMInstallerService.exe") and ends_with(registry.path, "\\MBAMService\\(Default)") and registry.data.strings=="Service" or process.executable=="C:\\Hexnode\\Hexnode Agent\\Current\\HexnodeAgent.exe" and (ends_with(registry.path, "\\Control\\SafeBoot\\Minimal\\Hexnode Updater\\(Default)") or ends_with(registry.path, "\\Control\\SafeBoot\\Network\\Hexnode Updater\\(Default)") or ends_with(registry.path, "\\Control\\SafeBoot\\Minimal\\Hexnode Agent\\(Default)") or ends_with(registry.path, "\\Control\\SafeBoot\\Network\\Hexnode Agent\\(Default)")) and registry.data.strings=="Service")