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
aslr.pdf
Search
Satoru Takeuchi
PRO
January 24, 2022
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
aslr.pdf
Satoru Takeuchi
PRO
January 24, 2022
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Machine Check Exception
sat
PRO
2
37
バイナリダンプの模様を読む
sat
PRO
0
68
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
54
114-ファイルのshallow_copy.pdf
sat
PRO
2
38
113-Btrfsのスナップショット.pdf
sat
PRO
0
16
システム強制終了時にファイルシステムの整合性を保つ~ コピーオンライト編 ~
sat
PRO
0
59
システム強制終了時に ファイルシステムの整合性を保つ ~ ジャーナリング編 ~
sat
PRO
2
63
ファイルシステムの整合性を回復するfsck
sat
PRO
1
65
小学校5,6年生向けキャリア教育 大人になるまでの道
sat
PRO
8
5.3k
Other Decks in Technology
See All in Technology
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
14
2.1k
「早く出す」より「事業に効く」 ── 顧客の業務サイクルから逆算するAI時代の二重ループ開発と「変化の設計者」 / devsumi2026
rakus_dev
1
410
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
990
Playwright × AI Agent でE2Eテストはどう変わるか AI駆動テストの可能性と実用検証の結果
taiga7543
1
460
kaonavi Tech Night#1
kaonavi
0
110
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
430
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
250
生成AI×AWS CDK×AWS FISで"振り返れる"ミニGameDayをつくろう
yoshimi0227
1
420
AICoEでAIネイティブ組織への進化
yukiogawa
0
200
AI Coding Agent時代のcdk-nagガードレール 〜組織ルールを強制CIで守り抜く設計の挑戦〜
mhrtech
3
430
GoでCコンパイラを作った話
repunit
0
120
あなたの『Site』はどこですか? — xREという考え方
miyamu
0
1.2k
Featured
See All Featured
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
Building Adaptive Systems
keathley
44
3.1k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.6k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
The Invisible Side of Design
smashingmag
301
52k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
350
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Transcript
Address Space Location Randomization (ASLR) Jan. 8th, 2022 Satoru Takeuchi
twitter: satoru_takeuchi, EnSatoru 1
前回までのあらすじ • Executable and Linking Format(ELF)というフォーマット • 実行ファイルのコードやデータはメモリ上にマップされる • どこのオフセットのデータをどこにマップするるか実行ファイルに書いてる
2 test(実行ファイル) メモリ コード データ コード データ マップ
そうでないこともある • 例: Ubuntu20.04の/bin/sleepコマンド • 演習 ◦ sleepコマンドのreadelf -Sを見てみる ◦
“sleep infinity”実行中のメモリマップを /proc/<pid>/mapsで見てみる 3
そうでないこともある • 例: Ubuntu20.04の/bin/sleepコマンド • 演習 ◦ sleepコマンドのreadelf -Sを見てみる ◦
“sleep infinity”実行中のメモリマップを /proc/<pid>/mapsで見てみる • 違い ◦ 実行ファイルのセクションに書いてあるマップ先アドレスと実際の値が違う 4
演習 • “sleep infinity”をもう一度実行した後にメモリマップを確認 5
演習 • “sleep infinity”をもう一度実行した後にメモリマップを確認 • 結果 ◦ さっきとアドレスが違う! 6
理由 • sleepコマンドは実行するたびにセクションのマップ先アドレスがランダムに変わる ◦ これがAddress Space Location Randomization(ASLR) ◦ ASLRが機能するように実行ファイルが
Position Independent Executable(PIE)になっている • 目的 ◦ 特定アドレスのコードを実行するようなセキュリティ攻撃を避ける • どんなプログラムがPIE? ◦ Ubuntuだと昔はsshなどの一部重要プログラムだけだった ◦ 17.04以降はすべて(例外があるかも?よく知らない) 7