Commit Graph

2971 Commits

Author SHA1 Message Date
Leonardo Grasso
fda9fb36de update(userspace/falco): add more info to --version output
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
92fdbbcc52 update(userspace/falco): do not print driver version by default
Since now each Falco version is compatible with a range of driver version and not just one.

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
4b694896a4 build: temporarily bump libs and driver
Note that another bump is required before releasing Falco, since this commit uses alpha versions.

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
d589ec2144 build(cmake/modules): dedicated cmake module for the driver
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
6c08fa2a20 build(cmake/modules): divorce driver from falcosecurity-libs module
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
9af20a000d chore(cmake/modules): duplicate git history (part 2)
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
7e1e7c2e42 chore(cmake/modules): duplicate git history (part 1)
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Leonardo Grasso
1f2e6d4629 chore(cmake/modules): indentation
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-23 12:47:03 +02:00
Mark Stemm
85ca1eb3dd fix(app_actions): perform validate_rules before load_rules action
Perform the validate_rules action before the load_rules action. This
ensures that *only* the rules files named with -V arguments are
validated.

This fixes https://github.com/falcosecurity/falco/issues/2087.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2022-06-23 12:24:03 +02:00
Luca Guerra
5dce4d2025 fix(tests): make tests run locally (take 2)
Signed-off-by: Luca Guerra <luca@guerra.sh>
2022-06-23 12:22:03 +02:00
Aldo Lacuku
d90421387f update(rules): add macro for dup syscalls
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
2022-06-23 10:06:13 +02:00
Aldo Lacuku
07b4d5a47a fix(rules): use exit event in reverse shell detection rule
In some cases the rule is not triggered when a reverse shell is spawned.
That's because in the rule we are checking that the file descriptor passed
as argument to the dup functions is of type socket and its fd number is "0, 1, or 2"
and the event direction is "enter".
The following event does not trigger the rule: dup2(socket_fd, STDIN_FILENO);
But using the exit event the rule is triggered.

Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
2022-06-23 10:06:13 +02:00
Kaizhe Huang
8a1f43f284 remove kaizhe from falco rule owner
Signed-off-by: Kaizhe Huang <khuang@aurora.tech>
2022-06-22 22:16:21 -05:00
Federico Di Pierro
fcac635780 update(OWNERS): add Federico Di Pierro to owners.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-22 19:06:20 +02:00
Vicente J. Jiménez Miras
5d10e54ad4 fix(ci): fix sign script - avoid interpreting {*}$argv
Signed-off-by: Vicente J. Jiménez Miras <vjjmiras@gmail.com>
2022-06-20 13:54:29 +02:00
Vicente JJ. Miras
5f17b7bd41 fix(ci): creates ~/sign instead of ./sign
Signed-off-by: Vicente J. Jiménez Miras <vjjmiras@gmail.com>
2022-06-20 10:19:11 +02:00
Federico Di Pierro
9231fe3c1f chore(ci): improved rpm command to check for SHA256 sign.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Vicente J. Jiménez Miras <vjjmiras@gmail.com>
2022-06-17 14:52:53 +02:00
Federico Di Pierro
99784874eb chore(ci): small refactor.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Vicente J. Jiménez Miras <vjjmiras@gmail.com>
2022-06-17 14:52:53 +02:00
Federico Di Pierro
a3c8fa85d4 fix(ci): sign arm64 rpm packages.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-17 14:52:53 +02:00
Jeremi Piotrowski
bcda81f700 update(falco_scripts): Change Flatcar dynlinker path
The Flatcar kernel module build needs to relocate binaries in /host/lib/modules
to run with the host's ld and glibc. While testing with glibc 2.34 that we plan
to introduce soon, we found that the previous dynlinker symlink (ld-xxx.so)
doesn't exist any longer. Update the hostld variable to use a path that is
present in all versions of glibc.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2022-06-17 13:41:52 +02:00
Jason Dellaluce
1e5ef912de chore: improve falco.yaml comments
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2022-06-14 22:13:37 +02:00
Jason Dellaluce
50039316ce update(userspace/falco): make plugin configuration more robust
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2022-06-14 22:13:37 +02:00
Jason Dellaluce
eb365f1a3e new(userspace/falco): add action and option to print detailed plugin info
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2022-06-14 22:13:37 +02:00
joon
625201f9f6 Add Java compatibility note
Signed-off-by: joon <pirxthepilot@users.noreply.github.com>
2022-06-14 17:01:12 +02:00
joon
583ac4192c rule(Java Process Class Download): detect potential successful log4shell exploitation
Signed-off-by: joon <pirxthepilot@users.noreply.github.com>
2022-06-14 17:01:12 +02:00
Jeremi Piotrowski
85f91a3ec4 update(falco_scripts): support pre-built module/probe on Flatcar
Pre-built kernel modules/eBPF probes for Flatcar use the value of the OS
VERSION_ID field as KERNEL_RELEASE in the filename. A specific kernel release
version does not uniquely identify a Flatcar configuration, because Flatcar is
image-based instead of package-based. Here's a more specific example: the same
kernel version can be part of various Flatcar releases (across channels
alpha/beta/stable) with differences in configuration. This is why we use the
VERSION_ID value during offline builds with driverkit. Flatcar version numbers
are all higher than 1500.0.0, so there is no risk of collision with kernel
version numbers.

