This project is a Command & Control (C2) server built with Django. It provides several API endpoints for agent registration, command delivery, result submission, and file upload. The server uses HTTPS for secure communication.

- Agent registration and persistence check
- Command delivery to agents
- Result submission from agents
- File upload support
- Secure HTTPS server
Parameters:
ComputerName(string): Name of the computerFQDNUser(string): FQDN userhash_id(string): Unique agent ID
Response:
{
"status": "true",
"isPersisted": "<true|false>"
}Parameters:
hash_id(string): Unique agent ID
Response:
{
"status": "true"
}Parameters:
hash_id(string): Unique agent ID
Response:
{
"command": "<command string>",
"id": "<command id>"
}Parameters:
hash_id(string): Unique agent IDresult(string): Command result
Response:
{
"status": "result saved"
}Parameters:
- File upload parameters (see implementation)
Response: Standard file upload response
To run the server with HTTPS enabled:
python3 manage.py runserver_plus --cert-file cert.pem --key-file key.pem 0.0.0.0:8000To generate a self-signed certificate and key for development, use the following command:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost"This will create cert.pem and key.pem files in your project directory. Use these files to run the server securely..
Install dependencies with:
pip install -r requirements.txtMIT License