Giter Club home page Giter Club logo

Comments (9)

saschagrunert avatar saschagrunert commented on July 22, 2024

Thank you for the feature request @meghna-pancholi! 🙏

if the "exec" system call caused a policy violation, then a log entry can report this violation

Can you share an example of that so that I can understand the feature better?

from security-profiles-operator.

meghna-pancholi avatar meghna-pancholi commented on July 22, 2024

Yes! This is an example of an audit log entry of a Seccomp violation:

type=ANOM_ABEND msg=audit(1706114183.948:8264563): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=docker-default pid=2040848 comm="mkdir" exe="/bin/busybox" sig=31 res=1

Here, the offending system call is "mkdir". This is an audit log entry I saw by checking the audit log when I had a Seccomp filter with ACT_TRAP, but it was not reported by the log enricher.

from security-profiles-operator.

saschagrunert avatar saschagrunert commented on July 22, 2024

Ah so we basically need to support the ANOM_ABEND type? We can extend the enricher to allow that. But ANOM_ABEND can be caused by any signal, right? Not only seccomp violations.

from security-profiles-operator.

saschagrunert avatar saschagrunert commented on July 22, 2024

cc @pjbgf ☝️

from security-profiles-operator.

pjbgf avatar pjbgf commented on July 22, 2024

From the RH's documentation, this event type seems orthogonal to seccomp/selinux/apparmor:

ANOM_ABEND: Triggered when a processes ends abnormally (with a signal that could cause a core dump, if enabled)... All Audit event types prepended with ANOM are intended to be processed by an intrusion detection program.

Although there may be value on extending the log enricher to surface all log entries (from the worker nodes) and correlate them to running pods, we would need to consider the impact on resource utilisation and ensure that the new lines won't impact on profiles that are automatically generated in combination with the log enricher. Neither are hard problems, just things that would need to be ironed out.

That being said, I suspect you would be able to get a seccomp log entry for that violation if you set your profile to complain mode (e.g. SCMP_ACT_LOG) and decrease the log throttle settings:

sudo sysctl -w net.core.message_burst=0
sudo sysctl -w net.core.message_cost=0

Please make sure you take note of the previous values (e.g. sudo sysctl -a | grep net.core.message) in case you need to revert to them.

A trick may be to configure the seccomp in your dev/test worker nodes to be more verbose, so you can capture such information way before you hit production.

from security-profiles-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.