When locally building the kernel module on the system, we have access to the
correct kernel build directory at /lib/modules/$(uname -r)/build with the right
configuration and so for that branch, we need to reset KERNEL_RELEASE=$(uname -r).

See also the driverkit PR that introduces a builder for Flatcar:
https://github.com/falcosecurity/driverkit/pull/131

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2022-06-13 10:34:43 +02:00
Jeremi Piotrowski
6d56571e23 update(docker,falco_scripts): fix kernel module build on Flatcar
Relocate necessary tools from the kernel module build system to run using host
dynlinker and libraries, so that compiling falco module on Flatcar works.

Since Flatcar v2983.0.0, Flatcar ships with glibc-2.33, but the
falco-driver-loader container is based on debian:buster and so has a much older
glibc. This prevents some necessary tools within /lib/modules/*/build from
working which causes the falco module to fail to compile using dkms.

To make the tools work, we need to relocate them so we add patchelf to the
falco and local dockerfiles. The relocation is based on the approach done by
the sysdig agent-kmodule build system, but I'm unable to find the source code
for it. The host linker and libs will be found at /host/usr/lib64, so we change
the interpreter and rpath on the tools. The relocation happens on a copy of the
tools which are then bind mounted at the right location. The result allows the
module build to work.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2022-06-13 10:34:43 +02:00
Luca Guerra
9d7153e119 fix(tests): make run_regression_tests.sh work locally
Signed-off-by: Luca Guerra <luca@guerra.sh>
2022-06-13 09:38:44 +02:00
Federico Di Pierro
4097661ba8 fix(scripts): fixed path in publish-deb script.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-11 00:11:09 +02:00
Vicente J. Jiménez Miras
83700d6d6a update(build): Switch from RSA/SHA1 to RSA/SHA256 signature in the RPM packages
Signed-off-by: Vicente J. Jiménez Miras <vjjmiras@gmail.com>
2022-06-10 17:51:12 +02:00
Federico Di Pierro
fccd3fa7b6 new(scripts): support InRelease file creation for publish-deb script.
Newest Debian/Ubuntu versions look for this file instead of Release + Release.asc, hitting lots of 404 (and a retry on the old format).

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-10 17:50:12 +02:00
Federico Di Pierro
1327c796d0 fix(scripts): fixed falco-driver-loader driver download url.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-10 16:49:42 +02:00
stephanmiehe
c782655a53 Fix rule linting
Signed-off-by: Stephan Miehe <stephanmiehe@github.com>
2022-06-10 13:58:42 +02:00
Federico Di Pierro
ba6c86696f fix(build): docker-container buildx engine does not support retagging images. Tag all images together.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-10 12:54:43 +02:00
Federico Di Pierro
9d2aba240d fix(build): fixed publish-docker-dev job context.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Jason Dellaluce <jasondellaluce@gmail.com>
2022-06-10 09:33:42 +02:00
Federico Di Pierro
b059e83dd2 fix(scripts): fixed publish-deb script with manual arch filter.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-09 17:52:40 +02:00
Federico Di Pierro
6a034c17e0 fix(scripts): forcefully create packages dir for debian packages.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-09 17:52:40 +02:00
Aldo Lacuku
e6f99a61c9 chore(falco): fix indentation
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
2022-06-09 12:50:39 +02:00
Aldo Lacuku
7b83943059 fix(falco): compilation issues with new libs version
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
2022-06-09 12:50:39 +02:00
Aldo Lacuku
2111699a96 chore(engine): bump falco engine version number to 13
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
2022-06-09 12:50:39 +02:00
Aldo Lacuku
b6d0607716 chore(cmake): bump falco-security libs version to 075da069af359954122ed7b8a9fc98bc7bcf3116
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
2022-06-09 12:50:39 +02:00
Federico Di Pierro
1c83a449bc fix(build): removed leftover line in circleci config.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-09 12:11:39 +02:00
Federico Di Pierro
534f66e601 fix(build): fixed circleCI artifacts publish for arm64.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-09 10:51:39 +02:00
Federico Di Pierro
a98bf52345 update(docker): updated falco-builder to fix multiarch support.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>

Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-09 09:33:39 +02:00
Leonardo Grasso
aad70f3de2 fix(.circleci): correct command for build-arm64
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
2022-06-09 08:35:39 +02:00
odidev
4aa0fe1b95 ARM64 build
Signed-off-by: odidev <odidev@puresoftware.com>
2022-06-09 08:35:39 +02:00
odidev
0ebc7cd969 ARM64 build
Signed-off-by: odidev <odidev@puresoftware.com>
2022-06-09 08:35:39 +02:00
Federico Di Pierro
4f759b6b2b fix(build): use apt instead of apk when installing deps for aws ecr publish.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-08 15:40:18 +02:00
Federico Di Pierro
ca677db651 update(build): avoid double build of docker images when pushing to aws ecr.
Moreover, fixed subtle whitespace-bug in various buildx lines.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-08 12:58:17 +02:00
Federico Di Pierro
0a98e11428 fix(build): try to use root user for cimg/base.
Moreover, fixed buildx usage.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2022-06-08 11:11:55 +02:00