Skip to content

Commit

Permalink
fix(processors): Skip hidden registry keys
Browse files Browse the repository at this point in the history
If the registry value is found within the hidden
key, skip reading the value as it would inevitably
fail.
  • Loading branch information
rabbitstack committed Nov 21, 2024
1 parent e5e91ca commit f7e8dc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/etw/processors/registry_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ func (r *registryProcessor) processEvent(e *kevent.Kevent) (*kevent.Kevent, erro
return e, nil
}

// values within hidden keys cannot be read
if strings.HasSuffix(keyName, "\\") {
return e, nil
}

rootkey, subkey := key.Format(keyName)
if rootkey != key.Invalid {
typ, val, err := rootkey.ReadValue(subkey)
Expand Down

0 comments on commit f7e8dc5

Please sign in to comment.