Skip to content
This repository was archived by the owner on Sep 27, 2025. It is now read-only.

Legendary4226/command-and-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command & Control

No dependencies required ! So no VENV nor pip install needed.

OpenSSL

Run these commands to generate the SSL certificate*. From a GitBash terminal on Windows or any terminal on Linux.

cd .ssh

openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 365 -out rootCA.pem

There already is a key for testing purposes in the .ssh folder

Start server and workers

Server

python3 server.py

The server listen to the port 55612.

Server commands :

r

: To print a "recap" of all registered workers

    Recap command

cmd <worker uuid> <command to run> <*additionnal args>

: Add a command to the queue for a worker. Run cmd alone to get an additionnal help.

: Exemple: cmd d973c272-97d5-48c3-b737-601b4b65bace ping google.com

    CMD command

queue

: To print a "recap" of all workers having queued commands.

    Queue command

exit

: Smoothly stop the thread before closing the socket.

: Also persist the workers data into a JSON file that will be automatically reloaded at the next start.

    Exit command

Worker

python3 worker.py
  <server ip = "localhost">
  <server port = 55612> 
  <worker identifier = a random UUID V4>
# All arguments are optionnal with their default value

Diagram representing communications Server <-> Worker

Server - Worker communications

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages