Commit Graph

2337 Commits

Author SHA1 Message Date
Yu Kitazume
0f36ff030e add Yahoo!Japan as an adopter
Signed-off-by: Yu Kitazume <u.kitazume@gmail.com>
2021-05-12 11:37:34 +02:00
diamonwiggins
601ec5cf85 add Replicated to adopters
Signed-off-by: diamonwiggins <diamonw757@gmail.com>
2021-05-11 11:59:54 +02:00
Carlos Panato
f237f277e7 changelog: add notes for 0.28.1 release
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-05-07 14:55:02 +02:00
ismail yenigul
2226a1508c exception to privileged container for EKS images
Signed-off-by: ismail yenigul <ismailyenigul@gmail.com>
2021-05-06 02:36:48 +02:00
Carlos Panato
6f64c21ad9 urelease/docs: fix link and small refactor in the text
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2021-04-30 14:27:26 +02:00
maxgio92
fd6a1d0d05 clean(rules/falco_rules.yaml): remove deprecated oci image repositories
Signed-off-by: maxgio92 <massimiliano.giovagnoli.1992@gmail.com>
2021-04-29 11:51:35 +02:00
David Windsor
87438ec723 Add Secureworks to adopters
Signed-off-by: David Windsor <dwindsor@secureworks.com>
2021-04-26 10:34:00 +02:00
Leonardo Grasso
d0be6d96d0 build: enable ASLR for statically linked build
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-22 18:12:05 +02:00
Leonardo Grasso
aefd67eb8a build: hardening flags
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-22 18:12:05 +02:00
Leonardo Di Donato
6e94c37399 new(test): regression test for FAL-01-003
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-21 15:11:17 +02:00
Leonardo Di Donato
d3c22d3d0c new(test/trace_files): test fixture for FAL-01-003
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-21 15:11:17 +02:00
natchaphon-r
366975bc3b Adding MathWorks to Falco's adopter list
Signed-off-by: natchaphon-r <natchaphon.r@gmail.com>
2021-04-20 09:30:11 +02:00
natchaphon-r
f9692fcb82 Adding MathWorks to Falco's adopter list
Signed-off-by: natchaphon-r <natchaphon.r@gmail.com>
2021-04-20 09:30:11 +02:00
Leonardo Grasso
e95ab26f33 update(rules): stricter detection of man-db postinst exception
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-19 17:01:10 +02:00
Leonardo Grasso
23a611b343 chore(rules): remove too week macro python_running_sdchecks
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-19 17:01:10 +02:00
Dan POP
2658d65373 adding known users /and how to add your name
added list from the survey that allowed mentions of their name publically in the adopters file. 

@jonahjon     --  please approve or change any verbiage to adding AWS as contributors with all you and the teams work on PROW and all the contributions thus far.

Signed-off-by: Dan Papandrea <dan.papandrea@sysdig.com>
2021-04-19 16:58:59 +02:00
Leonardo Di Donato
600501e141 update(userspace/falco): handle the case there wasn't been any previously processed event
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-19 16:56:53 +02:00
Leonardo Di Donato
0df18fd786 update(userspace/falco): print out current time when a timeouts notification gets emitted
Also, print out the time of the last processed event in the output
fields of the notification.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-19 16:56:53 +02:00
Leonardo Di Donato
c1da6d21b9 new: syscall_event_timeouts configuration block
Falco uses a shared buffer between the kernel and userspace to receive
the events (eg., system call information) in userspace.
Anyways, the underlying libraries can also timeout for various reasons.
For example, there could have been issues while reading an event.
Or the particular event needs to be skipped.
Normally, it's very unlikely that Falco does not receive events consecutively.
Falco is able to detect such uncommon situation.
Here you can configure the maximum number of consecutive timeouts without an event
after which you want Falco to alert.
By default this value is set to 1000 consecutive timeouts without an event at all.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-19 16:56:53 +02:00
Leonardo Di Donato
c4a73bdd8e update(userspace/falco): a null event when there's a timeout is unlikely
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-19 16:56:53 +02:00
Leonardo Di Donato
28a339e4bc new(userspace/engine): likely/unlikely macros in utils
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-19 16:56:53 +02:00
Leonardo Di Donato
65a168ab5a new(userspace/falco): output msg when the number of consecutive timeouts without an event is greater than a given threshold
The rationale is that in case Falco obtains a consistent number of
consecutive timeouts (in a row) without a valid event, something is
going wrong.

