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
290
カーネルレベルでTwitterを禁止しよう
Yuto Takamune
July 10, 2023
Tweet
Share
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
1
360
RustのLINEBot SDKを自作した話
shinbunbun_
0
2.2k
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.5k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.5k
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
630
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
220
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.1k
IEEE802.1X認証を導入してみた
shinbunbun_
0
320
UBICの食材管理APIを作った話
shinbunbun_
0
240
Other Decks in Programming
See All in Programming
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
240
Rethinking API Platform Filters
vinceamstoutz
0
160
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
590
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
440
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
300
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
380
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
130
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
970
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
120
Featured
See All Featured
BBQ
matthewcrist
89
10k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Color Theory Basics | Prateek | Gurzu
gurzu
0
260
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
490
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
We Have a Design System, Now What?
morganepeng
55
8k
Designing Experiences People Love
moore
143
24k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
390
How to Think Like a Performance Engineer
csswizardry
28
2.5k
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まだ入門しただけなので、もっと深いところまで触っていきたい