<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Falco – Event Sources</title><link>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/</link><description>Recent content in Event Sources on Falco</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/feed.xml" rel="self" type="application/rss+xml"/><item><title>Docs: Kernel Events</title><link>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/</guid><description>
&lt;p&gt;Falco uses different instrumentations to analyze the system workload and pass security events to &lt;a class='glossary-tooltip' title='The memory space where all user actions and applications are executed.' data-toggle='tooltip' data-placement='top' href='https://v0-43--falcosecurity.netlify.app/docs/reference/glossary/?all=true#term-user-space' target='_blank' aria-label='userspace'&gt;userspace&lt;/a&gt;. We usually refer to these instrumentations as &lt;a class='glossary-tooltip' title='The global term for the software that sends events from the kernel.' data-toggle='tooltip' data-placement='top' href='https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/' target='_blank' aria-label='drivers'&gt;drivers&lt;/a&gt; since a driver runs in &lt;a class='glossary-tooltip' title='The memory space where the Kernel executes and provides its services.' data-toggle='tooltip' data-placement='top' href='https://v0-43--falcosecurity.netlify.app/docs/reference/glossary/?all=true#term-kernel-space' target='_blank' aria-label='kernelspace'&gt;kernelspace&lt;/a&gt;. The driver provides the &lt;strong&gt;syscall event source&lt;/strong&gt; since the monitored events are strictly related to the &lt;a class='glossary-tooltip' title='Syscalls stands for system calls, a way to request a service from the running kernel.' data-toggle='tooltip' data-placement='top' href='https://man7.org/linux/man-pages/man2/syscalls.2.html' target='_blank' aria-label='syscall'&gt;syscall&lt;/a&gt; context.&lt;/p&gt;
&lt;p&gt;There are several supported drivers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modern eBPF probe &lt;em&gt;(default)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Legacy eBPF probe (deprecated)&lt;/li&gt;
&lt;li&gt;Kernel module&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Kernel module&lt;/th&gt;
&lt;th&gt;Legacy eBPF probe (deprecated)&lt;/th&gt;
&lt;th&gt;Modern eBPF probe&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;x86_64&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt;= 3.10&lt;/td&gt;
&lt;td&gt;&amp;gt;= 4.14&lt;/td&gt;
&lt;td&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/#requirements"&gt;Minimal set of features&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;aarch64&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt;= 3.10&lt;/td&gt;
&lt;td&gt;&amp;gt;= 4.17&lt;/td&gt;
&lt;td&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/#requirements"&gt;Minimal set of features&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="kernel-module"&gt;Kernel module&lt;/h2&gt;
&lt;p&gt;By default, the &lt;a class='glossary-tooltip' title='Used to describe the .ko object that would be loaded into the kernel as a potentially risky kernel module.' data-toggle='tooltip' data-placement='top' href='https://linux-kernel-labs.github.io/refs/heads/master/labs/kernel_modules.html' target='_blank' aria-label='kernel module'&gt;kernel module&lt;/a&gt; will be installed when installing the Falco &lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/installation"&gt;debian/rpm&lt;/a&gt; package, when running the &lt;code&gt;falcoctl driver&lt;/code&gt; tool shipped within the &lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/installation#linux-binary"&gt;binary package&lt;/a&gt;, or when running the &lt;code&gt;falcosecurity/falco-driver-loader&lt;/code&gt; docker image (that just wraps the aforementioned tool).&lt;/p&gt;
&lt;p&gt;To install the kernel module, please refer to the &lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/installation/#install-driver"&gt;installation&lt;/a&gt; page.&lt;/p&gt;
&lt;h3 id="least-privileged-mode"&gt;Least privileged mode&lt;/h3&gt;
&lt;p&gt;The kernel module requires full privileges and cannot run with Linux capabilities&lt;/p&gt;
&lt;h2 id="modern-ebpf-probe"&gt;Modern eBPF probe&lt;/h2&gt;
&lt;p&gt;The &lt;a class='glossary-tooltip' title='More robust eBPF probe which brings the CO-RE paradigm, better performances and maintainability.' data-toggle='tooltip' data-placement='top' href='https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/#modern-ebpf-probe' target='_blank' aria-label='modern eBPF probe'&gt;modern eBPF probe&lt;/a&gt; is an alternative driver for Falco. The main advantage it brings to the table is that it is embedded into Falco, which means that you don't have to download or build anything, if your kernel is recent enough Falco will automatically inject it!&lt;/p&gt;
&lt;h3 id="what-s-new"&gt;What's new&lt;/h3&gt;
&lt;p&gt;The new probe is highly customizable, you are not obliged to use one buffer &lt;a href="https://github.com/falcosecurity/falco/blob/660da98e4c37f4d4f79ec4bebf4379d9b90b0892/falco.yaml#L292"&gt;for each CPU&lt;/a&gt; you can also use just one huge buffer for all your CPUs! And obviously, also the &lt;a href="https://github.com/falcosecurity/falco/blob/660da98e4c37f4d4f79ec4bebf4379d9b90b0892/falco.yaml#L226"&gt;buffer size&lt;/a&gt; is customizable! All this is possible thanks to new outstanding features like &lt;a href="https://nakryiko.com/posts/bpf-portability-and-co-re/"&gt;the CO-RE paradigm&lt;/a&gt;, &lt;a href="https://nakryiko.com/posts/bpf-ringbuf/"&gt;the BPF ring buffer&lt;/a&gt; and many others, if you are curious you can read more about them in this &lt;a href="https://v0-43--falcosecurity.netlify.app/blog/falco-modern-bpf/#what-s-new"&gt;blog post&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="requirements"&gt;Requirements&lt;/h3&gt;
&lt;p&gt;The modern eBPF probe doesn't require a specific kernel version. Usually, all versions &lt;code&gt;&amp;gt;=5.8&lt;/code&gt; are enough but there are cases in which the required features could also be backported into older kernels, so it wouldn't be completely fair to define &lt;code&gt;5.8&lt;/code&gt; as the first supported version. The 2 main required features are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.kernel.org/doc/html/next/bpf/ringbuf.html"&gt;BPF ring buffer&lt;/a&gt; support.&lt;/li&gt;
&lt;li&gt;A kernel that exposes &lt;a href="https://docs.kernel.org/bpf/btf.html"&gt;BTF&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Falco can automatically detect if these features are available on the running machine and can notify you if something is missing. As an alternative, you could always use &lt;code&gt;bpftool&lt;/code&gt;, you just need to type the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo bpftool feature probe kernel | grep -q &lt;span style="color:#b44"&gt;&amp;#34;map_type ringbuf is available&amp;#34;&lt;/span&gt; &lt;span style="color:#666"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#a2f"&gt;echo&lt;/span&gt; &lt;span style="color:#b44"&gt;&amp;#34;true&amp;#34;&lt;/span&gt; &lt;span style="color:#666"&gt;||&lt;/span&gt; &lt;span style="color:#a2f"&gt;echo&lt;/span&gt; &lt;span style="color:#b44"&gt;&amp;#34;false&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo bpftool feature probe kernel | grep -q &lt;span style="color:#b44"&gt;&amp;#34;program_type tracing is available&amp;#34;&lt;/span&gt; &lt;span style="color:#666"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#a2f"&gt;echo&lt;/span&gt; &lt;span style="color:#b44"&gt;&amp;#34;true&amp;#34;&lt;/span&gt; &lt;span style="color:#666"&gt;||&lt;/span&gt; &lt;span style="color:#a2f"&gt;echo&lt;/span&gt; &lt;span style="color:#b44"&gt;&amp;#34;false&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="how-to-run-it"&gt;How to run it&lt;/h3&gt;
&lt;p&gt;Modern eBPF probe is bundled into the userspace binary and works out of the box, regardless of the kernel release, thanks to the eBPF feature called 'Compile Once Run Everywhere' (CO-RE). To enable it in Falco, just set the &lt;code&gt;engine.kind&lt;/code&gt; configuration key to &lt;code&gt;modern_ebpf&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It is supported in all the installation methods of other drivers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/installation/#installation-with-dialog"&gt;Falco packages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/running/#falco-binary"&gt;Falco binary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/running/#modern-ebpf"&gt;Docker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/falcosecurity/charts/tree/master/charts/falco#daemonset"&gt;Helm chart&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="useful-resources"&gt;Useful resources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/blog/falco-modern-bpf/"&gt;Modern BPF blog post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/falcosecurity/libs/blob/master/proposals/20220329-modern-bpf-probe.md"&gt;Modern BPF proposal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtu.be/BxoKztfHnYY"&gt;eBPF day presentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="least-privileged-mode-1"&gt;Least privileged mode&lt;/h3&gt;
&lt;p&gt;The minimal set of capabilities required by Falco to run the modern eBPF probe is the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_BPF&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_PERFMON&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_RESOURCE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_PTRACE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let's see them in detail:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CAP_SYS_RESOURCE&lt;/strong&gt;: Falco needs this capability to be able to call the &lt;code&gt;setrlimit&lt;/code&gt; syscall. The &lt;code&gt;setrlimit&lt;/code&gt; syscall is used together with the &lt;code&gt;RLIMIT_MEMLOCK&lt;/code&gt; flag to change the amount of memory that can be &lt;em&gt;mlocked&lt;/em&gt; into RAM. The default value for this memory limit is very low, so even a very simple eBPF program would fail. The workaround is to increase the default value to something acceptable so eBPF maps can be correctly &lt;em&gt;mlocked&lt;/em&gt; in memory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CAP_SYS_PTRACE&lt;/strong&gt;: Falco needs this capability because it accesses paths like &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/environ&lt;/code&gt;. From the userspace standpoint, the permission to do so is mapped to the &lt;code&gt;CAP_SYS_PTRACE&lt;/code&gt; capability. For the curious reader, see &lt;a href="https://elixir.bootlin.com/linux/latest/source/fs/proc/base.c#L937"&gt;environ_open&lt;/a&gt; implementation in the kernel.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CAP_SYS_ADMIN&lt;/strong&gt;: Falco needs this capability to load eBPF programs and maps, and to interact with the system using the &lt;code&gt;bpf&lt;/code&gt; syscall.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This set of capabilities should work most of the time but under some conditions, it is possible to replace the &lt;code&gt;CAP_SYS_ADMIN&lt;/code&gt; with two more granular capabilities: &lt;code&gt;CAP_SYS_BPF&lt;/code&gt; and &lt;code&gt;CAP_SYS_PERFMON&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The only condition needed is a kernel version that supports these capabilities. The Linux Kernel version &lt;code&gt;5.8&lt;/code&gt; is the first one that officially supports them but they could have been backported on older versions on some distributions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Please note&lt;/strong&gt;: we will try to do our best to keep this as the minimum required set but due to &lt;a href="https://lore.kernel.org/bpf/CAGQdkDvYU_e=_NX&amp;#43;6DRkL_-TeH3p&amp;#43;QtsdZwHkmH0w3Fuzw0C4w@mail.gmail.com/T/#u"&gt;some issues with CO-RE relocations&lt;/a&gt; it is possible that this changes in the future.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="legacy-ebpf-probe"&gt;Legacy eBPF probe&lt;/h2&gt;
&lt;div class="card card-sm pageinfo pageinfo-warning my-4"&gt;
&lt;div class="card-body"&gt;
&lt;div class="card-text"&gt;
&lt;p&gt;The Legacy eBPF probe has been deprecated in Falco &lt;code&gt;0.43.0&lt;/code&gt; and will be removed in a future release. Until removal and
since Falco &lt;code&gt;0.43.0&lt;/code&gt;, using it will result in a warning informing the user about the deprecation. Users are encouraged
to switch to another engine, such as the modern eBPF probe, as the usage will result in an error after the removal.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The legacy &lt;a class='glossary-tooltip' title='The eBPF probe (deprecated) collects syscall events from the Kernel, as the Kernel module does.' data-toggle='tooltip' data-placement='top' href='https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/kernel/#legacy-ebpf-probe' target='_blank' aria-label='eBPF probe'&gt;eBPF probe&lt;/a&gt; is an alternative source to the ones described above, leveraging greater compatibility than the modern eBPF one, since it requires older kernel versions.&lt;/p&gt;
&lt;p&gt;To install the eBPF probe, please refer to the &lt;a href="https://v0-43--falcosecurity.netlify.app/docs/getting-started/installation/#install-driver"&gt;installation&lt;/a&gt; page.&lt;/p&gt;
&lt;p&gt;To enable the eBPF support in Falco set the &lt;code&gt;engine.kind&lt;/code&gt; configuration key to &lt;code&gt;ebpf&lt;/code&gt; and eventually customize &lt;code&gt;engine.ebpf.probe&lt;/code&gt; to the path where the eBPF probe resides; the default path is the location used by &lt;code&gt;falcoctl driver&lt;/code&gt; tool to install the eBPF probe, ie: &lt;code&gt;${HOME}/.falco/falco-bpf.o&lt;/code&gt;, where &lt;code&gt;${HOME}&lt;/code&gt; will expand to the home dir of the user running Falco.&lt;/p&gt;
&lt;h3 id="least-privileged-mode-2"&gt;Least privileged mode&lt;/h3&gt;
&lt;p&gt;The minimal set of capabilities required by Falco to run the legacy eBPF probe is the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_ADMIN&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_RESOURCE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CAP_SYS_PTRACE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The mentioned capabilities require no further explanation since they were already discussed in detail in the modern eBPF probe section. Moreover, for legacy eBPF probe the &lt;code&gt;kernel.perf_event_paranoid&lt;/code&gt; sysctl value must also be double checked: reading the &lt;a href="https://linuxsecurity.expert/kb/sysctl/kernel_perf_event_paranoid/"&gt;manual&lt;/a&gt; it is stated that &lt;code&gt;perf_event_paranoid&lt;/code&gt; influences only the behavior of unprivileged users, but under the hood, some distributions like Debian or Ubuntu introduce additional &lt;code&gt;perf_event_paranoid&lt;/code&gt; levels. Consider &lt;a href="https://kernel.ubuntu.com/git/ubuntu-stable/ubuntu-stable-jammy.git/tree/kernel/events/core.c#n11991"&gt;&lt;code&gt;Ubuntu&lt;/code&gt;&lt;/a&gt; as an example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a2f;font-weight:bold"&gt;if&lt;/span&gt; (&lt;span style="color:#00a000"&gt;perf_paranoid_any&lt;/span&gt;() &lt;span style="color:#666"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#666"&gt;!&lt;/span&gt;&lt;span style="color:#00a000"&gt;capable&lt;/span&gt;(CAP_SYS_ADMIN))
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a2f;font-weight:bold"&gt;return&lt;/span&gt; &lt;span style="color:#666"&gt;-&lt;/span&gt;EACCES;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#080;font-style:italic"&gt;// where perf_paranoid_any is defined as:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a2f;font-weight:bold"&gt;static&lt;/span&gt; &lt;span style="color:#a2f;font-weight:bold"&gt;inline&lt;/span&gt; &lt;span style="color:#0b0;font-weight:bold"&gt;bool&lt;/span&gt; &lt;span style="color:#00a000"&gt;perf_paranoid_any&lt;/span&gt;(&lt;span style="color:#0b0;font-weight:bold"&gt;void&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a2f;font-weight:bold"&gt;return&lt;/span&gt; sysctl_perf_event_paranoid &lt;span style="color:#666"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#666"&gt;2&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can notice, when your &lt;code&gt;kernel.perf_event_paranoid&lt;/code&gt; is &lt;code&gt;&amp;gt;2&lt;/code&gt; the capability &lt;code&gt;CAP_PERFMON&lt;/code&gt; won't suffice, you would still need &lt;code&gt;CAP_SYS_ADMIN&lt;/code&gt;.
So before disabling &lt;code&gt;CAP_SYS_ADMIN&lt;/code&gt; check your &lt;code&gt;perf_event_paranoid&lt;/code&gt; value with &lt;code&gt;sysctl kernel.perf_event_paranoid&lt;/code&gt; and make sure their values are compatible with your distribution enforcement.&lt;/p&gt;</description></item><item><title>Docs: Plugin Events</title><link>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/plugins/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/plugins/</guid><description>
&lt;p&gt;Since the introduction of the &lt;a href="https://v0-43--falcosecurity.netlify.app/docs/plugins"&gt;Plugin System&lt;/a&gt;, additional event sources can serve as input for Falco. Those event sources are provided by plugins implementing the &lt;a href="https://v0-43--falcosecurity.netlify.app/docs/reference/plugins/plugin-api-reference/#event-sourcing-capability-api"&gt;event sourcing capability&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Examples of event source defined by officially-supported plugins are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/plugins/kubernetes-audit/"&gt;Kubernetes Audit Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/plugins/cloudtrail/"&gt;AWS CloudTrail&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/plugins/okta/"&gt;Okta&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to these plugins hosted by the Falcosecurity organization, others have written third-party &lt;a href="https://github.com/falcosecurity/plugins#readme"&gt;plugins&lt;/a&gt; that support additional event sources. Please refer to the &lt;a href="https://github.com/falcosecurity/plugins/blob/master/registry.yaml"&gt;official Plugin Registry&lt;/a&gt; for the most up-to-date information regarding the Falco plugins acknowledged by the community.&lt;/p&gt;
&lt;p&gt;At the implementation level, the plugin system sends events to Falco using the same protocol that is used for syscalls, but the encoding and decoding of the payload is performed by the plugin itself according to its own data format representation. Every plugin exposes the necessary functionality to seamlessly integrate its events with Falco.&lt;/p&gt;</description></item><item><title>Docs: gVisor</title><link>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/gvisor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-43--falcosecurity.netlify.app/docs/concepts/event-sources/gvisor/</guid><description>
&lt;div class="card card-sm pageinfo pageinfo-warning my-4"&gt;
&lt;div class="card-body"&gt;
&lt;div class="card-text"&gt;
&lt;p&gt;The gVisor engine has been deprecated in Falco &lt;code&gt;0.43.0&lt;/code&gt; and will be removed in a future release. Until removal and since
Falco &lt;code&gt;0.43.0&lt;/code&gt;, using it will result in a warning informing the user about the deprecation. Users are encouraged to
switch to another engine, such as the modern eBPF probe, as the usage will result in an error after the removal.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Falco can work with &lt;strong&gt;&lt;a href="https://gvisor.dev/"&gt;gVisor&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;gVisor, quoting the &lt;a href="https://gvisor.dev/docs"&gt;official documentation&lt;/a&gt;, is an application kernel that provides an &lt;strong&gt;additional layer of isolation&lt;/strong&gt; between running applications and the host operating system. It delivers an additional security boundary for containers by &lt;strong&gt;intercepting and monitoring workload runtime instructions in user space&lt;/strong&gt; before they can reach the underlying host.&lt;/p&gt;
&lt;h2 id="how-falco-and-gvisor-work-together"&gt;How Falco and gVisor work together&lt;/h2&gt;
&lt;p&gt;When running containers with gVisor, there are several components that interact with our workload:&lt;/p&gt;
&lt;p&gt;&lt;img src="images/gvisor-01.png" alt="" loading="lazy" /&gt;
&lt;/p&gt;
&lt;p&gt;The Sentry is the gVisor component that implements all the application kernel functionalities. Whenever a syscall gets executed inside the sandboxed application, the Sentry will manage it as usual, plus it will send a message to Falco through a UDS (Unix Domain Socket).&lt;/p&gt;
&lt;p&gt;Messages are serialized through Protocol Buffers so that gVisor and Falco can communicate even if they are written in different programming languages.&lt;/p&gt;
&lt;p&gt;&lt;img src="images/gvisor-02.png" alt="" loading="lazy" /&gt;
&lt;/p&gt;
&lt;h2 id="setup-gvisor-docker-sandbox-monitoring-with-falco"&gt;Setup gVisor Docker sandbox monitoring with Falco&lt;/h2&gt;
&lt;p&gt;First, &lt;a href="https://falco.org/docs/getting-started/installation/"&gt;install &lt;strong&gt;Falco&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://gvisor.dev/docs/user_guide/install/"&gt;install the &lt;strong&gt;gVisor runsc tool&lt;/strong&gt;&lt;/a&gt;. Any version of runsc released in 2023 or later is compatible with Falco.&lt;/p&gt;
&lt;p&gt;gVisor needs to be configured to send events to Falco. Generate the appropriate configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;falco --gvisor-generate-config &amp;gt; /tmp/runsc_falco_config.json
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo mv /tmp/runsc_falco_config.json /etc/docker/runsc_falco_config.json
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#080;font-style:italic"&gt;# Don&amp;#39;t forget to protect this configuration&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo chmod &lt;span style="color:#666"&gt;640&lt;/span&gt; /etc/docker/runsc_falco_config.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The easiest way to run a gVisor sandbox is by using Docker.
You need to first &lt;a href="https://gvisor.dev/docs/user_guide/quick_start/docker/"&gt;configure Docker to work with gVisor via &lt;code&gt;runsc install&lt;/code&gt;&lt;/a&gt;, and then we're going to update the &lt;code&gt;runsc&lt;/code&gt; pod init config configuration for our Docker containers:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo -e /etc/docker/daemon.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, add the &lt;code&gt;runtimeArgs&lt;/code&gt; key with the &lt;code&gt;--pod-init-config=&lt;/code&gt; parameter like in the example below:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#008000;font-weight:bold"&gt;&amp;#34;runtimes&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#008000;font-weight:bold"&gt;&amp;#34;runsc&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#008000;font-weight:bold"&gt;&amp;#34;path&amp;#34;&lt;/span&gt;: &lt;span style="color:#b44"&gt;&amp;#34;/usr/local/bin/runsc&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#008000;font-weight:bold"&gt;&amp;#34;runtimeArgs&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#b44"&gt;&amp;#34;--pod-init-config=/etc/docker/runsc_falco_config.json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ]
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, restart the Docker daemon to let it use the new configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl restart docker
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="run-falco-by-command-line"&gt;Run Falco by command line&lt;/h2&gt;
&lt;p&gt;Simply run Falco by the command line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo falco -o &lt;span style="color:#b44"&gt;&amp;#34;engine.kind=gvisor&amp;#34;&lt;/span&gt; -o &lt;span style="color:#b44"&gt;&amp;#34;engine.gvisor.config=/etc/docker/runsc_falco_config.json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or edit the file &lt;code&gt;/etc/falco/falco.yaml&lt;/code&gt; to have these settings and run Falco with &lt;code&gt;sudo falco&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#008000;font-weight:bold"&gt;engine&lt;/span&gt;:&lt;span style="color:#bbb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#bbb"&gt; &lt;/span&gt;&lt;span style="color:#008000;font-weight:bold"&gt;kind&lt;/span&gt;:&lt;span style="color:#bbb"&gt; &lt;/span&gt;gvisor&lt;span style="color:#bbb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#bbb"&gt; &lt;/span&gt;&lt;span style="color:#008000;font-weight:bold"&gt;gvisor&lt;/span&gt;:&lt;span style="color:#bbb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#bbb"&gt; &lt;/span&gt;&lt;span style="color:#008000;font-weight:bold"&gt;config&lt;/span&gt;:&lt;span style="color:#bbb"&gt; &lt;/span&gt;&lt;span style="color:#b44"&gt;&amp;#34;/etc/docker/runsc_falco_config.json&amp;#34;&lt;/span&gt;&lt;span style="color:#bbb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You're now monitoring your gVisor sandboxes.&lt;/p&gt;
&lt;h2 id="permanent-configuration-with-systemd"&gt;Permanent configuration with Systemd&lt;/h2&gt;
&lt;p&gt;Alternatively, for a more permanent configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo mkdir /etc/systemd/system/falco.service.d
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat &lt;span style="color:#b44"&gt;&amp;lt;&amp;lt; EOF | sudo tee /etc/systemd/system/falco.service.d/gvisor.conf
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b44"&gt;[Service]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b44"&gt;ExecStartPre=
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b44"&gt;ExecStopPost=
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b44"&gt;ExecStart=
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b44"&gt;ExecStart=/usr/bin/falco -o &amp;#34;engine.kind=gvisor&amp;#34; -o &amp;#34;engine.gvisor.config=/etc/docker/runsc_falco_config.json&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#b44"&gt;EOF&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl daemon-reload
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl restart falco
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Falco will load the configuration indicating it with a line similar to:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Thu Jul 21 15:41:58 2022: Enabled event collection from gVisor. Configuration path: /etc/docker/runsc_falco_config.json
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="test-the-detection"&gt;Test the detection&lt;/h2&gt;
&lt;p&gt;Run any container with gVisor:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo docker run --runtime&lt;span style="color:#666"&gt;=&lt;/span&gt;runsc -it ubuntu bash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The container will start properly configured to be monitored by Falco.&lt;/p&gt;
&lt;p&gt;To test the detection capabilities, try to trigger a simple rule like &lt;strong&gt;Read sensitive file untrusted&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat /etc/shadow
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You will see Falco alerting:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;16:01:49.596019827: Warning Sensitive file opened for reading by non-trusted program (file=/etc/shadow gparent=&amp;lt;NA&amp;gt; ggparent=&amp;lt;NA&amp;gt; gggparent=&amp;lt;NA&amp;gt; evt_type=openat user=root user_uid=0 user_loginuid=-1 process=cat proc_exepath=/usr/bin/cat parent=&amp;lt;NA&amp;gt; command=cat /etc/shadow terminal=0 container_id=797eed9cf9c7 container_name=pedantic_elgamal)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="falco-and-gvisor-on-kubernetes-with-gke"&gt;Falco and gVisor on Kubernetes with GKE&lt;/h2&gt;
&lt;p&gt;gVisor can be used to &lt;a href="https://cloud.google.com/kubernetes-engine/docs/concepts/sandbox-pods"&gt;sandbox pods on GKE&lt;/a&gt; for higher security. If your cluster has node pools with gVisor support enabled and k8s version at least &lt;code&gt;1.24.4-gke.1800&lt;/code&gt; or &lt;code&gt;1.25.0-gke.200&lt;/code&gt;, you can deploy an instance of Falco to monitor them via the &lt;a href="https://github.com/falcosecurity/charts"&gt;Helm chart&lt;/a&gt;.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;helm install falco-gvisor falcosecurity/falco -f https://raw.githubusercontent.com/falcosecurity/charts/master/charts/falco/values-gvisor-gke.yaml --namespace falco-gvisor --create-namespace
&lt;/code&gt;&lt;/pre&gt;&lt;div class="card card-sm pageinfo pageinfo-info my-4"&gt;
&lt;div class="card-body"&gt;
&lt;div class="card-text"&gt;
&lt;p&gt;Note that this Falco instance is completely independent of other Falco instances that you might have that monitor your regular nodes (w/o gVisor sandboxing), so you can decide whether you want to monitor &lt;strong&gt;regular&lt;/strong&gt; node pools, &lt;strong&gt;gVisor-enabled&lt;/strong&gt; node pools or &lt;strong&gt;both&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more information about these use cases and more check out the &lt;a href="https://github.com/falcosecurity/charts/blob/master/charts/falco/README.md#about-gvisor"&gt;related sections&lt;/a&gt; of the Falco Helm chart documentation.&lt;/p&gt;
&lt;h2 id="limitations-and-syscall-support"&gt;Limitations and syscall support&lt;/h2&gt;
&lt;div class="card card-sm pageinfo pageinfo-warning my-4"&gt;
&lt;div class="card-body"&gt;
&lt;div class="card-text"&gt;
&lt;p&gt;Falco supports many &lt;a href="https://falco.org/docs/rules/supported-events/"&gt;system call events&lt;/a&gt; but gVisor does not support all of them. The most important events used in the default rulesets are covered and enough information flows about processes, file descriptors, and connections to maintain consistency of the data throughout the analysis and rule are processed anyway.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id="webinar"&gt;Webinar&lt;/h2&gt;
&lt;p&gt;A CNCF Webinar has been recorded by the Falco authors and Google to explain all the steps above:&lt;/p&gt;
&lt;div class="card card-sm pageinfo pageinfo-warning my-4"&gt;
&lt;div class="card-body"&gt;
&lt;div class="card-text"&gt;
&lt;p&gt;Some information in this webinar may be outdated, it gives anyway a good overview of the principle&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/QM-7bAaUiTk?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;</description></item></channel></rss>