mirror of
https://github.com/kmanc/remote_code_oxidation
synced 2026-06-08 15:21:46 +00:00
Documentation (#7)
* updated tcp rev shell documentation * missed a line * missed another line * updating documentation for process migration
This commit is contained in:
@@ -1,13 +1,35 @@
|
||||
# RCO: Process Migration
|
||||
|
||||
Open [the config file](https://github.com/kmanc/remote_code_oxidation/blob/master/process_migration/src/config.rs) and change the shellcode to your desired payload before compiling
|
||||
## What it is
|
||||
|
||||
#### Build for Unix target
|
||||
```commandline
|
||||
cargo build -p process_migration --release
|
||||
```
|
||||
RCO's process migration is a technique used to hide malicious code running on a victim machine. It has the added benefit
|
||||
of making it less likely the the malicious code is accidentally closed by a user on a victim machine by moving the payload
|
||||
to a process that is unlikely to be terminated.
|
||||
|
||||
#### Build for Windows target
|
||||
```commandline
|
||||
cargo build --target x86_64-pc-windows-gnu -p process_migration --release
|
||||
```
|
||||
## How it works
|
||||
|
||||
RCO's Windows process migration works by obtaining a handle to the target process and writing the shellcode to it. Then it
|
||||
spawns a remote thread within the process whose starting point is the newly written shellcode. At the time of this writing,
|
||||
RCO's Unix process migration is not yet written.
|
||||
|
||||
## Using it
|
||||
|
||||
1. Generate shellcode for the desired end result (for example, use [msfvenom](http://127.0.0.1) to generate a reverse TCP
|
||||
shell shellcode for the target operating system)
|
||||
|
||||
2. Open [the config file](https://github.com/kmanc/remote_code_oxidation/blob/master/process_migration/src/config.rs)
|
||||
and change the shellcode to the shellcode generated in step 1
|
||||
|
||||
3. Compile the executable
|
||||
|
||||
#### Build for Unix target
|
||||
```commandline
|
||||
cargo build -p process_migration --release
|
||||
```
|
||||
|
||||
#### Build for Windows target
|
||||
```commandline
|
||||
cargo build --target x86_64-pc-windows-gnu -p process_migration --release
|
||||
```
|
||||
|
||||
4. Execute the payload on the victim machine
|
||||
|
||||
@@ -1,13 +1,40 @@
|
||||
# RCO: TCP Reverse Shell
|
||||
|
||||
Open [the config file](https://github.com/kmanc/remote_code_oxidation/blob/master/tcp_reverse_shell/src/config.rs) and change the IP address and port to match your listener before compiling
|
||||
## What it is
|
||||
|
||||
#### Build for Unix target
|
||||
```commandline
|
||||
cargo build -p tcp_reverse_shell --release
|
||||
```
|
||||
RCO's TCP reverse shell is a no-frills [reverse shell](http://127.0.0.1). 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.
|
||||
|
||||
#### Build for Windows target
|
||||
```commandline
|
||||
cargo build --target x86_64-pc-windows-gnu -p tcp_reverse_shell --release
|
||||
```
|
||||
## How it works
|
||||
|
||||
Both RCO's Unix and Windows TCP reverse shells work by establishing a [TCP session](http://127.0.0.1) from the victim machine
|
||||
to the attacking machine. Then a Terminal (Unix) or Command Prompt (Windows) process is spun up with its [standard input](http://127.0.0.1),
|
||||
[standard output](http://127.0.0.1), and [standard error](http://127.0.0.1) 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
|
||||
```commandline
|
||||
nc -nlvp 4444
|
||||
```
|
||||
|
||||
2. Open [the config file](https://github.com/kmanc/remote_code_oxidation/blob/master/tcp_reverse_shell/src/config.rs)
|
||||
and change the IP address and port to match your attacking machine and listener, respectively
|
||||
|
||||
3. Compile the executable
|
||||
|
||||
#### For Unix targets
|
||||
```commandline
|
||||
cargo build -p tcp_reverse_shell --release
|
||||
```
|
||||
|
||||
#### For Windows targets
|
||||
```commandline
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user