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.5k
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
5k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
5k
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
700
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
240
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.4k
IEEE802.1X認証を導入してみた
shinbunbun_
0
340
UBICの食材管理APIを作った話
shinbunbun_
0
260
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
530
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
530
「人を評価する AI」の設計と実装
ryoyanara
0
160
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
350
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
150
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.2k
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
220
霧の中の代数的エフェクト
funnyycat
1
460
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
340
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
200
数百円から始めるRuby電子工作
tarosay
0
130
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
920
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
Making Projects Easy
brettharned
120
6.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
400
What's in a price? How to price your products and services
michaelherold
247
13k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
420
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
Everyday Curiosity
cassininazir
0
270
Docker and Python
trallard
47
4.1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
350
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
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まだ入門しただけなので、もっと深いところまで触っていきたい