This is Command and Control (C2) Framework is designed by Mohamed Masmoudi and Moahemd Malek Gharbi as part of the a summer intership at Pwn&Patch to facilitate red team operations.
The framework includes:
- CLI: Command-line interface for interacting with the implant.
- C2 Server: The server-side component that controls and communicates with the implant.
- Implant: A malware that runs on the target machine. (windows/linux)
- Secure communication between implant and C2 server.
- Easy-to-use CLI for managing implants.
- Real-time data collection and command execution.
- modulare implemantion that makes it easy to add more featres.
- Prerequisites
- Go (for implant development)
- Docker (for C2 server)
- Python (for C2 server)
- Clone the Repository
git clone https://github.com/enigma522/C2-framework
cd c2-framework
- Setting Up the Implant
To set up the implant, you need to use the create_implant.py script. Follow these steps:
- Ensure you have Python installed on your machine.
- Change the working directory to the c2-framework directory.
- Run the create_implant.py script with the required parameters: implant_name, ip-C2, and secret.
python create_implant.py <implant_name> <ip-C2> <secret>
implant_name
: The desired name for your implant binary.ip-C2
: The IP address of your C2 server. (You can use an Azure VM for this.)secret
: The secret key that allows the implant to communicate with the C2 server. This key should be set in the .env file of the C2 server.
- Setting Up the C2 Server:
- Ensure Docker is installed on your machine.
- Update the .env file with the necessary environment variables,
- including the secret key for the implant communication.
Run the Docker Compose to start the C2 server:
docker-compose up -d
- This will build and start the C2 server as a Docker container in detached mode.
-
Running the CLI
Navigate to the cli directory:
cd cli
- Use the CLI to interact with the C2 server and manage implants:
python cli.py -h
- The CLI provides various commands to manage implants, execute commands on target machines, and collect data in real-time.
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Moahemd Masmoudi ~ enigma - mohamedmasmoudi745@gmail.com
Mohamed Malek Gharbi ~ Trez13 - melek.gharbi1@gmail.com