用于检测与事件响应的 osquery 查询,包含 250+ 个生产级查询。

ODK(osquery-defense-kit)的独特之处在于,这些查询被设计为生产环境检测与响应管道的一部分。检测查询在正常预期行为下返回零行,因此可以配置为在返回行时生成告警。
目前,这些查询主要面向 POSIX 平台(Linux 和 macOS)执行。欢迎提交拉取请求以改进对其他平台的支持。
运行 make detect 进行即时检测。与生产环境安装相比,它无法检测到那么多内容,因为它无法访问历史事件。
将已发布的查询包下载到方便的位置,并在你的 osquery.conf 文件的 packs 段中指向这些文件。
运行 make collect。这对于前后对比分析尤其有用。
运行 make packs。如需更多控制,你可以直接调用 osqtool,以覆盖默认间隔或排除检查项。
运行 make verify
detection/ - 针对告警生成调优的威胁检测查询。policy/ - 针对告警生成调优的安全策略查询。incident_response/ - 用于协助响应潜在威胁的数据收集。针对定期证据收集进行调优。检测查询进一步按 MITRE ATT&CK 战术类别划分。
发布时,查询会打包为 osquery 查询包 格式。有关如何随时生成自己的包的信息,请参阅 本地包生成。
https://cybersecurity.att.com/blogs/labs-research/shikitega-new-stealthy-malware-targeting-linux
以下是基于这些查询会触发告警的查询的部分列表:
execution/tiny-executable-events.sqlexecution/tiny-executable.sqlexecution/tiny-executable-events.sqlexecution/tiny-executable.sqlexecution/unexpected-shell-parents.sqlexecution/sketchy-fetchers.sqlexecution/sketchy-fetcher-events.sqlc2/unexpected-talkers-linux.sqlc2/exotic-command-events.sqlc2/exotic-cmdline.sqlexecution/unexpected-executable-permissions.sqlhttps://www.welivesecurity.com/2022/07/19/i-see-what-you-did-there-look-cloudmensis-macos-spyware/
以下是特定查询会检测到的阶段的部分列表:
初始投放器执行,由以下查询检测:
c2/unexpected-talkers-macos.sql第二阶段执行,由以下查询检测:
execution/unexpected-executable-directory-macos.sqlpersistence/unexpected-launch-daemon-macos.sqlexecution/unexpected-mounts.sqlTCC 绕过,由以下查询检测:
evasion/unexpected-env-values.sql间谍代理执行,由以下查询检测:
c2/unexpected-talkers-macos.sqlexecution/exotic-command-events.sqlexecution/unexpected-executable-directory-macos.sql欢迎帮助!我们支持任何新查询,只要它们能够轻松更新以解决误报问题。
用户可以针对流行的知名软件包提交误报豁免,但可能会被要求提供该行为的证据。
虽然最初专注于 Linux 和 macOS,但我们支持在 osquery 支持的任何平台上添加查询。
特别是,有人问过 Windows 支持的问题:Chainguard 没有任何 Windows 机器,但如果你有符合我们理念且你认为有用的 Windows 查询,我们非常乐意接受!
我们致力于从 detection 查询中排除现实世界中的误报。
管理误报说起来容易做起来难——欢迎提交拉取请求!
总体而言,在已部署的系统上,查询一天内消耗的挂钟时间不应超过 2%。
部署间隔会根据我们用于包组装的 osqtool 所支持的标签自动确定。
execution/unexpected-executable-directory-linux.sqlexecution/unexpected-tmp-executables.sqlc2/exotic-command-events.sqlc2/exotic-cmdline.sqlinitial_access/unexpected-shell-parents.sqlevasion/missing-from-disk-linux.sqlprivesc/unexpected-setxid-process.sqlprivesc/unexpected-privilege-escalation.sqlprivesc/events/unexpected-privilege-escalation-events.sqlevasion/name_path_mismatch.sqlpersistence/unexpected-cron-entries.sqlexecution/unexpected-executable-directory-linux.sql