A Splunk technology add-on for osquery
branch | build status |
---|---|
master |
- Sourcetype: osquery:results, osquery:snapshots, osquery:INFO, osquery:WARNING, osquery:ERROR
- Has index-time ops: false
- Parses and extracts fields for the following logs:
osqueryd.INFO, osqueryd.WARNING, osqueryd.ERROR
osqueryd.results.log
(from process_events and file_events tables)osqueryd.snapshots.log
- Provides Datamodel Mapping for:
- Changes Data Model based on custom
splunk
query pack - Endpoint Data Model based on custom
splunk
query pack
- Changes Data Model based on custom
- Does correct time extraction
- Currently documented and tested for macOS only, although parsing logic can be reused for *nix & Windows if desired.
- Note, logs do not include parent process information other than parent process id
- Copy default/inputs.conf to local/inputs.conf and uncomment all the stanzas
- Drop the TA on the Search Head(s), Indexer(s), Heavy Forwarder (if required, or if using AWS), and Universal Forwarder (if required).
This deployment process has been documented and tested based on Mac OS Sequoia. It is important that you thoroughly test this on your environment before rolling out to production. Ref: https://osquery.readthedocs.io
- Download and install osquery package following instructions
- Copy osquery.conf and osquery.flags files to /var/osquery
- Ensure that Full Disk Access (FDA) permission is enabled in macOS Privacy & Security settings for osqueryd (/opt/osquery/lib/osquery.app/Contents/MacOS/osqueryd)
osquery config
This is the preferred collection method as it removes the need for a Universal Forwarder on each endpoint and ensures remote log connection can be achieved whether or not the endpoint is connected to the corporate network. Splunk Cloud is great way of logging from endpoints but would still require a Universal Forwarder to be rolled out.
The install process is the same as above, apart from the osquery.conf needs to be modified to log to AWS. This can be done by following the osquery doc https://osquery.readthedocs.io/en/stable/deployment/aws-logging/
splunk config
- Install and configure Splunk Add-On For Amazon Web Services on your Heavy Forwarder to pull your osquery events from your S3 bucket.
- Document a 'Logging locally' method, whereby log rotation is discussed, and running Splunk UF as root to read the log file.
- Jamie Windley