MCPcopy Create free account
hub / github.com/codeyourweb/irma / RegistryAnalysisRoutine

Function RegistryAnalysisRoutine

windowsregistry.go:21–45  ·  view source on GitHub ↗

RegistryAnalysisRoutine analyse registry persistence keys every 15 seconds

(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules)

Source from the content-addressed store, hash-verified

19
20// RegistryAnalysisRoutine analyse registry persistence keys every 15 seconds
21func RegistryAnalysisRoutine(pQuarantine string, pKill bool, pNotifications bool, pVerbose bool, pInfiniteLoop bool, rules *yara.Rules) {
22 for {
23 values, errors := EnumRegistryPeristence()
24
25 if pVerbose {
26 for _, err := range errors {
27 logMessage(LOG_ERROR, "[ERROR]", err)
28 }
29 }
30
31 for _, k := range values {
32 paths := FormatPathFromComplexString(k.value)
33 for _, p := range paths {
34 FileAnalysis(p, pQuarantine, pKill, pNotifications, pVerbose, rules, "REGISTRY")
35 }
36 }
37
38 if !pInfiniteLoop {
39 wg.Done()
40 break
41 } else {
42 time.Sleep(15 * time.Second)
43 }
44 }
45}
46
47// EnumRegistryPeristence get all the potential registry values used for persistence
48func EnumRegistryPeristence() (values []RegistryValue, errors []error) {

Callers 1

mainFunction · 0.85

Calls 4

EnumRegistryPeristenceFunction · 0.85
logMessageFunction · 0.85
FileAnalysisFunction · 0.85

Tested by

no test coverage detected