Returns a list of file information from Downloads directories


Query · osquery

-- Returns a list of file information from Downloads directories
--
-- tags: postmortem
-- platform: posix
-- interval: 3600
SELECT
  file.*,
  magic.data,
  hash.sha256
FROM
  file
  LEFT JOIN magic ON file.path = magic.path
  LEFT JOIN hash ON file.path = hash.path
WHERE
  (
    file.path LIKE "/home/%/Downloads/%"
    OR file.path LIKE "/Users/%/Downloads/%"
  )
  AND (
    mtime > (strftime('%s', 'now') -3600)
    OR ctime > (strftime('%s', 'now') -3600)
    OR btime > (strftime('%s', 'now') -3600)
  )
Raw source Returns a list of file information from Downloads directories · osquery SQL
Esc
Published by chainguard-dev/osquery-defense-kit ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
-- Returns a list of file information from Downloads directories
--
-- tags: postmortem
-- platform: posix
-- interval: 3600
SELECT
  file.*,
  magic.data,
  hash.sha256
FROM
  file
  LEFT JOIN magic ON file.path = magic.path
  LEFT JOIN hash ON file.path = hash.path
WHERE
  (
    file.path LIKE "/home/%/Downloads/%"
    OR file.path LIKE "/Users/%/Downloads/%"
  )
  AND (
    mtime > (strftime('%s', 'now') -3600)
    OR ctime > (strftime('%s', 'now') -3600)
    OR btime > (strftime('%s', 'now') -3600)
  )

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.