osquery-defense-kit/incident_response/files-downloads.sql

16 lines
338 B
MySQL
Raw Normal View History

2023-05-12 20:17:10 +00:00
-- Returns a list of file information from Downloads directories
--
-- tags: postmortem
-- platform: posix
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
2023-05-12 20:26:44 +00:00
file.path LIKE "/home/%/Downloads/%"
OR file.path LIKE "/Users/%/Downloads/%"