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
Security_for_introducing_eBPF
Search
Kenta Tada
December 06, 2024
Programming
400
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Security_for_introducing_eBPF
Kenta Tada
December 06, 2024
More Decks by Kenta Tada
See All by Kenta Tada
eBPFの未来に向けた課題
kentatada
0
170
Beyond_the_Limits_of_eBPF__A_Journey_Through_OS_Technologies.pdf
kentatada
0
120
eBPF Updates (March 2025)
kentatada
0
390
CNCJ で考える OSPO ステージ2
kentatada
0
180
cgroup v2 support in Kubeadm
kentatada
0
450
Keynote_ The State of eBPF in Japan
kentatada
0
170
eBPF Japan Meetup のご紹介
kentatada
0
650
eBPF_technologies_with_container
kentatada
0
870
Linux Tracing Technologies for Rust
kentatada
4
1.2k
Other Decks in Programming
See All in Programming
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
460
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
870
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
350
RSSとCodexを使ってX投稿自動化してみた
ochtum
0
110
業務時間外もAIに働いてもらう話
colorful12
3
10k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
2
1.6k
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
140
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
170
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
110
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
290
スマート反転とウェブアクセシビリティ
camiha
0
140
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
650
Designing for Performance
lara
611
70k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Mobile First: as difficult as doing things right
swwweet
225
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
490
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
870
Rails Girls Zürich Keynote
gr2m
96
14k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Transcript
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. eBPF
導入のためのセキュリティ検討 2024年 12月 6日 多田 健太 トヨタ自動車株式会社 情報通信企画部 InfoTech-IS 兼オープンソースプログラムグループ 主幹 eBPF Japan Meetup #2
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. と、その前に
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. eBPF
Japan Community ロゴが出来ました!!
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. Agenda
⚫ eBPF 導入のためのセキュリティ対策と脅威分析 ⚫ eBPF Security Threat Model の紹介 ⚫ Linux Capabilities と eBPF
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. eBPF
導入のためのセキュリティ対策と脅威分析
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. セキュリティ対策への取り組み
⚫ eBPF の本番環境における運用の課題として、セキュリティ対策 が挙げられてきている。 ⚫ See eBPF_technologies_with_container - Speaker Deck ⚫ eBPF Foundation も、組織内で eBPF を安全かつ確実に活用す るための 2 つのレポートを提供(2024/11) ⚫ eBPF Security Threat Model by ControlPlane ⚫ eBPF Verifier Code Audit by NCC Group ✓eBPF Verifier のソースコードのセキュリティレビューを実施 ⚫ eBPF を導入するシステムで脅威分析してみよう!
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 脅威分析とは
⚫ 脅威分析は、システムにおいてセキュリティ問題の原因となりう る脅威を分析し、必要な対策を明確にする。 →対象のシステムを深く理解する必要がある。 ⚫ eBPF を導入するシステムに対して脅威分析をしよう! ⚫ 信頼境界はどこ? ⚫ 〇〇ヘルパー関数から□ □(資産)にアクセスできる? ⚫ 攻撃手段の bpf_override_return って何? ⚫ 必要な Linux Capabilities って CAP_BPF だけで大丈夫? → eBPF に関連する知見がないと、脅威分析出来ない。
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 例:
Attack Tree を見てみよう eBPF Security Threat Model
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 例:
Attack Tree を見てみよう eBPF Security Threat Model
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. eBPF
Security Threat Model の紹介
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 「eBPF
Security Threat Model」 概要 ⚫ エンタープライズ企業が eBPF を安全に導入するためのガイダン スを提供 ⚫ eBPF が導入される基本的なアーキテクチャに対して脅威分析を 行い、特定されたセキュリティ上の懸念に対処するための推奨事 項まで提示する実用的なガイダンス ⚫ このガイダンスを参考にして脅威分析すればよさそう!
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 「eBPF
Security Threat Model」 要約 ⚫ 最新のセキュリティパッチを適用 ⚫ eBPF プログラムをロードするユーザプロセスに最小権限の原則 (例: 必要な Linux Capabilities だけを付与)を適用 ⚫ CNCF のソフトウェアサプライチェーンベストプラクティスも活 用し、サプライチェーンのセキュリティを強化 ⚫ unpriviledged eBPF の機能は無効化 ⚫ このホワイトペーパーを参考にしつつ、組織のシステムに合わせ て脅威モデルを作成し、危険を監視すること
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 「eBPF
Security Threat Model」所感 ⚫ Linux Capabilities から、サプライチェーンのセキュリティまで 大事なポイントがまとまっている。 ⚫ 脅威分析の例がわかりやすい。 ⚫ 一方、 eBPF の専門知識をより深めていかないと、自前のシス テムの脅威分析をするのは難しい。 → 本日は Linux Capabilities を説明
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. Linux
Capabilities と eBPF
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. Linux
Capabilities ⚫ Linux Capabilities とは ⚫ スーパーユーザーに結びつけられてきた権限を複数のグループに分割し、 このグループをケーパビリティと呼んでいる。 ⚫ 各々独立に有効・無効を設定できる。 ⚫ 最小権限の原則から、なるべく多くのケーパビリティを割り当て たくないが、そもそも、どのケーパビリティが必要であるかわか らないことが多い。 ⚫ 本日はよくある疑問や誤解を3つ紹介
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. CAP_BPF
と CAP_PERFMON あたりがあれば OK? ⚫ CAP_BPF と CAP_PERFMON だけでは不十分 ⚫ 使うヘルパー関数や kfunc 等で必要なケーパビリティは異なる。 ⚫ 著名な OSS は必要なケーパビリティリストをドキュメントに記載 ⚫ bpfman : Linux Capabilities - bpfman ⚫ Grafana Beyla : Deploy Beyla in Kubernetes | Grafana Beyla documentation From eBPF Security Threat Model
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. 洗い出したケーパビリティリストのメンテナンスは不要?
⚫ メンテナンスは必要 ⚫ kfunc の実装がカーネルバージョン毎に異なる。 ⚫ crash_kexec (kfunc)のドキュメントでは、将来的に CAP_SYS_BOOT 以外のケーパビリティが必要とされる可能性があることを記述している。 ⚫ さらに、ケーパビリティ自体の実装が変化することもある。 ⚫ Linux kernel 5.19 以降で CAP_BPF 設定時の挙動が変化し、マップの 作成とプログラムのロード等の一部の処理にのみ CAP_BPF が必要と なった。
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. eBPF
プログラムに必要な権限をどこで確認しているの? ⚫ eBPF のプログラムをロードする際に、カーネルの静的解析中に チェックされている。 ⚫ もし権限が不足していると、 bpf システムコールからエラーが返ってく る。 ⚫ verifier のソースコードを確認すると、権限チェックしているこ とがわかる。 ⚫ヘルパー関数 : check_helper_call ⚫kfunc : check_kfunc_call
Copyright © 2024 TOYOTA MOTOR CORPORATION All rights reserved. まとめ
⚫ eBPF を安心安全に使うために、 eBPF が引き起こすセキュリ ティ上の問題も対策する。 ⚫ 最小権限の原則に従うために、必要なケーパビリティを洗い出す (+ メンテナンスしていく)。 ⚫ もっと深い話がしたい! 興味があるという方は多田まで!!