Auditbeat: Fix processes misattribution in system/socket dataset#29166
Auditbeat: Fix processes misattribution in system/socket dataset#29166adriansr merged 8 commits intoelastic:masterfrom
Conversation
|
This pull request does not have a backport label. Could you fix it @adriansr? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Accepted sockets must be treated as terminating the existing socket and creating a new one instead of just updating an existing flow.
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
| pid: childPID, | ||
| name: parent.name, | ||
| path: parent.path, | ||
| args: parent.args, // TODO: shallow copy |
There was a problem hiding this comment.
Would this copy be useful? We don't mutate process.args element-wise after creation, so this should be fine the way you have it.
) - Track forked processes - Make accept() create a new socket - Improve flow tracking - Set client/server depending on port number when direction is unknown - Use kernel's monotonic clock explicitly (cherry picked from commit fab2197)
) - Track forked processes - Make accept() create a new socket - Improve flow tracking - Set client/server depending on port number when direction is unknown - Use kernel's monotonic clock explicitly (cherry picked from commit fab2197)
What does this PR do?
This PR adds some fixes to Auditbeat's system/socket dataset in order to improve the process/flow correlation. During testing, the following issues have been identified.
acceptwas not handled properly. This was a major cause of process misattribution as the new flow could be associated to the previous process using the socket.Why is it important?
It had been reported that the dataset could provide incorrect process information, associating flows with the wrong process, and could also mismatch the origin of a connection, assigning the server side as the client.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Related issues
Fixes #17165