x86 shellcode中的错误
Mistake in x86 shellcode
我想编写应该运行以下c函数的汇编代码:
execv("/bin/sh", ["/bin/sh", 0])
因此我写了下面的汇编代码:
start:
call main
db '/bin/sh',7
main:
xor edx, edx
mov eax, 11
pop ebx
push edx
push ebx
mov ecx, esp
int 0x80
但不知何故这根本不起作用..它到底有什么问题?我想我搞砸了数组的零字节,但也不确定。
将带有字符串的行更改为:
db '/bin/sh', 0
我想编写应该运行以下c函数的汇编代码:
execv("/bin/sh", ["/bin/sh", 0])
因此我写了下面的汇编代码:
start:
call main
db '/bin/sh',7
main:
xor edx, edx
mov eax, 11
pop ebx
push edx
push ebx
mov ecx, esp
int 0x80
但不知何故这根本不起作用..它到底有什么问题?我想我搞砸了数组的零字节,但也不确定。
将带有字符串的行更改为:
db '/bin/sh', 0