I am trying to build a PoC of osquery on Windows boxes and I just cannot get osqueryd.exe (or osqueryi.exe) get to use the flagfile. I think there must be something I have missed in documentation or whatever. Steps I tried:
- Validate the actual flags. When I pass them as command line arguments, it works.
- Tried both formats I´ve found on net:
osqueryd.exe --flagfile=C:\ProgramData\osquery\osquery.flags
andosqueryd.exe --flagfile C:\ProgramData\osquery\osquery.flags
. - Relax the permissions to the point that all files had Everyone with
full permissions (I had to add
--allow_unsafe
). - Create the flagfile under SYSTEM account.
- Running osquery as user, admin and SYSTEM.
- Install the osquery service with the manage-osqueryd.ps1 script. When I pass all parameters with -startupArgs, the service does work. When I pass only the flagfile, it does not.
Is there anything obvious I am missing?
Thank you
Tom