-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add quarantine check to scan for quarantine files and meddlesome processes #1333
add quarantine check to scan for quarantine files and meddlesome processes #1333
Conversation
formatting
pkg/debug/checkups/quarantine.go
Outdated
q.quarantineCounts = make(map[string]int) | ||
|
||
var ( | ||
quarantinePathDepths = map[string]int{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some documentation for what we're looking for in these directories? So that if the exact location of quarantined files ever changes for one of the meddlesome processes, we know what kind of file names or directories we're looking for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also maybe we'd want to switch on runtime.GOOS to only check the directories we care about for that particular OS? Would make the output a little bit cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pkg/debug/checkups/quarantine.go
Outdated
continue | ||
} | ||
|
||
q.quarantineCounts[dirPath]++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to list the names of the quarantined files? It looks like we're only doing count per directory, but maybe I'm missing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started off with that but learned that AVs tend to renamed the files to GUIDs then keep some metadata some where. I don't know if they all do this, only learned from seph that crowdstrike does this. Windows defender does the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further discussion, re adding file names, even if their just guid's it wont hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this, but I'll note that the test host I found had ~600 of them
`virus`, | ||
`quarantine`, | ||
`snitch`, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know what carbonblack's process name is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
googling revealed many possibilities, I added all the ones that looked promising
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let's try
This check reports and files that have "quarantine" in their path. It recursively checks each of the provided root dirs to the specified depth.
example summary:
❌ Quarantine: found 1 quarantined files
example log: