Login Register






Tutorial Source Code Tutorial - Simple Reverse Shell in C filter_list
Author
Message
RE: Source Code Tutorial - Simple Reverse Shell in C #6
(10-10-2015, 04:05 AM)m0dem Wrote: I want to take note of two issues:
  1. errors are not sent over the connection
  2. you can't change your directory
My solutions are:
  1. append `2>&1` to the end of the command
  2. prepend a command to change the directory for the second command
For example, if the user previously changed the directory to `mydir` and the current command was something like `mkdir test`, then the command executed would be:
Code:
cd mydir & mkdir test 2>&1
explanation: `2>&1` should pass the stderr output into stdout

I will try to implement my solutions soon.

2. Is a really hacky fix, you should properly allocate the file descriptors, unsure if it works the same way as it does on *nix but if so piping stderr to stdout just out of practice is in my oppinion a bad idea.
i dont know anything

Reply





Messages In This Thread
RE: Source Code Tutorial - Simple Reverse Shell in C - by Penis - 10-10-2015, 10:49 PM