You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*"The worst Rust programmer you have ever seen"* - my mom
2
9
3
10
*"But at least it works"* - still my mom, but not about me
4
11
5
-
#RS-Shell
12
+
## Description
6
13
7
-
RS-Shell is a TLS over TCP reverse shell developped in Rust with client and server embedded in the same binary. This project has been mainly started to learn Rust with a tool that could help me in my work, and the code quality could be greatly improved.
14
+
RS-Shell is a TLS over TCP reverse shell developped in Rust with client and server embedded in the same binary. This project has been mainly started to learn Rust with a tool that could help me in my work, and the code quality could be greatly improved. This project is like my Rust sandbox where I can test new things.
8
15
9
16
Client and server are both cross-platform and work on Windows and Linux systems.
10
17
@@ -20,13 +27,15 @@ For the moment, the following features are present:
20
27
21
28
* Semi-interactive reverse shell via TLS over TCP
22
29
* File upload and download between server and client
23
-
* Start a PowerShell interactive session with the ability to patch the AMSI in memory
30
+
* Start a PowerShell interactive session with the ability to patch the AMSI in memory with or without indirect syscalls
24
31
* Loading features :
25
-
* Load and execute a PE in the client memory
26
-
* Load and execute a PE in a remote process memory
27
-
* Load and execute a shellcode in a remote process memory
32
+
* Load and execute a PE in the client memory, **with or without indirect syscalls**
33
+
* Load and execute a PE in a remote process memory, **with or without indirect syscalls**
34
+
* Load and execute a shellcode in a remote process memory, **with or without indirect syscalls**
28
35
* Autopwn the client machine and elevate the privileges to SYSTEM or root by exploiting a 0day in `tcpdump`
29
36
37
+
To perform the indirect syscalls, I use the incredible [rust-mordor-rs](https://github.com/gmh5225/rust-mordor-rs) project initiate by [memN0ps](https://twitter.com/memN0ps). However, I use the version from my repository, which just patches little errors I have found regarding libraries versions and crate imports.
38
+
30
39
## How to
31
40
32
41
### Setup
@@ -85,21 +94,29 @@ Then, on the target machine launch the client to connect back to your server wit
85
94
[+] Custom integrated commands :
86
95
87
96
[+] Loading commands
88
-
> load C:\path\to\PE_to_load
89
-
load a PE file in the client process memory and executes it. This could kill the reverse shell !
@@ -115,7 +132,9 @@ The `load` commands permit to load and execute directly in memory:
115
132
116
133
For example : `> load -h C:\Windows\System32\calc.exe C:\Windows\System32\cmd.exe`. This will start a `cmd.exe` process with hollowing, load a `calc.exe` image in the process memory, and then resume the thread to execute the calc.
117
134
118
-
`powpow` starts an interactive PowerShell session with a PowerShell process where the AMSI `ScanBuffer` function has been patched in memory. This feature is not particularly opsec.
135
+
On the other hand, the `syscalls` commands permit the same things, but everything is performed with indirect syscalls.
136
+
137
+
`powpow` starts an interactive PowerShell session with a PowerShell process where the AMSI `ScanBuffer` function has been patched in memory. This feature is not particularly opsec. The patching operation can be performed with or without indirect syscalls.
119
138
120
139
`download` permits to download a file from the client to the machine where the listener is running. For example `download C:\Users\Administrator\Desktop\creds.txt ./creds.txt`.
121
140
@@ -125,16 +144,23 @@ For example : `> load -h C:\Windows\System32\calc.exe C:\Windows\System32\cmd.ex
125
144
126
145
## Todo
127
146
128
-
-[] Move all the Win32API related commands to the NTAPI with indirect syscalls
147
+
-[x] Move all the Win32API related commands to the NTAPI with indirect syscalls
129
148
-[ ] Implement other injection techniques
130
149
-[ ] Implement a port forwarding solution
131
150
-[ ] Find a way to create a fully proxy aware client
132
151
-[ ] Implement a reverse socks proxy feature
133
152
153
+
## Disclaimers
154
+
155
+
This is an obvious disclaimer because I don't want to be held responsible if someone uses this tool against anyone who hasn't asked for anything.
156
+
157
+
Usage of anything presented in this repo to attack targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program. Only use for educational purposes.
158
+
134
159
## Acknowledgements
135
160
136
161
*[OffensiveRust](https://github.com/winsecurity/Offensive-Rust) by [winsecurity](https://github.com/winsecurity). This project would never have existed without him. Many of functions, structures, and tricks present in `rs-shell` come from this project
137
162
*[OffensiveRust](https://github.com/trickster0/OffensiveRust) by [trickster0](https://github.com/trickster0)
138
163
* Multiple projects by [memN0ps](https://github.com/memN0ps)
139
164
*[RustPacker](https://github.com/Nariod/RustPacker) by [Nariod](https://github.com/Nariod)
140
165
* Nik Brendler's blog posts about pipe communication between process in Rust. [Part 1](https://www.nikbrendler.com/rust-process-communication/) and [Part 2](https://www.nikbrendler.com/rust-process-communication-part-2/)
166
+
*[rust-mordor-rs](https://github.com/gmh5225/rust-mordor-rs) by [memN0ps](https://twitter.com/memN0ps), an incredible library for indirect syscalls in Rust
0 commit comments