2022-09-30 16:10:18 +00:00
|
|
|
-- Processes running that originate from setuid/setgid programs
|
2022-10-14 18:19:13 +00:00
|
|
|
--
|
|
|
|
-- tags: state process escalation
|
2022-09-30 16:10:18 +00:00
|
|
|
SELECT
|
|
|
|
p.pid,
|
|
|
|
p.name,
|
|
|
|
p.path,
|
|
|
|
p.cmdline,
|
|
|
|
f.ctime,
|
|
|
|
p.cwd,
|
|
|
|
p.uid,
|
|
|
|
f.mode,
|
|
|
|
hash.sha256
|
|
|
|
FROM
|
|
|
|
processes p
|
|
|
|
JOIN file f ON p.path = f.path
|
|
|
|
JOIN hash ON p.path = hash.path
|
|
|
|
WHERE
|
2022-10-13 18:59:32 +00:00
|
|
|
f.mode NOT LIKE '0%'
|
2022-09-30 16:10:18 +00:00
|
|
|
AND f.path NOT IN (
|
2022-10-13 18:59:32 +00:00
|
|
|
'/bin/ps',
|
|
|
|
'/Library/DropboxHelperTools/Dropbox_u501/dbkextd',
|
|
|
|
'/opt/1Password/1Password-BrowserSupport',
|
|
|
|
'/opt/1Password/1Password-KeyringHelper',
|
|
|
|
'/usr/bin/doas',
|
|
|
|
'/usr/lib/xf86-video-intel-backlight-helper',
|
|
|
|
'/usr/bin/mount',
|
|
|
|
'/usr/bin/fusermount',
|
|
|
|
'/usr/bin/fusermount3',
|
|
|
|
'/usr/sbin/traceroute',
|
|
|
|
'/usr/bin/login',
|
|
|
|
'/usr/bin/ssh-agent',
|
|
|
|
'/usr/bin/su',
|
|
|
|
'/Applications/Parallels Desktop.app/Contents/MacOS/Parallels Service',
|
|
|
|
'/usr/bin/sudo',
|
|
|
|
'/usr/bin/top',
|
|
|
|
'/usr/lib/Xorg.wrap'
|
2022-09-30 16:10:18 +00:00
|
|
|
);
|