Maintaining contact with a socket after an execve call
hi,
i have a project in college [sniped by moderator]. I am currently testing my payload and am having a spot of bother with the execve() call, I want execve to launch a shell, and for this shell to communicate with the existing socket, so that it will execute any client side commands. I have dup2 the socket with the stdin and stdout, but i dont think that this is preserved after execve, i know that execve will inherit any open file descriptors, so there has to be some way of making this work, the question is how! At the moment the shell will esecute one client side command before crapping out, any ideas or suggestions would be most appreciated, i have included my payload source code below, thanks Ray [sniped by moderator] |
the problem was actually with the -c command
when you run /bin/sh -c ls (for example) it doesnt actually open up a shell, Thanks Ray |
//Moderator.note0: if this is part of your homework or an assignment, then please try to complete it yourself.
//Moderator.note1: no posting/asking for any exploit code please. Read the LQ Rules. Thanks for keeping LQ "clean". |
All times are GMT -5. The time now is 06:19 PM. |