sys_execve(X86_64)をトリガーしようとしています。nasm assembly sys_execve/bin/sh
section .data
file db "/bin/sh",0
section .text
global _start
_start:
mov rax, 59
mov rdi, file
lea rsi, [file]
mov rdx, 0
syscall
それは、セグメンテーションフォールト私が間違っているのは何
を与えますか?
私もCソースでそれを入れてみました:
int main(void)
{
char shellcode[] =
"\xb8\x3b\x00\x00\x00"
"\x48\xbf\xd0\x00\x60\x00\x00"
"\x00\x00\x00"
"\x48\x8d\x34\x25\xd0\x00\x60"
"\x00"
"\xba\x00\x00\x00\x00"
"\x0f\x05";
(*(void (*)()) shellcode)();
return 0;
}
また、これは私のセグメンテーションフォールトを与える...
'LEAのRSI、[ファイル]が'間違っています。 – Jester
さらにいくつかのタグをスパムするのはどうですか? – Olaf
@ Jester:私はexecveが文字列のポインタを2番目のパラメータとして必要と思ったのですか? – int80