mirror of
https://github.com/chainguard-dev/osquery-defense-kit
synced 2024-12-16 11:04:34 +00:00
Merge pull request #117 from tstromberg/less-false2
Speed up unexpected-bpf-users query by basing it on processes
This commit is contained in:
commit
81a6e99436
@ -23,14 +23,16 @@ SELECT
|
|||||||
pp.euid AS parent_euid,
|
pp.euid AS parent_euid,
|
||||||
hash.sha256 AS child_sha256,
|
hash.sha256 AS child_sha256,
|
||||||
phash.sha256 AS parent_sha256
|
phash.sha256 AS parent_sha256
|
||||||
|
-- Using processes is much faster than process_memory_map
|
||||||
FROM
|
FROM
|
||||||
process_memory_map pmm
|
processes p
|
||||||
LEFT JOIN processes p ON pmm.pid = p.pid
|
LEFT JOIN process_memory_map pmm ON p.pid = pmm.pid
|
||||||
LEFT JOIN processes pp ON p.parent = pp.pid
|
LEFT JOIN processes pp ON p.parent = pp.pid
|
||||||
LEFT JOIN hash ON p.path = hash.path
|
LEFT JOIN hash ON p.path = hash.path
|
||||||
LEFT JOIN hash AS phash ON pp.path = phash.path
|
LEFT JOIN hash AS phash ON pp.path = phash.path
|
||||||
WHERE
|
WHERE
|
||||||
(
|
p.euid = 0
|
||||||
|
AND (
|
||||||
lib_path LIKE '%:bpf%'
|
lib_path LIKE '%:bpf%'
|
||||||
OR lib_path LIKE '%libbpf%'
|
OR lib_path LIKE '%libbpf%'
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user