This because, normally, the libs send timeouts to Falco (also) to signal events to discard.
In such cases, which are the majority of cases, `ev` exists and is not
`null`.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-19 16:56:53 +02:00
Lorenzo Fontana
46425b392c fix(userspace): handle exceptions for process_k8s_audit_event
This fix has two major points in it:

- when `std::stoll` is used in parse_as_int64 handle all the exceptions it
can throw (https://en.cppreference.com/w/cpp/string/basic_string/stol)
- when `process_k8s_audit_event` an eventual exception in it does not
stop the webserver process. This is done by doing a catch all handle
outside it and by logging an error message to the caller as well as in
stderr

Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-19 12:32:22 +02:00
Leo Di Donato
8b0d22dee9 docs: update link for HackMD community call notes
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-13 15:26:53 +02:00
Mark Stemm
a7e04fe6e6 Add falco engine info to --support output
In some cases, it might be useful to know what falco engine version a
given falco binary supports. We already have a --support option that
prints info about the system, config, rules files, etc.

Add a engine_info object, with an engine_version property containing the
falco engine version in falco_engine_version.h. In the output, it looks
like this:

...
  "engine_info": {
      "engine_version": 8
   },
...

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2021-04-13 10:49:19 +02:00
Leonardo Di Donato
c6aa255fc8 docs: update CHANGELOG
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-12 16:45:32 +02:00
Leonardo Di Donato
6b8769c13a ci: add missing infra context to publish stable Falco packages
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-12 16:45:32 +02:00
Leonardo Di Donato
02b5ddd5ab update: CHANGELOG for Falco 0.28.0
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-12 13:30:23 +02:00
Leonardo Di Donato
90a3ded07d update: CHANGELOG (Falco 0.28.0)
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-12 13:30:23 +02:00
Leo Di Donato
ccb7c19b31 chore: RELEASE.md refinements
While prepping Falco 0.28.0 I noticed the correct date (YYYY-MM-DD) to provide to GitHub filters is not the day before the previous release. Instead, it's the day the latest release happened.

Also added clearer instructions on how to generate the CHANGELOG.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-12 13:30:23 +02:00
Leonardo Di Donato
2e97d0e27c chore(rules): cleanup old macros
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-09 18:17:11 +02:00
Leonardo Di Donato
06086df21e chore(rules): re-enable negation of package_mgmt_procs for Write below binary dir rule
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-09 18:17:11 +02:00
Lorenzo Fontana
bd562a1ed9 update(userspace/engine): remove warnings for missing exceptions
We want users to continue using rules without having to use exceptions.
Exceptions are an additional feature for more advanced use-cases, having
a warning in there will mean that everyone now adds an empty exception
to avoid the warning.

Co-Authored-By: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-09 18:17:11 +02:00
Lorenzo Fontana
194cdf7873 update(rules): revert exceptions in default ruleset for k8s audit
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-09 18:17:11 +02:00
Lorenzo Fontana
35fe14e691 rules(list user_known_sa_list): revert as an empty list for user overwrite
rules(list known_sa_list): list of known sa moved here from user_known_sa_list

Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-09 18:17:11 +02:00
Lorenzo Fontana
abc79fb548 update(rules): revert exceptions in default ruleset
Exceptions have been introduced in commit 64a231b962
The feature itself is very useful for more complex environments where
the simple conditions are difficult to handle.
However, many users reported that they find them difficult to understand so
we are doing a rollback of them in the default ruleset in favor of the
syntax without exceptions.

Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-09 18:17:11 +02:00
Leonardo Grasso
b6fc44e304 build(.config): pin awscli version
Co-authored-by: Leonardo Di Donato <leodidonato@gmail.com>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-09 14:29:24 +02:00
Mark Stemm
f14b37984c Add test for some containers being privileged
Add a test that verifies that a pod where one container has no security
context and the second container has a security context + privileged
properly matches the Create Privileged Pod falco rule.

There's a very similar test case already in
trace_files/k8s_audit/create_nginx_pod_privileged_2nd_container.json,
but in that case both containers have a securityContext property.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2021-04-09 10:34:48 +02:00
Mark Stemm
ecccb9f26c Extract array miss as "no value" vs failed extract
While testing, I found a case when creating a pod where:
1) the first container had no securityContext value
2) the second container had a security context with privileged=true

