osquery-defense-kit/incident_response/open_files.sql
Thomas Stromberg e785c35614
v0.0.1
2022-10-13 09:11:17 -04:00

9 lines
390 B
SQL

-- Retrieves all the open files per process in the target system.
--
-- interval: 86400
-- platform: posix
-- value: Identify processes accessing sensitive files they shouldn't
-- version: 1.4.5
select distinct pid, path from process_open_files where path not like '/private/var/folders%' and path not like '/System/Library/%' and path not in ('/dev/null', '/dev/urandom', '/dev/random');