opensnitch/daemon/procmon
Gustavo Iñiguez Goia 1a493b9da1
ebpf: improved process details gathering
In order to detect short-lived processes we intercept new processes
executions as they happen, and cache them for later use.

When a new connection is established, then we check if the PID of the
connection is cached, and use the details of the process to ask the user
to allow or deny it.

However, there're some situations where the path or cmdline of a PID,
doesn't correspond with the one that's establishing the connection.

Given the same PID:
 - Sometimes we receive from the tracepoint a wrong/non-existent path.
 - Other times we receive a "helper" which is the one executing the
   real binary that opens the connection.

For these reasons now when a new connection is established, we read the
path to the binary from proc. If the PID is cached and the cached path
differs, then we'll use the path from proc.

We lose a bit of performance, but hopefully we'll be more consistent
with what the user expect, while at the same time keeping intercepting
short-lived processes.

Downsides: for execveat() executions we won't display the original binary.

Closes #771
2022-11-27 14:03:13 +01:00
..
audit improved monitor method switching (audit) 2021-03-30 01:13:02 +02:00
ebpf ebpf: improved process details gathering 2022-11-27 14:03:13 +01:00
monitor improved process monitor method (re)configuring 2021-09-04 21:18:22 +02:00
activepids.go ebpf: improved process detection/new events module 2022-06-24 01:09:45 +02:00
activepids_test.go ebpf: improved process detection/new events module 2022-06-24 01:09:45 +02:00
cache.go fixed exception when cleaning up the cache 2021-09-02 20:51:18 +02:00
cache_test.go cache of PIDs: added new tests, fixed rare crash 2021-08-11 14:19:43 +02:00
details.go ebpf: increased ring buffer size, hook execveat 2022-10-13 01:44:23 +02:00
find.go cache, pids/inodes: fixed race conditions, improvements 2021-07-21 15:04:23 +02:00
find_test.go cache improvements 2021-03-19 19:05:45 +01:00
parse.go ebpf: improved process detection/new events module 2022-06-24 01:09:45 +02:00
process.go new feature: send alerts to the server/UI 2022-10-12 13:31:45 +02:00
process_test.go ebpf: improved process detection/new events module 2022-06-24 01:09:45 +02:00
watcher.go improved process monitor method (re)configuring 2021-09-04 21:18:22 +02:00