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

Beta rule updates #247

Merged
merged 33 commits into from
Jun 19, 2017
Merged

Beta rule updates #247

merged 33 commits into from
Jun 19, 2017

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Jun 5, 2017

No description provided.

@mstemm mstemm force-pushed the beta-rule-updates branch 3 times, most recently from 64de0a5 to 26d2f17 Compare June 8, 2017 20:15
@mstemm mstemm force-pushed the beta-rule-updates branch 2 times, most recently from c586502 to 9495668 Compare June 15, 2017 01:45
- add anacron as a cron program
Split package_management_binaries into two separate lists rpm_binaries
and deb_binaries. unattended-upgr is common to both worlds so it's still
in package_management_binaries.

Also change Write below rpm database to use rpm_binaries instead of its
own list.

Also add 75-system-updat (truncated) as a shell spawner.
mstemm added 12 commits June 19, 2017 10:16
Add rules that allow jenkins to spawn shells, both in containers and
directly on the host.

Also handle jenkins slaves that run /tmp/slave.jar.
Not yet allowing node to run shells itself, although we want to add
something to reduce node-related FPs.
urlgrabber and git-remote both try to access the RHEL nss database,
containing shared certificates. I may change this in a more general way
by changing open_read/open_write to only look for successful opens.
Change the macros open_read/open_write to only trigger on successful
opens (when fd.num > 0). This is a pretty big change to behavior, but
is more intuitive.

This required a small update to the open counts for a couple of unit
tests, but otherwise they still all passed with this change.
sdchecks is a part of the sysdig monitor agent.
Specifically this includes blkid and /etc/blkid/blkid.tab.
They were already allowed to run shells in a container.
Allows userspace programs to write to kernel log.
Also allow gmake/cmake to spawn shells and put them in their own list
make_binaries.
Mesos slaves appear to be in a container due to their cgroup and can run
programs mesos-health-check/mesos-docker-exec to monitor the containers
on the slave, so allow them to run shells.

Add mesos-agent, mesos-logrotate, mesos-fetch as shell spawners both in
and out of containers.

Add gen_resolvconf. (short for gen_resolvconf.py) as a program that can
write to /etc.

Add toybox (used by mesos, part of http://landley.net/toybox/about.html)
as a shell spawner.
Systemd can listen on network ports to launch daemons on demand, so
allow it to perform network activity.
Let docker binaries setuid and add docker-entrypoi (truncation
intentional) to the set of docker binaries.
Change the two cis-related falco rules "File Open by Privileged
Container" and "Sensitive Mount by Container" to be less noisy. We found
in practice that tracking every open still results in too many falco
notifications.

For now, change the rules to only track the initial process start in the
container by looking for vpid=1. This should result in only triggering
when a privileged/sensitive mount container is started. This is slightly
less coverage but is far less noisy.
These are used for sysdig cloud onpremise deployments.
Add gitlab-runner-b (truncated gitlab-runner-build) as a gitlab binary.
Also allow ceph to spawn shells in a container.
For some mesos containers, where the container doesn't have an image and
is just a tarball in a cgroup/namespace, we don't have any image to work
with. In those cases, allow specific command lines.
Allow the user nobody to setuid. This depends on the user nobody being
set up in the first place to have no access, but that should be an ok
assumption.
Add rule somebody_becoming_themself that handles cases of nobody and
www-data trying to setuid to themself. The sysdig filter language
doesn't support template/variable values to allow "user.name=X and
evt.arg.uid=X for a given X", so we have to enumerate the users.
Some CI/CD pipelines build in containers.
Was already in the general list, seen in some customers, so adding to
the in containers list.
Take a pass through the rules making sure each line is < 120 characters.
Change unit tests to reflect the new privileged/sensitive mount
container rules that only detect container launch.
@mstemm mstemm merged commit 38f488b into dev Jun 19, 2017
@mstemm mstemm deleted the beta-rule-updates branch July 11, 2017 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants