Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
eBPF for Security Observability
Search
Liz Rice
June 24, 2022
Technology
1.6k
0
Share
eBPF for Security Observability
As seen at DevOpsDays Amsterdam and KCD Berlin
Liz Rice
June 24, 2022
More Decks by Liz Rice
See All by Liz Rice
Building a cloud native business on open source
lizrice
0
250
KCD Lima: eBee in Peru!
lizrice
0
210
Unleashing the kernel with eBPF
lizrice
0
380
eBPF's Abilities and Limitations: The Truth
lizrice
0
520
Simplifying multi-cloud and multi-cluster Kubernetes deployments with Cilium
lizrice
0
280
When is a Secure Connection not encrypted? And other stories
lizrice
1
130
Keeping it simple: Cilium Mesh - networking for multi-cloud Kubernetes and beyond
lizrice
1
780
How Many Proxies Do You Need
lizrice
1
200
Beginner's Guide to eBPF Programming for Networking
lizrice
1
2.7k
Other Decks in Technology
See All in Technology
Kaggle未経験社員をメダリストに育てる「AIドラゴン桜」
lycorptech_jp
PRO
0
350
Splunk MCPサーバの利活用事例 ーKINTOテクノロジーズの取り組み
kintotechdev
1
270
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.5k
シンデレラなんかになりたくない!ガラスの靴が割れた時代にどう歩く?
nomizone
0
170
LLM時代のリファクタリング戦略_AIエージェントによる段階的・安全なTS移行方法
play_inc
0
160
TSKaigi 2026 - enumよ、さようなら
teamlab
PRO
2
460
JaSSTに関わることで変わった人生観 #jasstnano
makky_tyuyan
0
180
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
【新卒研修】ライブデモ + compose.yaml読解_講義資料
dip_tech
PRO
0
140
Orchestration Development Workshopを半期実施して
lycorptech_jp
PRO
0
360
パーソルキャリア IT/テクノロジー職向け 会社紹介資料|Company Introduction Deck
techtekt
PRO
0
570
AI全盛の今だからこそ、あえてもう一度振り返るAPIの基礎
smt7174
3
160
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Fireside Chat
paigeccino
42
3.9k
エンジニアに許された特別な時間の終わり
watany
107
240k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Thoughts on Productivity
jonyablonski
76
5.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
290
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
170
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Building the Perfect Custom Keyboard
takai
2
770
Transcript
eBPF for Security Observability Liz Rice | @lizrice Chief Open
Source Officer, Isovalent
@lizrice
@lizrice What is ? extended Berkeley Packet Filter
@lizrice What is ? Makes the kernel programmable
@lizrice userspace kernel app event system calls eBPF program Run
custom code in the kernel
@lizrice SEC("kprobe/sys_execve") int hello(void *ctx) { bpf_trace_printk("Hello World!"); return 0;
} $ sudo ./hello bash-20241 [004] d... 84210.752785: 0: Hello World! bash-20242 [004] d... 84216.321993: 0: Hello World! bash-20243 [004] d... 84225.858880: 0: Hello World! Info about process that called execve syscall + userspace code to load eBPF program eBPF Hello World
Dynamic changes to kernel behaviour
Dynamic tracing tools
@lizrice userspace kernel Tracing tool event eBPF program Use eBPF
to collect event metrics eBPF Map metrics load Gather & show metrics
@lizrice eBPF tracing tools from iovisor/bcc
@lizrice eBPF tracing - opensnoop ~/bcc/libbpf-tools$ sudo ./opensnoop PID COMM
FD ERR PATH 5040 node 21 0 /proc/5132/cmdline 5040 node 21 0 /proc/6460/cmdline 5040 node 21 0 /proc/6460/cmdline 6461 opensnoop 18 0 /etc/localtime 5040 node 21 0 /proc/5132/cmdline 5040 node 21 0 /proc/6460/cmdline 5060 node 23 0 /home/liz/.vscode-server/data/User/workspaceStorage/48b53 5040 node 21 0 /proc/5132/cmdline 5040 node 21 0 /proc/6460/cmdline 5040 node 21 0 /proc/5132/cmdline 5040 node 21 0 /proc/6460/cmdline …
eBPF and Kubernetes
@lizrice userspace kernel pod container pod container container One kernel
per host
@lizrice userspace kernel networking access files create containers One kernel
per host pod container pod container container
@lizrice userspace kernel app app pods networking access files create
containers Kernel aware of everything on the host
@lizrice userspace app kernel app pods networking access files create
containers eBPF programs can be aware of everything
@lizrice $ kubectl gadget trace open NODE NAMESPACE POD CONTAINER
PID COMM FD ERR PATH kind-2-control-plane default xwing spaceship 361876 vi 3 0 /etc/passwd eBPF tracing on Kubernetes - Inspektor Gadget Kubernetes info
@lizrice eBPF observability tools -
@lizrice eBPF observability tools - Cilium Hubble
eBPF observability
eBPF security observability
@lizrice Security observability
@lizrice Security observability
@lizrice What activity do we care about for security? eBPF
programs
@lizrice Syscall checks within the kernel
@lizrice TOCTTOU vulnerabilities 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 Attacker changes params after inspection
@lizrice Need to make the check at the right place
@lizrice Linux Security Modules • Stable interface • Safe places
to make checks
@lizrice BPF LSM • Stable interface • Safe places to
make checks + eBPF benefits • Dynamic • Protect pre-existing processes
@lizrice $ sudo ./chmoddemo & [1] 7631 $ sudo cat
/sys/kernel/debug/tracing/trace_pipe chmod-7776 [001] d... 38197.342160: bpf_trace_printk: lsm path_chmod liz BPF LSM hook has kernel info populated SEC("lsm/path_chmod") int BPF_PROG(path_chmod, const struct path *path, umode_t mode) { bpf_printk("lsm path_chmod %s\n", path->dentry->d_iname); return 0; } Filename known to kernel
@lizrice BPF LSM • Stable interface • Safe places to
make checks + eBPF benefits • Dynamic • Protect pre-existing processes But needs kernel 5.7+ & Kubernetes context?
How stable is the Linux kernel?
@lizrice Cilium Tetragon • Safe places to make checks +
eBPF benefits • Dynamic • Protect pre-existing processes Uses kernel knowledge to hook into sufficiently stable functions Adds Kubernetes context
@lizrice Photo credit: Bibafu A Tetragonisca angustula bee guarding the
nest-entrance
@lizrice apiVersion: cilium.io/v1alpha1 kind: TracingPolicy metadata: name: "etc-files" spec: kprobes:
- call: "fd_install" … matchArgs: - index: 1 operator: "Prefix" values: - "/etc/" … Cilium Tetragon tracing policy + Policy “follows” file descriptor through read, write & close events
@lizrice $ kubectl logs ds/tetragon -c export-stdout -f | tetragon
observe 🚀 process default/xwing /usr/bin/vi /etc/passwd 📬 open default/xwing /usr/bin/vi /etc/passwd 📪 close default/xwing /usr/bin/vi 📬 open default/xwing /usr/bin/vi /etc/passwd 📝 write default/xwing /usr/bin/vi /etc/passwd 1275 bytes 📪 close default/xwing /usr/bin/vi 💥 exit default/xwing /usr/bin/vi /etc/passwd 0 Cilium Tetragon observe Policy events Kubernetes info
@lizrice Combined network and runtime visibility
eBPF preventative runtime security
@lizrice Network policy → eBPF programs drop packets
@lizrice Preventative actions from user space
@lizrice Preventative actions from kernel
@lizrice $ kubectl logs ds/tetragon -c export-stdout -f | tetragon
observe 🚀 process default/xwing /usr/bin/vi /etc/passwd 📬 open default/xwing /usr/bin/vi /etc/passwd 📪 close default/xwing /usr/bin/vi 📬 open default/xwing /usr/bin/vi /etc/passwd 📝 write default/xwing /usr/bin/vi /etc/passwd 1269 bytes 💥 exit default/xwing /usr/bin/vi /etc/passwd SIGKILL Cilium Tetragon observe Killed before write
eBPF security observability • Dynamic instrumentation - zero app modifications
• Contextual information, Kubernetes identity-aware • Option for runtime enforcement from the kernel
Thank you! cilium/tetragon @ciliumproject cilium.io | ebpf.io @lizrice