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
ret2dl_resolve(x86_64)
Search
appBana
May 05, 2018
Programming
570
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ret2dl_resolve(x86_64)
in YOKARO-MON勉強会
appBana
May 05, 2018
Other Decks in Programming
See All in Programming
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
3.3k
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
360
React本体のコードリーディング
high_g_engineer
1
120
AIが無かった頃の素敵な出会いの話
codmoninc
1
340
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
250
霧の中の代数的エフェクト
funnyycat
1
450
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
260
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
150
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
930
Featured
See All Featured
The Spectacular Lies of Maps
axbom
PRO
1
880
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Designing for humans not robots
tammielis
254
26k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
340
Claude Code のすすめ
schroneko
67
230k
The Language of Interfaces
destraynor
162
27k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
330
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Six Lessons from altMBA
skipperchong
29
4.4k
HDC tutorial
michielstock
2
760
GraphQLとの向き合い方2022年版
quramy
50
15k
Transcript
None
None
None
None
Elf64_Rela r_offset (size=0x8) r_info (size=0x8) r_addend (size=0x8)
Elf64_Rela r_offset (size=0x8) r_info (size=0x8) r_addend (size=0x8) typedef struct {
Elf64_Addr r_offset; /* Address */ Elf64_Xword r_info; /* Relocation type and symbol index */ Elf64_Sxword r_addend; /* Addend */ } Elf64_Rela;
Elf64_Rela r_offset (size=0x8) r_info (size=0x8) r_addend (size=0x8) GOT Elf64_Symindex
None
Elf64_Sym st_name (size=0x4) st_info (size=0x1) st_other (size=0x1) st_shndx (size=0x2) st_value
(size=0x8) st_size (size=0x8)
Elf64_Sym st_name (size=0x4) st_info (size=0x1) st_other (size=0x1) st_shndx (size=0x2) st_value
(size=0x8) st_size (size=0x8) typedef struct { Elf64_Word st_name; /* Symbol name (string tbl index) */ unsigned char st_info; /* Symbol type and binding */ unsigned char st_other; /* Symbol visibility */ Elf64_Section st_shndx; /* Section index */ Elf64_Addr st_value; /* Symbol value */ Elf64_Xword st_size; /* Symbol size */ } Elf64_Sym;
Elf64_Sym st_name (size=0x4) st_info (size=0x1) st_other (size=0x1) st_shndx (size=0x2) st_value
(size=0x8) st_size (size=0x8) offset
None
None
None
“Hello, world!” %* '&”hello”'$'( puts() (+ “hello.c”#,! “hello”
"+$)
“Hello, world!” ).$+*”hello” +"(+,puts() ,/# “hello.c”'0% “hello” !&/(-
None
[email protected]
0x601018<
[email protected]
>0x400416
0x601018<
[email protected]
>0x400416<puts@plt+6>
1. Stack0(reloc_offset)push
1. Stack0(reloc_offset)push 2. 0x400400(.plt)
1. Stack 0(reloc_offset)push 2. 0x400400(.plt) 3. [0x601008]push [0x601010](_dl_runtime_resolve())
link_map
None
None
None
None
.rela.plt .dynstr .dynsym puts Elf64_Rela __libc_start_m ain Elf64_Rela
puts ELF64_Sym __libc_start_m ain ELF64_Sym libc.so.6¥x00 puts¥x00 __libc_start_main ¥x00 ...
.rela.plt .dynstr .dynsym puts Elf64_Rela __libc_start_m ain Elf64_Rela
puts ELF64_Sym __libc_start_m ain ELF64_Sym libc.so.6¥x00 puts¥x00 __libc_start_main ¥x00 ... .rela.plt reloc_offset Elf64_Rela
.rela.plt .dynstr .dynsym puts Elf64_Rela __libc_start_m ain Elf64_Rela puts ELF64_Sym
__libc_start_m ain ELF64_Sym libc.so.6¥x00 puts¥x00 __libc_start_main ¥x00 ... .dynsym r_info >> 32 Elf64_Sym
.rela.plt .dynstr .dynsym puts Elf64_Rela __libc_start_m ain Elf64_Rela puts ELF64_Sym
__libc_start_m ain ELF64_Sym libc.so.6¥x00 puts¥x00 __libc_start_main ¥x00 ... .dynstr st_name
None
puts()reloc_offset
puts()Elf64_Rela = rela.plt + puts()rela_offset * Elf64_Rela = 0x400398
+ 0x0 * 0x18 = 0x400398
puts()Elf64_Rela = rela.plt + puts()rela_offset * Elf64_Rela = 0x400398
+ 0x0 * 0x18 = 0x400398 r_info = puts()Elf64_Symindex << 32 | R_386_JMP_SLOT = 0x1 << 32 | 0x7 = 0x0000000100000007
puts()Elf64_Sym = .dynsym + puts()Elf64_Relar_info << 32* Elf64_Rela =
0x4002b8 + 0x1 * 0x18 = 0x4002d0
puts()Elf64_Sym = .dynsym + puts()Elf64_Relar_info << 32* Elf64_Sym =
0x4002b8 + 0x1 * 0x18 = 0x4002d0 st_name = 0xb st_info = 0x12
puts() = .dynstr + puts() Elf64_Sym st_name =
0x400318 + 0xb = 0x400323
None
None
None
None
.rela.plt .dynstr .dynsym puts Elf64_Rela __libc_start_m ain Elf64_Rela
puts ELF64_Sym __libc_start_m ain ELF64_Sym libc.so.6¥x00 puts¥x00 __libc_start_main ¥x00 ...
.bss Elf64_Relo Elf64_Sym “system¥x00” push reloc_offset _dl_runtime_resolve(“/bin/sh”)
.bss Elf64_Relo Elf64_Sym “system¥x00” push reloc_offset _dl_runtime_resolve(“/bin/sh”) reloc_offset = (A
- .rela.plt) / 0x18 A
.bss Elf64_Relo Elf64_Sym “system¥x00” push reloc_offset _dl_runtime_resolve(“/bin/sh”) r_info = ((B
- .dynsym) / 0x18) << 32 | 0x7 B
.bss Elf64_Relo Elf64_Sym “system¥x00” push reloc_offset _dl_runtime_resolve(“/bin/sh”) st_name = (C
- .dynstr) C
None
None
None
None
None
None
None
None
None
None
None
None
None