eBPF-based Security
Observability & Runtime
Enforcement
with Cilium Tetragon
Raphaël Pinson | @raphink — 🧪 Cilium Alchemist
with Cilium Tetragon
eBPF-based Security
Observability & Runtime
Enforcement
⬢ Security Observability
⬢ eBPF
⬢ Cloud Native Metadata
⬢ Runtime Enforcement
with Cilium Tetragon
eBPF-based Security
Observability & Runtime
Enforcement
⬢ Security Observability
Who am I
Raphaël Pinson
Cilium Alchemist @ Isovalent
Runtime Security - Security in Real Time
Active protection while your workload is running
→ Detecting malicious activity in real time
→ Reporting when malicious events occur
-> Even better, preventing them
What activity do we care about?
● Network traffic
● File & I/O activity
● Running executables
● System call activity
● Changing privileges & namespace boundaries
● …
How could we spot this activity?
● LD_PRELOAD
● ptrace
● seccomp
● LSM
● eBPF
LD_PRELOAD
● Standard C library, dynamically linked
● System call API
● Replace the “standard” library
LD_PRELOAD
● Standard C library, dynamically linked
● System call API
● Replace the “standard” library
● Bypassed by statically linked executables
Syscall checks within the kernel
ptrace,
seccomp,
eBPF kprobes on syscall entry
TOCTTOU with syscalls
For more details
● Leo Di Donato & KP Singh at CN eBPF Day 2021
● Rex Guo & Junyuan Zeng at DEFCON 29 on Phantom attacks
ptrace,
seccomp,
eBPF kprobes on syscall entry
Need to make the check at the right place
Linux Security Modules
● Stable interface
● Safe places to make checks
with Cilium Tetragon
eBPF-based Security
Observability & Runtime
Enforcement
⬢ Security Observability
⬢ eBPF
Process
Scheduler
execve()
Linux
Kernel
Syscall
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
How does it work?
@raphink | @raphink@mastodon.social
BPF LSM
● Stable interface
● Safe places to make checks
● eBPF makes it dynamic
● Protect pre-existing processes
BPF LSM
● Stable interface
● Safe places to make checks
● eBPF makes it dynamic
● Protect pre-existing processes
● Needs kernel 5.7+
Cilium Tetragon
● eBPF makes it dynamic
● Protect pre-existing processes
● Uses kernel knowledge to hook into
sufficiently stable functions
Cilium Tetragon
● eBPF makes it dynamic
● Protect pre-existing processes
● Uses kernel knowledge to hook into
sufficiently stable functions
● Multiple co-ordinated eBPF programs
Cilium Tetragon
● eBPF makes it dynamic
● Protect pre-existing processes
● Uses kernel knowledge to hook into
sufficiently stable functions
● Multiple co-ordinated eBPF programs
● In-kernel event filtering
Observability
● Deep Visibility
○ System, network, protocols,
filesystem, applications, …
● Transparent
○ App agonistic
○ No changes to applications
● Low-Overhead
○ Minimal overhead
○ Extensive filtering & aggregation
● Integrations
○ Prometheus, Grafana, SIEM, fluentd,
OpenTelemetry, elasticsearch
with Cilium Tetragon
eBPF-based Security
Observability & Runtime
Enforcement
⬢ Security Observability
⬢ eBPF
⬢ Cloud Native Metadata
Context is everything
Cloud Native Metadata
YAML Config Example
YAML/Kubernetes as Control Plane
Network Interface Metrics
TCP Latency (sRTT)
Traffic Accounting
TLS/SSL Visibility
Detecting weak/vulnerable TLS Versions
Observing DNS, HTTP, TCP, …
Audit Listening Ports
Detect DNS bypass attempts
Detecting Nmap Scans
Monitoring Process Execution & Syscalls
Combined Network & Runtime Visibility
Detect Late Process Execution
Monitoring File Access
Network Policy Compliance
Observing HTTP & gRPC
with Cilium Tetragon
eBPF-based Security
Observability & Runtime
Enforcement
⬢ Security Observability
⬢ eBPF
⬢ Cloud Native Metadata
⬢ Runtime Enforcement
Runtime Enforcement
● Preventive Security
○ System, network, filesystem, and
applications
● Synchronous enforcement
● Integrations
○ Kubernetes CRD, JSON, OPA, …
○ Convert from existing rule sets
(Falco, PodSecurity Policies, …)
Preventative actions from user space
Preventative actions from kernel
Preventing Sensitive File Access
Detecting re-mount of root filesystem
Monitoring & Preventing Capabilities Abuse
Security Observability &
Runtime Enforcement
github.com/cilium/tetragon
Tetragon Tetragon Enterprise
Advanced Visibility
● Extended Network Visibility
● DNS, HTTP, HTTPS, TLS
● SIEM Integration
● Process Ancestry Information
● High-performance Protocol Parsers,
Aggregation, & Filtering
● File Integrity Monitoring (Digest SHA256)
Advanced Enforcement
● Extended Runtime Enforcement Capabilities
● Threat Detection
● Baseline Policies
Visibility
● Process & Syscall Visibility
● L3-L4 Network Visibility
● File Access Monitoring
● Capabilities & Namespacing
Enforcement
● System call-based enforcement
(kprobes, tracepoints)
Which eBee are you?
@raphink | @raphink@mastodon.social
Cloud Network
Engineer
Platform
Engineer
Platform Ops
(Service Mesh)
Security
Professional
Cloud Architect
Practical Labs
… to become a Cilium & eBPF Jedi
🌐 https://labs-map.isovalent.com
Get badges 🏅
@raphink | @raphink@mastodon.social
eBPF resources
eCHO
eBPF YouTube podcast:
https://www.youtube.com/channel/UCJFUxkVQTBJh3LD1wYB
WvuQ
eBPF & Cilium Slack
http://slack.cilium.io/
eCHO News
Bi-weekly eBPF newsletter:
https://cilium.io/newsletter/
@raphink | @raphink@mastodon.social
Thank you!

Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement with Cilium Tetragon.pdf