Upload
chia-hao-tsai
View
73
Download
2
Embed Size (px)
Citation preview
ELF
‧ Executable and Linkable Format
‧ Means it can
‧ Execute as a binary
‧ Linked by another binary
4
‧ General Header - Basic ELF information
‧ System - 32 / 64 bits
‧ Architecture - AMD / ARM / PPC / ⋯
‧ Class - Big / Little Endian
‧ ⋯ etc
6
‧ Machine Code - Translate Instruction to Code
‧ Register - RAX / ESP / RIP
‧ Memory - 0x1000178
‧ syscall table - syscall / int
8
‧ How to say hello world
‧ Need write something to stdout
‧ Write string into men
‧ Setup register
‧ Call syscall
‧ Need to exit normally
‧ Setup register
‧ Call syscall
13
‧ How to say hello world
‧ Need write something to stdout
‧ Write string into mem
‧ Setup register
‧ Call syscall
‧ Need to exit normally
‧ Setup register
‧ Call syscall
14
‧ How to say hello world
‧ Need write something to stdout
‧ Write string into mem
‧ Setup register
‧ Call syscall
‧ Need to exit normally
‧ Setup register
‧ Call syscall
15
‧ Buffer Overflow
‧ Stack Variable/Function are store as stack.
‧ Write something to variable === Write to mem
23
Conclusion
‧ SMC in ASM is the supported method, if
‧ Find out where can write to
‧ How many you can write to
‧ Then, just write the code into memory
24