Unusually Long Uptime Likely Missing Patches
osquery
Indicative of a machine that probably needs a reboot for operating-system patches
Description
ODK (osquery-defense-kit) is unique in that the queries are designed to be used as part of a production detection & response pipeline. The detection queries are formulated to return zero rows during normal expected behavior, so that they may be configured to generate alerts when rows are returned.
Query
-- Indicative of a machine that probably needs a reboot for operating-system patches
--
-- tags: persistent state
-- platform: posix
SELECT
AS os_name,
os_version.name AS os_version,
os_version.version AS kernel,
kernel_info.version AS uptime_days
days FROM
kernel_info,
os_version,
uptimeWHERE
> 89; uptime.days
tags: SStagSS