mirror of
https://github.com/kmanc/remote_code_oxidation
synced 2026-06-08 15:21:46 +00:00
Documentation (#22)
* Update README.md * Update README.md * Update README.md * badges to sub-readmes * main readme polishing * formatting * feasts feedback incorporated
This commit is contained in:
+14
-22
@@ -1,29 +1,22 @@
|
||||
# RCO: TCP Reverse Shell
|
||||
|
||||
## What it is
|
||||
[](https://github.com/kmanc/remote_code_oxidation/tree/master/tcp_reverse_shell)
|
||||
|
||||
Linux target | Windows target
|
||||
:-------------------------:|:-------------------------:
|
||||
 | 
|
||||
|
||||
RCO's TCP reverse shell is a no-frills [reverse shell](https://www.hackingtutorials.org/networking/hacking-netcat-part-2-bind-reverse-shells/). This means it allows you to run Terminal (Linux)
|
||||
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 Linux and Windows TCP reverse shells work by establishing a [TCP session](https://www.scottklement.com/rpg/socktut/overview.html) from the victim machine
|
||||
to the attacking machine. Then a Terminal (Linux) or Command Prompt (Windows) process is spun up with its [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)),
|
||||
[standard output](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)), and [standard error](https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)) all assigned to the TCP session. This means that
|
||||
input commands and output results are read from and written to (respectively) a TCP stream.
|
||||
The reverse shells for both Linux and Windows work by establishing a [Transmission Control Protocol (TCP) session](https://www.scottklement.com/rpg/socktut/overview.html) from the victim machine to the attacking machine. Then a Terminal (Linux) or Command Prompt (Windows) process then starts with its [standard input](https://en.wikipedia.org/wiki/Standard_streams#Standard_input_(stdin)), [standard output](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)), and [standard error](https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)) all assigned to the TCP session. This means that input commands and output results are read from and written to (respectively) the TCP stream.
|
||||
|
||||
|
||||
## Using it
|
||||
|
||||
1. Start a listener on the attacking machine
|
||||
```commandline
|
||||
nc -nlvp 4444
|
||||
```
|
||||
|
||||
2. Open [the config file](https://github.com/kmanc/remote_code_oxidation/blob/master/rco_config/src/lib.rs)
|
||||
and change the IP address and port to match your attacking machine and listener, respectively
|
||||
|
||||
3. Compile the executable
|
||||
1. [Not shown in GIF] Open [the config file](https://github.com/kmanc/remote_code_oxidation/blob/master/rco_config/src/lib.rs)
|
||||
and change the IP address and port to match the IP address of your attacking machine and the port you will use for a listener respectively
|
||||
2. [Not shown in GIF] Compile the executable
|
||||
|
||||
#### For Linux targets
|
||||
```commandline
|
||||
@@ -34,14 +27,13 @@ and change the IP address and port to match your attacking machine and listener,
|
||||
```commandline
|
||||
cargo build --target x86_64-pc-windows-gnu -p tcp_reverse_shell --release
|
||||
```
|
||||
|
||||
3. Start a netcat listener on the attacking machine on the same port you configured in step 1
|
||||
```commandline
|
||||
nc -nlvp 4444
|
||||
```
|
||||
4. Execute the payload on the victim machine
|
||||
|
||||
5. Return to the listener and enter desired commands for the victim machine to run
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Detection rates
|
||||
|
||||
|
||||
Reference in New Issue
Block a user