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
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
不幸な GC
chencmd
0
890
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
230
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
0
390
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
420
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
750
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
570
What We Talk About When We Talk About XP
m_seki
2
390
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
210
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
640
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
970
HDC tutorial
michielstock
2
850
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Design in an AI World
tapps
1
310
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
660
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
260
Game over? The fight for quality and originality in the time of robots
wayneb77
1
270
YesSQL, Process and Tooling at Scale
rocio
174
15k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
840
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
870
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
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 が引き起こすセキュリ ティ上の問題も対策する。 ⚫ 最小権限の原則に従うために、必要なケーパビリティを洗い出す (+ メンテナンスしていく)。 ⚫ もっと深い話がしたい! 興味があるという方は多田まで!!