4.7 通用 gadget
__libc_csu_init()
$ file /usr/lib/libc-2.26.so
/usr/lib/libc-2.26.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /usr/lib/ld-linux-x86-64.so.2, BuildID[sha1]=f46739d962ec152b56d2bdb7dadaf8e576dbf6eb, for GNU/Linux 3.2.0, not strippedgdb-peda$ disassemble /r __libc_csu_init
Dump of assembler code for function __libc_csu_init:
0x00000000004007d0 <+0>: 41 57 push r15
0x00000000004007d2 <+2>: 41 56 push r14
0x00000000004007d4 <+4>: 49 89 d7 mov r15,rdx
0x00000000004007d7 <+7>: 41 55 push r13
0x00000000004007d9 <+9>: 41 54 push r12
0x00000000004007db <+11>: 4c 8d 25 16 06 20 00 lea r12,[rip+0x200616] # 0x600df8
0x00000000004007e2 <+18>: 55 push rbp
0x00000000004007e3 <+19>: 48 8d 2d 16 06 20 00 lea rbp,[rip+0x200616] # 0x600e00
0x00000000004007ea <+26>: 53 push rbx
0x00000000004007eb <+27>: 41 89 fd mov r13d,edi
0x00000000004007ee <+30>: 49 89 f6 mov r14,rsi
0x00000000004007f1 <+33>: 4c 29 e5 sub rbp,r12
0x00000000004007f4 <+36>: 48 83 ec 08 sub rsp,0x8
0x00000000004007f8 <+40>: 48 c1 fd 03 sar rbp,0x3
0x00000000004007fc <+44>: ff 15 f6 07 20 00 call QWORD PTR [rip+0x2007f6] # 0x600ff8
0x0000000000400802 <+50>: 48 85 ed test rbp,rbp
0x0000000000400805 <+53>: 74 1f je 0x400826 <__libc_csu_init+86>
0x0000000000400807 <+55>: 31 db xor ebx,ebx
0x0000000000400809 <+57>: 0f 1f 80 00 00 00 00 nop DWORD PTR [rax+0x0]
0x0000000000400810 <+64>: 4c 89 fa mov rdx,r15
0x0000000000400813 <+67>: 4c 89 f6 mov rsi,r14
0x0000000000400816 <+70>: 44 89 ef mov edi,r13d
0x0000000000400819 <+73>: 41 ff 14 dc call QWORD PTR [r12+rbx*8]
0x000000000040081d <+77>: 48 83 c3 01 add rbx,0x1
0x0000000000400821 <+81>: 48 39 dd cmp rbp,rbx
0x0000000000400824 <+84>: 75 ea jne 0x400810 <__libc_csu_init+64>
0x0000000000400826 <+86>: 48 83 c4 08 add rsp,0x8
0x000000000040082a <+90>: 5b pop rbx
0x000000000040082b <+91>: 5d pop rbp
0x000000000040082c <+92>: 41 5c pop r12
0x000000000040082e <+94>: 41 5d pop r13
0x0000000000400830 <+96>: 41 5e pop r14
0x0000000000400832 <+98>: 41 5f pop r15
0x0000000000400834 <+100>: c3 ret
End of assembler dump.参考资料
Last updated