-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Shimcache Table #6463
Shimcache Table #6463
Conversation
@theopolis Thanks for the comments and review |
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.
Thanks for iterating on this!
@theopolis All comments should be addressed, let me know if there are any other issues |
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.
This looks great!
One last consideration for consistency. In a lot of other tables we represent "tri-states" in columns as either {-1, 0, 1} or {NULL, 0, 1}. My recommendation is to follow that pattern for execution_flag
in the schema.
So concretely:
- Change
Looks good! |
5584a9b
to
040d472
Compare
Hi @puffyCid, I did some work to refactor+minify the code. I'd like to look at recent PRs, specifically around Windows filetime parsing, and see if we should move some of the utility functions here, elsewhere. |
Actually, we can do code shuffle in another PR. Last question about this table: can we drop the |
I would prefer if the
The above shimcache entries show that the user launched Windows Terminal, executed ipconfig.exe, ping.exe, net.exe in that order (execution order is read bottom to top, newest shimcache entries are at the top) but if it will cause issues i can remove it if necessary. |
Ok, we can leave it. The problem I referenced is related to "differential" queries where osquery tries to calculate set differences between scheduled queries. If someone removes a row, for example the first |
This PR adds a shimcache table to osquery for Windows systems.
Shimcache (Application Compatibility Cache, also sometimes called "AppcompatCache") contains entries of executed applications on Windows systems (it may also contain a list of executable's enumerated by Explorer when browsing the file system). Shimcache entries contain:
Additional info can be found here: https://medium.com/@bromiley/windows-wednesday-shim-cache-1997ba8b13e7
This PR enumerates all the ControlSets on a Windows system and parses the Shimcache entries.
Its been tested on Windows 8.1 and Windows 10 (Creators update)
It should also work on Windows 10 (Pre-Creators) but I do not have VM to test on.
The PR also makes a few small changes to Userassist in regards timestamp conversion
Let me know if there are any issues