Objdump
objdump (является частью GNU Binutils) — компьютерная программа для отображения различной информации объектных файлов. Например objdump может быть использован для разбора заголовков[1] или дизассемблирования исполняемого файла.
Пример дизассемблирования:
$ objdump -D -M intel file.bin | grep main.: -A20
Здесь выполняется дизассемблирование файла «file.bin», с синтаксисом Intel. Из-за того, что вывод утилиты получается слишком большим, в примере он передается на вход команде grep, которая ищет функцию main и выводит 20 строк её кода.
Пример вывода:
4004ed: 55 push rbp
4004ee: 48 89 e5 mov rbp,rsp
4004f1: c7 45 ec 00 00 00 00 mov DWORD PTR [rbp-0x14],0x0
4004f8: c7 45 f0 01 00 00 00 mov DWORD PTR [rbp-0x10],0x1
4004ff: c7 45 f4 02 00 00 00 mov DWORD PTR [rbp-0xc],0x2
400506: c7 45 f8 03 00 00 00 mov DWORD PTR [rbp-0x8],0x3
40050d: c7 45 fc 04 00 00 00 mov DWORD PTR [rbp-0x4],0x4
400514: c7 45 ec 00 00 00 00 mov DWORD PTR [rbp-0x14],0x0
40051b: eb 13 jmp 400530 <main+0x43>
40051d: 8b 05 15 0b 20 00 mov eax,DWORD PTR [rip+0x200b15] # 601038 <globalA>
400523: 83 e8 01 sub eax,0x1
400526: 89 05 0c 0b 20 00 mov DWORD PTR [rip+0x200b0c],eax # 601038 <globalA>
40052c: 83 45 ec 01 add DWORD PTR [rbp-0x14],0x1
400530: 8b 05 02 0b 20 00 mov eax,DWORD PTR [rip+0x200b02] # 601038 <globalA>
400536: 39 45 ec cmp DWORD PTR [rbp-0x14],eax
400539: 7c e2 jl 40051d <main+0x30>
40053b: 5d pop rbp
40053c: c3 ret
40053d: 0f 1f 00 nop DWORD PTR [rax]
См. также
Примечания
- ↑ Parsing a Binary Specimen with Objdump Архивная копия от 3 ноября 2018 на Wayback Machine / Cameron H. Malin, Malware Forensics: Investigating and Analyzing Malicious Code. Syngress, 2008 ISBN 9780080560199 (англ.)
Ссылки
- 4 objdump / GNU Binary Utilities documentations (англ.)
- objdump man page (англ.)
- Linux Objdump Command Examples (Disassemble a Binary File), HIMANSHU ARORA, SEPTEMBER 21, 2012 (англ.)
- Аналог objdump для go (англ.)
- objdump / Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever. «O’Reilly Media, Inc.», 2005 (5th ISBN 9780596009304) (англ.)
- Disassembly, page 51 in Cyrus Peikari, Anton Chuvakin. Security Warrior: Know Your Enemy. «O’Reilly Media, Inc.», 2004. ISBN 9780596552398 (англ.)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.