这是一个汇编代码片段:
jmp short getadd
shellcode:
pop esi
xor eax, eax
mov byte [esi+9], al
push dword esi
call 0x8048300
; adress found by deassmembling a c program for printf
xor eax,eax
mov al,0
xor ebx,ebx
int 0x80
getadd:
call shellcode
db "nice job!"
但在倾倒对象后,我发现:
Disassembly of section .text:
00000000 <shellcode-0x2>:
0: eb 14 jmp 16 <getadd>
00000002 <shellcode>:
2: 5e pop %esi
3: 31 c0 xor %eax,%eax
5: 88 46 09 mov %al,0x9(%esi)
8: 56 push %esi
9: e8 fc 82 04 08 call 804830a <getadd+0x80482f4>
e: 31 c0 xor %eax,%eax
10: b0 00 mov $0x0,%al
12: 31 db xor %ebx,%ebx
14: cd 80 int $0x80
00000016 <mycall>:
16: e8 e7 ff ff ff call 2 <shellcode>
1b: 6e outsb %ds:(%esi),(%dx)
1c: 69 63 65 20 6a 6f 62 imul $0x626f6a20,0x65(%ebx),%esp
23: 21 .byte 0x21
为什么地址从 0x8048300 变成了 804830a?