运行已编译的asm文件后出现分段错误

时间:2016-02-21 19:46:23

标签: assembly x86 shellcode

segment .text
    global _start

_start:
    jmp call_shellcode

shellcode:

    pop rbx
    xor rax, rax

    mov [rbx+7], al
    mov [rbx+8], rbx
    mov [rbx+16], rax

    mov al, 59
    lea rdi, [rbx+7]
    lea rsi, [rbx+8]
    lea rdx, [rbx+16]

    syscall
call_shellcode:
    call shellcode
    shellpath db "/bin/sh0aaaaaaaabbbbbbbb"

我试图运行从这个asm文件编译的程序。我检查了每一步都认为没有错,但我仍然有分段错误。任何人都可以帮我吗?

0 个答案:

没有答案