小编Bri*_*ian的帖子

为什么我的数据部分在编译后的二进制文件中出现两次?Ubuntu、x86、nasm、gdb、reaelf

回答了之前的相关问题。谢谢!然而,这给我带来了一个新问题。为什么 nasm 将数据字节放在两个不同的内存位置?我在下面包含了程序信息和其他数据转储。

---------- code snippet compiled with nasm, ld -----------------
section .text
...
zero: jmp short two
one:  pop ebx
      xor eax, eax
      mov [ebx+12], eax
      mov [ebx+8], ebx
      mov [ebx+7], al
      lea ecx, [ebx+8]
      lea edx, [ebx+12]
      mov al, 11
      int 0x80
two:  call one
section .data align=1
msg:   db '/bin/sh0argvenvp' 

-------- readelf output to show load locations --------
readelf -Wl myshdb

Elf file type is EXEC (Executable file)
Entry point 0x8048080
There are 2 program …
Run Code Online (Sandbox Code Playgroud)

x86 assembly gdb nasm shellcode

4
推荐指数
1
解决办法
113
查看次数

标签 统计

assembly ×1

gdb ×1

nasm ×1

shellcode ×1

x86 ×1