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
カーネルレベルでTwitterを禁止しよう
Search
Yuto Takamune
July 10, 2023
Programming
310
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
カーネルレベルでTwitterを禁止しよう
Yuto Takamune
July 10, 2023
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
1
390
RustのLINEBot SDKを自作した話
shinbunbun_
0
2.5k
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
5k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
5.1k
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
700
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
240
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.4k
IEEE802.1X認証を導入してみた
shinbunbun_
0
340
UBICの食材管理APIを作った話
shinbunbun_
0
270
Other Decks in Programming
See All in Programming
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
590
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.4k
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
490
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
140
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
270
Gradle-Plugin-in-2026.pdf
ryunen344
1
130
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
120
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
480
Go 1.27 における memory allocation の高速化
andpad
0
360
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
180
「人を評価する AI」の設計と実装
ryoyanara
0
280
バグを直したら useEffect が消えた
colorful12
3
780
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
220
Thoughts on Productivity
jonyablonski
76
5.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
500
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
640
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Typedesign – Prime Four
hannesfritz
42
3.2k
Practical Orchestrator
shlominoach
191
12k
Exploring anti-patterns in Rails
aemeredith
3
480
New Earth Scene 8
popppiees
3
2.5k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
570
Rails Girls Zürich Keynote
gr2m
96
14k
Transcript
カーネルレベルでTwitterを禁 止しよう 会津大学 学部3年 しんぶんぶん
自己紹介 • 名前: しんぶんぶん • 所属: 会津大学学部 3 年 •
Twitter: @shinbunbun_, @4fa19623 • Rust いっぱいちゅき • LINE API Expert / seccamp ’23 / Cybozu labyouth 13th
みなさん、Twitterやりすぎてませんか?
Twitterを禁止する方法 • Chrome拡張 • ファイアウォールでブロック • etc…
実はそれ、カーネルレベルでブロックできます
そう、eBPFならね!
eBPFとは • カーネルのソースコードを変更したり、カーネルモジュールをロードしたりすることな く、安全にカーネルの機能を拡張できる • ユーザースペースはGo,C++, Rustなどでかける • eBPFプログラム自体はCやRustでかける
つまり...
全部Rustでかける!!!
今回作ったもの • ayaというRustのライブラリを使用 • 公式チュートリアルにXDPを使ってパケットのdropをするコードが載っているのでそ れを使用 • コード: https://github.com/aya-rs/book/tree/main/examples/xdp-drop
実際に動かしてみよう!
まとめ • やっぱり低レイヤーやりたかったらRustめちゃめちゃ良いなと思った • eBPFまだ入門しただけなので、もっと深いところまで触っていきたい