-
-
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
Add FileVersionRaw Column to File Table for Windows #5737
Comments
Hey @alessandrogario I would be interested in working on this |
Go for it! Thanks for helping us out! 😄 |
@alessandrogario from what I can see from the code the addition seems to be made in the following files: osquery/osquery/tables/utility/file.cpp The problem is in the fileops.h file, we have the blueprint of windowsGetFileVersion() method which gets the product version of the entity. A similar function needs to be implemented for getting the file version as well. We would be needing a new method because the current implementation of windowsGetFileVersion() takes rVersion parameter which is a reference to product_version of the windows stat file. Editing the same function(ex: instead of passing the rVersion we could pass the stat file) is going to put some changes in the other files as well like for example: osquery/osquery/tables/system/windows/ie_extensions.cpp calls the same function in the code Also I feel it would be more meaningful to name the function as windowsGetProductVersion() then. I need your inputs on this as you might be having some better ways to do this? |
Hello @nasehim7! in order not to duplicate the logic inside the function, you could also just add a new parameter to it while also refactoring the names a little: Status windowsGetVersionSomething(const std::string& path,
std::string& product_version,
std::string& file_version) {
} Another approach could be to extract the logic in a function defined in an anonymous namespace inside the implementation file. Thanks for looking into this! 😄 |
Thanks @alessandrogario for your inputs. I have raised a PR for the same :) |
Feature request
What new feature do you want?
Add FileVersionRaw Column to File Table for Windows
How is this new feature useful?
Having the ProductVersionRaw is a big help already! Some Files use FileVersionRaw instead of Product.
I could query a executable for its FileVersion and track it overtime for auto updates
How can this be implemented?
Add FileVersionRaw to the files table, should be a simple addition since productversionraw is already in 4.0
The text was updated successfully, but these errors were encountered: