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
0
230
カーネルレベルでTwitterを禁止しよう
Yuto Takamune
July 10, 2023
Tweet
Share
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
0
310
RustのLINEBot SDKを自作した話
shinbunbun_
0
1.7k
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
3.8k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
3.7k
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
480
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
190
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
1.6k
IEEE802.1X認証を導入してみた
shinbunbun_
0
270
UBICの食材管理APIを作った話
shinbunbun_
0
210
Other Decks in Programming
See All in Programming
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
600
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
660
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
1
8.1k
5つのアンチパターンから学ぶLT設計
narihara
1
160
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
640
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
640
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
330
VS Code Update for GitHub Copilot
74th
2
620
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
3
5.7k
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
730
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
10k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
35
6.7k
The Invisible Side of Design
smashingmag
301
51k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Done Done
chrislema
184
16k
4 Signs Your Business is Dying
shpigford
184
22k
It's Worth the Effort
3n
185
28k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
How STYLIGHT went responsive
nonsquared
100
5.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
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まだ入門しただけなので、もっと深いところまで触っていきたい