and this did not match the default rule Create Privileged Pod, when it
should match.

The rule Create Privileged Pod uses the field
ka.req.pod.containers.privileged, which in turn uses
json_event_filter_check::def_extract(). def_extract() iterates
over a set of json_pointers, potentially expanding arrays as they are
returned. Many k8s audit fields use this extract function.

For ka.req.pod.containers.privileged, the first json_pointer is
/requestObject/spec/containers to find the list of containers, and the
second is /securityContext/privileged to extract the privileged property
out of the securityContext object. What's returned is an array of
true/false noting if each container is privileged.

The problem is that def_extract() aborts when iterating over arrays if
extracting a pointer from an array can't be done.

In this case, the first pointer extracts the array of containers, and
then when iterating over the array of containers, the security context
pointer doesn't extract, causing the whole filter field to abort and
return ::no_value.

The fix is to not abort when iterating over arrays, but use ::no_value
for that array item's value instead. This allows def_extract() to
extract the privileged value out of the second container.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2021-04-09 10:34:48 +02:00
Lorenzo Fontana
f4ff2ed072 chore(test): replace bucket url with official distribution url
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-09 10:23:42 +02:00
Santi Friquet
23213ae148 adding asapp as an adopter
Signed-off-by: Santi Friquet <friquet@gmail.com>
2021-04-08 21:28:35 +02:00
Leonardo Di Donato
04110b0f4c chore(scripts): restore mount of debugfs (notes below)
This is needed in systems where raw tracepoints are not available.

Anyways, since this is needed when the inspector open (and actually
loads) the eBPF probe, ideally the mount should not be done by this
script but rather from Falco, or from Falco libs.

Otherwise, users building the eBPF probe theirseleves and not using this script (and having a kernel without raw
tracepoints) may need to mount this fs theirselves.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
17ee409ac6 chore(scripts): better default values in the help message of falco-driver-loader
Co-authored-by: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
71b2b5adde chore(scripts): remove banner about BPF JIT kernel config option
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
75261d4518 update(scripts): look for a prebuilt Falco eBPF probe before trying to compile one
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
2a7b32e279 update(scripts): look for a prebuilt Falco module before trying to compile it on-the-fly
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Leonardo Di Donato
4b0333cc08 update(docker/falco): SKIP_MODULE_LOAD not supported anymore - use SKIP_DRIVER_LOADER
When we started to implemented 20200506-artifacts-scope-part-2 proposal
, among a million other things, we renamed `SKIP_MODULE_LOAD` to
`SKIP_DRIVER_LOADER`. We reatained compatibility with `SKIP_MODULE_LOAD`
for a bunch of releases.

Now, after 9 months have passed I think it's time to completely
deprecate it.

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2021-04-08 20:40:39 +02:00
Lorenzo Fontana
cdeafa6fdc docs(test): express that grpcurl and virtualenv are needed
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2021-04-08 17:32:02 +02:00
Leonardo Grasso
36378371ab update(test): update performance tests fixture URL
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-08 12:36:09 +02:00
Leonardo Grasso
aeca36bdaf update(test): update regression tests fixture URL
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2021-04-08 12:36:09 +02:00