format ELF64
public _start
section '.data' writable
command db "/usr/bin/nc", 0x0
argument1 db "-l", 0x0
argument2 db "127.0.0.1", 0x0
argument3 db "12345", 0x0
last_arg dq 0x0
argv dq command, argument1, argument2, argument3, 0x0
section '.text' executable
_start:
mov rax, 11
mov rbx, command
mov rcx, argv
mov rdx, 0
int 0x80
This is my simple assembler program, that should just use exec to load memory-image of nc, but something goes wrong
execve("/usr/bin/nc", ["/usr/bin/nc"], NULL)
This is output from strace. It just pass only name of program and forgot about other args. How i should fix my program?