[Filebeat] [auditd]: Support EXECVE events with truncated argument list#30382
[Filebeat] [auditd]: Support EXECVE events with truncated argument list#30382adriansr merged 3 commits intoelastic:mainfrom
Conversation
This modifies Filebeat's auditd pipeline to support parsing of EXECVE records with truncated argument lists. When such a log is found, the arguments will be appended to process.args with a leading entry informing about the truncation. This is to prevent a mapping explosion in Filebeat when a lot of these logs are ingested with the previous pipeline version.
|
This pull request does not have a backport label. Could you fix it @adriansr? 🙏
NOTE: |
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
💔 Tests Failed
Expand to view the summary
Build stats
Test stats 🧪
Test errors
Expand to view the tests failures
|
|
Tests failed due to flaky test, fixed here #30453 |
…st (#30382) This modifies Filebeat's auditd pipeline to support parsing of EXECVE records with truncated argument lists. When such a log is found, the arguments will be appended to process.args with a leading entry informing about the truncation. This is to prevent a mapping explosion in Filebeat when a lot of these logs are ingested with the previous pipeline version. (cherry picked from commit 79229e7) # Conflicts: # filebeat/module/auditd/log/ingest/pipeline.yml
…st (#30382) This modifies Filebeat's auditd pipeline to support parsing of EXECVE records with truncated argument lists. When such a log is found, the arguments will be appended to process.args with a leading entry informing about the truncation. This is to prevent a mapping explosion in Filebeat when a lot of these logs are ingested with the previous pipeline version. (cherry picked from commit 79229e7)
…st (#30382) This modifies Filebeat's auditd pipeline to support parsing of EXECVE records with truncated argument lists. When such a log is found, the arguments will be appended to process.args with a leading entry informing about the truncation. This is to prevent a mapping explosion in Filebeat when a lot of these logs are ingested with the previous pipeline version. (cherry picked from commit 79229e7)
…h truncated argument list (#30457) * [Filebeat] [auditd]: Support EXECVE events with truncated argument list (#30382) This modifies Filebeat's auditd pipeline to support parsing of EXECVE records with truncated argument lists. When such a log is found, the arguments will be appended to process.args with a leading entry informing about the truncation. This is to prevent a mapping explosion in Filebeat when a lot of these logs are ingested with the previous pipeline version. (cherry picked from commit 79229e7) Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
…h truncated argument list (#30456) * [Filebeat] [auditd]: Support EXECVE events with truncated argument list (#30382) This modifies Filebeat's auditd pipeline to support parsing of EXECVE records with truncated argument lists. When such a log is found, the arguments will be appended to process.args with a leading entry informing about the truncation. This is to prevent a mapping explosion in Filebeat when a lot of these logs are ingested with the previous pipeline version. (cherry picked from commit 79229e7) Co-authored-by: Adrian Serrano <adrisr83@gmail.com>
…nd-k8s-env * upstream/main: fix typos and improve sentences (elastic#30432) Add drop and explicit tests to avoid duplicate ingest of elasticsearch logs (elastic#30440) {,x-pack/}auditbeat: replace uses of github.com/pkg/errors with stdlib equivalents (elastic#30321) Spelling fix (elastic#30439) packetbeat/beater: make sure Npcap installation runs before interfaces are needed in all cases (elastic#30438) Add BC about Homebrew no longer being available in 8.0 (elastic#30419) Install gawk as a replacement for mawk in Docker containers. (elastic#30452) Clean up python-related system tests (elastic#30415) Fix TestNewModuleRegistry flakiness (elastic#30453) [Filebeat] [auditd]: Support EXECVE events with truncated argument list (elastic#30382) Set `log.offset` to the start of the reported line in filestream (elastic#30445) clarify SelectedPackageTypes meaning and improve its usage (elastic#30142) [elasticsearch module] serialize shards properties (elastic#30408) Add docs about hints and templates autodiscovery priority (elastic#30343)
…ckaging-docker * upstream/main: (26 commits) Update docker/distribution to 2.8.0 (elastic#30462) Add `parsers` examples to `filestream` reference configuration (elastic#30529) extend documentation about setting orchestrator.cluster fields (elastic#30518) Forward-port 8.0.1 changelog to main (elastic#30522) Switch skip to use `CI` (elastic#30512) packetbeat/beater: don't attempt to install npcap when already installed (elastic#30509) Fix Docker module: rename fields on dashboards (elastic#30500) fix typos and improve sentences (elastic#30432) Add drop and explicit tests to avoid duplicate ingest of elasticsearch logs (elastic#30440) {,x-pack/}auditbeat: replace uses of github.com/pkg/errors with stdlib equivalents (elastic#30321) Spelling fix (elastic#30439) packetbeat/beater: make sure Npcap installation runs before interfaces are needed in all cases (elastic#30438) Add BC about Homebrew no longer being available in 8.0 (elastic#30419) Install gawk as a replacement for mawk in Docker containers. (elastic#30452) Clean up python-related system tests (elastic#30415) Fix TestNewModuleRegistry flakiness (elastic#30453) [Filebeat] [auditd]: Support EXECVE events with truncated argument list (elastic#30382) Set `log.offset` to the start of the reported line in filestream (elastic#30445) clarify SelectedPackageTypes meaning and improve its usage (elastic#30142) [elasticsearch module] serialize shards properties (elastic#30408) ...
Prevents the indices exceeding the 10,000 field limit due to an arbitrarily large number of aNN fields. This is a combination of the following Filebeat module fixes: - elastic/beats#29601 - elastic/beats#30382 Updates version to 2.1.0
What does this PR do?
This modifies Filebeat's auditd ingest pipeline to support parsing of EXECVE events with truncated argument lists.
In a normal EXECVE event, the auditd fields
argc(=N) anda0toaN-1are present. The pipeline would store the arguments in theprocess.argsarray, as well as setprocess.args_countto N andprocess.executabletoprocess.args[0].A truncated EXECVE event usually lacks the
argcfield, and contains only the last fewaNNfields.In that case, this PR will add the arguments into
process.argswith a leading warning[... N truncated arguments ...]and will not populateprocess.executable.Why is it important?
This PR avoids ingesting an arbitrarily large number of fields in the form
aNN,aNN_lenandaNN[M], to prevent a mapping explosion leading to large indices:This was partially fixed by #29601, but after it was merged, we observed truncated EXECVE records that were still causing issues.
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