osquery-defense-kit/incident_response/logged_in_users.sql

16 lines
247 B
MySQL
Raw Normal View History

2022-10-13 13:11:17 +00:00
-- Retrieves the list of all the currently logged in users in the target system.
--
-- tags: postmortem
2022-10-13 13:11:17 +00:00
-- platform: posix
SELECT
2022-10-17 23:06:17 +00:00
liu.*,
p.name,
p.cmdline,
p.cwd,
p.root
FROM
2022-10-17 23:06:17 +00:00
logged_in_users liu,
processes p
WHERE
2022-10-17 23:06:17 +00:00
liu.pid = p.pid;