Author Topic: executing code/commands Pstreams vs popen() vs fork/exec  (Read 1303 times)

0 Members and 1 Guest are viewing this topic.

Offline hppd

  • Knight
  • **
  • Posts: 163
  • Cookies: 7
    • View Profile
executing code/commands Pstreams vs popen() vs fork/exec
« on: December 15, 2014, 01:09:59 am »
I stumbled on pstreams http://sourceforge.net/projects/pstreams/?source=typ_redirect is there any benefit or is it overkill. Can I still use popen() for executing shell commands or should I switch to something newer like the pstreams. Or maybe first fork a child process and then exec() a command.

Also I managed to get a .exe file in RAM but how do I get the EIP to execute that code? DO I need any ASM or can I just use CreateProcess() and start it with ThreadSuspended then write my memory chunk in the child process? This seems like a recipe for disaster.

Anyway I'm talking gibberish again, if you have some more info on any of these plz share

Offline 0xDADA11c7

  • NULL
  • Posts: 4
  • Cookies: 4
    • View Profile
Re: executing code/commands Pstreams vs popen() vs fork/exec
« Reply #1 on: December 15, 2014, 01:44:10 pm »
I think you need netcat or its source code.