Files
kmanc-remote_code_oxidation/tcp_reverse_shell
kmanc a4a8ab7e0b Versioning (#9)
* minimum supported rust version to 1.58 for format strings

* minimum windows version via cargo-minimal-versions

* git.....

* does this fix?

* updating rust worked. now update cargo to ensure no breaking changes to dependencies

* and update lock too
2022-01-15 15:29:37 -08:00
..
2021-12-27 12:37:24 -08:00
2022-01-15 15:29:37 -08:00
2021-12-29 01:33:55 -08:00

RCO: TCP Reverse Shell

What it is

RCO's TCP reverse shell is a no-frills reverse shell. This means it allows you to run Terminal (Unix) or Command Prompt (Windows) commands on the victim machine from the attacking machine. Getting a remote shell on a victim machine usually allows much more control over the victim than other attacks.

How it works

Both RCO's Unix and Windows TCP reverse shells work by establishing a TCP session from the victim machine to the attacking machine. Then a Terminal (Unix) or Command Prompt (Windows) process is spun up with its standard input, standard output, and standard error all assigned to the TCP session. This means that input commands and output results are read from and written to (respectively) a TCP stream.

Using it

  1. Start a listener on the attacking machine

    nc -nlvp 4444
    
  2. Open the config file and change the IP address and port to match your attacking machine and listener, respectively

  3. Compile the executable

    For Unix targets

    cargo build -p tcp_reverse_shell --release
    

    For Windows targets

    cargo build --target x86_64-pc-windows-gnu -p tcp_reverse_shell --release
    
  4. Execute the payload on the victim machine

  5. Return to the listener and enter desired commands for the victim machine to run