section .data shellcmd db `/bin/sh`,0 argv0 db 'AAAAAAA',0 ; just some garbage we will put the address here argv1 db 'bbbbbbb',0 ; we will put a 0 here section .text global main: extern mysyscall main: mov rdi, shellcmd ; we will need this for the first paramter and to ; manipulate argv[0] mov [argv0], rdi ; put the address of the command in argv[0] mov rdx, 0 ; put a null in argv[1] mark the end of args mov [argv1], rdx mov rdi, shellcmd mov rsi, argv0 mov rdx, 0 mov rax, 59 syscall