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.




