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
Address Space Layout Randomization(ASLR)
Search
Satoru Takeuchi
PRO
January 08, 2022
Technology
1
290
Address Space Layout Randomization(ASLR)
以下動画のテキストです
https://youtu.be/iCCNEoCKdHE
Satoru Takeuchi
PRO
January 08, 2022
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Rook: Intro and Deep Dive With Ceph
sat
PRO
0
85
会社員しながら本を書いてきた知見の共有
sat
PRO
3
770
デバイスにアクセスするデバイスファイル
sat
PRO
1
32
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
28
デバイスドライバ
sat
PRO
0
45
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
110
共有メモリ
sat
PRO
3
66
マルチスレッドプログラム
sat
PRO
3
55
Linuxのブートプロセス initramfs編
sat
PRO
2
76
Other Decks in Technology
See All in Technology
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
120
Oracle Cloud Infrastructure:2025年6月度サービス・アップデート
oracle4engineer
PRO
1
140
ひとり情シスなCTOがLLMと始めるオペレーション最適化 / CTO's LLM-Powered Ops
yamitzky
0
370
Observability infrastructure behind the trillion-messages scale Kafka platform
lycorptech_jp
PRO
0
130
Create a Rails8 responsive app with Gemini and RubyLLM
palladius
0
140
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
53
32k
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
2
380
本部長の代わりに提案書レビュー! KDDI営業が毎日使うAIエージェント「A-BOSS」開発秘話
minorun365
PRO
14
2.3k
エンジニア向け技術スタック情報
kauche
0
110
AWS CDK 実践的アプローチ N選 / aws-cdk-practical-approaches
gotok365
4
480
実践! AIエージェント導入記
1mono2prod
0
140
Oracle Audit Vault and Database Firewall 20 概要
oracle4engineer
PRO
2
1.6k
Featured
See All Featured
Building Applications with DynamoDB
mza
95
6.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Designing for Performance
lara
609
69k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Facilitating Awesome Meetings
lara
54
6.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
How to Ace a Technical Interview
jacobian
277
23k
A Tale of Four Properties
chriscoyier
159
23k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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