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
380
RustのLINEBot SDKを自作した話
shinbunbun_
0
2.4k
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.9k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.9k
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
670
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
230
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.3k
IEEE802.1X認証を導入してみた
shinbunbun_
0
330
UBICの食材管理APIを作った話
shinbunbun_
0
260
Other Decks in Programming
See All in Programming
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
Contextとはなにか
chiroruxx
1
360
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
120
OSもどきOS
arkw
0
580
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
600
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
270
Claspは野良GASの夢をみるか
takter00
0
200
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
170
AIで効率化できた業務・日常
ochtum
0
140
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
290
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Being A Developer After 40
akosma
91
590k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
Music & Morning Musume
bryan
47
7.2k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
480
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Done Done
chrislema
186
16k
Leo the Paperboy
mayatellez
7
1.9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
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まだ入門しただけなので、もっと深いところまで触っていきたい