Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auditbeat running on host can't hash executable inside container - different namespaces #29678

Closed
xavigpich opened this issue Jan 4, 2022 · 3 comments

Comments

@xavigpich
Copy link

Describe the enhancement:
Auditbeat running on the host is auditing processes inside a Docker container. Auditbeat will hash an executable during the process enrichment even if that path is unreachable because it resides in a different namespace.

These expected errors are logged at WARN level. See below:

Jan 4 11:07:47 <hostname> auditbeat[16076]: 2021-12-17T11:07:47.857Z        WARN        [process]        process/process.go:249        failed to hash executable /usr/bin/python3.6 (deleted) for PID 1714: failed to stat file /usr/bin/python3.6 (deleted): stat /usr/bin/python3.6 (deleted): no such file or directory
Jan 4 11:07:47 <hostname> auditbeat[16076]: 2021-12-17T11:07:47.921Z        WARN        [process]        process/process.go:249        failed to hash executable /usr/lib/xorg/Xorg (deleted) for PID 2749: failed to stat file /usr/lib/xorg/Xorg (deleted): stat /usr/lib/xorg/Xorg (deleted): no such file or directory
Jan 4 11:08:02 <hostname> auditbeat[16076]: 2021-12-17T11:08:02.592Z        WARN        [process]        process/process.go:249        failed to hash executable /pause for PID 18534: failed to stat file /pause: stat /pause: no such file or directory

Haven't tried it, but Auditbeat running on a container might experience same errors on the OS namespace.

Describe a specific use case for the enhancement or feature:
Auditbeat hasher can recognize the audit event is originated in a container namespace and that it might not have access to it. In such cases, Auditbeat shouldn't try to hash the file - report on process metrics (#25777)

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 4, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 10, 2022
@efd6
Copy link
Contributor

efd6 commented Jan 19, 2022

@thisisxgp are you happy that #29786 has fixed this for you?

@xavigpich
Copy link
Author

Yeah, thanks for implementing the enhancement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants