Softwarica College of IT and E-Commerce
"Coursework 1"
Programming and Algorithm 2 (Python) - Lecturer: Suman Shrestha
StegNinja - 26th June (3rd Semester)
StegNinja is a cutting-edge steganography toolkit designed for security researchers, red team operators, and cybersecurity professionals. It provides advanced data hiding capabilities across multiple media types with encryption.
|
|
|
|
- 🎯 Responsive Design: Adaptive layouts for all screen sizes
- ⚡ Background Processing: Non-blocking operations with progress tracking
- 🔄 Real-time Updates: Live previews and instant feedback
- 🛡️ Error Handling: Comprehensive validation and user guidance
- 🎨 Professional Styling: Modern Qt-based interface
# 1️⃣ Clone the repository
git clone https://github.com/Makkkiiii/Coursework1-StegNinja.git
cd StegNinja
# 2️⃣ Install dependencies
pip install -r requirements.txt
# 3️⃣ Run the application
python main.py# Run interactive demo
python demo.py
# Run test suite
python -m pytest tests/ -v
# Run with GUI
python main.py🥷 StegNinja/
├── 🚀 main.py # Application entry point
├── 📦 requirements.txt # Dependencies
├── 📚 README.md # This documentation
├── 🎯 demo.py # Interactive demonstrations
├── 📁 src/
│ ├── 🧠 core/ # Core steganography engines
│ │ ├── 🖼️ image_stego.py # Image processing engine
│ │ ├── 📝 text_stego.py # Text manipulation engine
│ │ └── 📄 file_stego.py # File embedding engine
│ ├── 🎨 gui/ # User interface components
│ │ └── 🖥️ app.py # Main application window
│ └── 🔧 utils/ # Utility modules
│ └── 🔐 crypto.py # Cryptographic operations
├── 🧪 tests/ # Comprehensive test suite
│ ├── 🔍 test_basic.py # Basic functionality tests
│ └── ⚙️ test_functionality.py # Advanced feature tests
└── 📁 Test Files/ # Sample files for testing
🖼️ Image Steganography Example
from src.core.image_stego import ImageSteganography
# Initialize steganography engine
stego = ImageSteganography()
# Hide message in image
success = stego.embed(
cover_path="cover.png",
message="Secret message",
output_path="stego.png",
password="mypassword"
)
# Extract hidden message
message = stego.extract_text("stego.png", password="mypassword")
print(f"Hidden message: {message}")📝 Text Steganography Example
from src.core.text_stego import TextSteganography
# Initialize text steganography
stego = TextSteganography()
# Hide message using Unicode method
stego_text = stego.embed_unicode(
cover_text="Normal looking text",
secret_message="Hidden data",
password="secret123"
)
# Extract hidden message
hidden = stego.extract_unicode(stego_text, password="secret123")
print(f"Extracted: {hidden}")📄 File Steganography Example
from src.core.file_stego import FileSteganography
# Initialize file steganography
stego = FileSteganography()
# Hide data in PDF
success = stego.embed(
cover_path="document.pdf",
payload="Confidential data",
output_path="stego_doc.pdf",
password="topsecret"
)
# Extract hidden data
data = stego.extract_text("stego_doc.pdf", password="topsecret")
print(f"Hidden data: {data}")# Run all tests
python -m pytest tests/ -v
# Run specific test categories
python tests/test_basic.py # Basic functionality
python tests/test_functionality.py # Advanced features
# Run with coverage
python -m pytest tests/ --cov=src --cov-report=html- ✅ Image Steganography: LSB embedding, extraction, encryption
- ✅ Text Steganography: Unicode, whitespace methods
- ✅ File Steganography: PDF, Office files, integrity checks
- ✅ Cryptography: AES encryption, key derivation
- ✅ GUI Components: All interface elements
- ✅ Error Handling: Edge cases and validation
⚙️ Performance Tuning
# Optimize for large files
stego.set_chunk_size(8192) # Increase chunk size
stego.enable_multithreading(True) # Enable parallel processing
stego.set_compression_level(9) # Maximum compression🛡️ Security Hardening
# Enhanced security settings
crypto.set_key_iterations(100000) # Increase PBKDF2 iterations
crypto.enable_secure_memory(True) # Secure key storage
crypto.set_encryption_mode('AES-256-GCM') # Authenticated encryption| Operation | File Size | Processing Time | Memory Usage |
|---|---|---|---|
| Image Embed | 1MB PNG | ~0.5s | ~15MB |
| Text Embed | 10KB TXT | ~0.1s | ~5MB |
| File Embed | 5MB PDF | ~2.0s | ~25MB |
| Encryption | Any Size | +10% overhead | +5MB |
- 🔒 AES-256 Encryption: Industry-standard encryption
- 🔑 PBKDF2 Key Derivation: Secure password-based keys
- 🎲 Cryptographic Random: Secure randomness for salts
- 🧹 Secure Memory: Protected key storage and cleanup
- 🔍 Integrity Verification: File modification detection
- 🎓 Educational Purpose: Designed for learning and research
- 🏢 Professional Use: Suitable for authorized security testing
⚠️ Responsible Disclosure: Ethical use guidelines included
Educational & Research Purpose Only
StegNinja is designed for educational purposes, authorized security research, and legitimate penetration testing.




