⚠️ Legal Disclaimer
This project is strictly for educational purposes, demonstrating steganography and simulated Command and Control (C2) communication in a controlled local environment.
Unauthorized use is strictly prohibited under Brazilian law, including the Brazilian Civil Rights Framework for the Internet (Law No. 12,965/2014).
The author assumes no liability for any misuse or illegal activity.
- 🎯 Project Objective
- 🧰 Technologies
- 🏗️ Architecture
- ⚙️ Usage Instructions
- 🖧 Simulated C2 Communication
- 🔒 Built-in Safety Measures
⚠️ Limitations- 🤝 Contribution Guidelines
- 📄 License
- 📬 Contact
This project demonstrates two cybersecurity-related technical concepts:
- Steganography using LSB (Least Significant Bit) to hide messages in images.
- Simulated C2 (Command & Control) communication between client and server in a sandboxed environment.
- Language: Python 3.8+
- Libraries:
Pillow
– Image manipulationsocket
– For local TCP communication
- Environment: Designed for local use (
127.0.0.1
) to ensure isolation and safety.
The project adopts a modular architecture, ensuring that each component has a clear and isolated responsibility:
-
🎯 Client Module:
Handles the sending of messages and data to the server, embedding commands or information using steganographic techniques. -
🖥️ Server (C2) Module:
Acts as the Command-and-Control endpoint, receiving, decoding, and processing data sent by clients. -
🗝️ Encoding/Decoding Layer:
Provides the core steganography logic, including the encoding of messages into images/files and their decoding on the server side. -
🛡️ Safety & Logging Layer:
Contains security mechanisms, validation, and logging to ensure the system is safe for educational purposes and prevent misuse.
git clone https://github.com/Vyzer9/C2-Educational-Steganography.git
cd Educational-C2-Steganography
pip install pillow
To encode a message into an image:
python src/stego_c2.py encode input.png "Test message" output.png
To decode a message from an image:
python src/stego_c2.py decode output.png
(Optional) See help:
python src/stego_c2.py --help
python src/stego_c2.py server
python src/stego_c2.py client output.png
⚠️ Important: The client-server communication is restricted to 127.0.0.1:9999 and should never be modified to run over the public internet. This is a local simulation only.
To prevent accidental misuse, the code includes protective logic:
if server_ip != "127.0.0.1":
print("C2 server is restricted to local testing only.")
exit(1)
And a legal and ethical disclaimer inside the source file:
"""
Educational Project - Steganography and C2 Communication
This script is for educational and testing purposes only.
Unauthorized or illegal use of this code is strictly prohibited.
"""
-
📏Message size is limited by the resolution of the input image.
-
🔓No encryption is used; the message can be detected with forensic techniques.
-
🎭The C2 feature is entirely simulated and does not perform real-world operations.
Contributions are welcome, provided they align with the educational goals of the project. To contribute:
-
Fork the repository.
-
Create a branch with your changes.
-
Submit a pull request with a detailed description.
This project is licensed under the MIT License.
-
Contact the author via GitHub
⚠️ Final Notice: This project is intended for controlled, educational use only. Do not use this code in real systems or unauthorized environments. The author condemns any form of misuse or abuse.