Skip to content

Makkkiiii/Coursework1-StegNinja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

27 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฅท StegNinja - Advanced Steganography Toolkit

Typing SVG

Python PyQt5

Security Methods File Support

๐Ÿ“š Overview

Softwarica College of IT and E-Commerce

"Coursework 1"

Programming and Algorithm 2 (Python) - Lecturer: Suman Shrestha

StegNinja - 26th June (3rd Semester)

๐ŸŽฏ What is StegNinja?

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.

StegNinja Demo

โœจ Key Features

๐Ÿ–ผ๏ธ Image Steganography

  • ๐Ÿ”ธ LSB Embedding: Advanced least significant bit manipulation
  • ๐Ÿ”ธ Multi-Format Support: PNG, BMP, TIFF, JPEG
  • ๐Ÿ”ธ Quality Metrics: PSNR, SSIM analysis
  • ๐Ÿ”ธ Capacity Analysis: Real-time payload calculations
  • ๐Ÿ”ธ Before/After Preview: Visual comparison tools

๐Ÿ“ Text Steganography

  • ๐Ÿ”ธ Unicode Method: Invisible zero-width characters
  • ๐Ÿ”ธ Whitespace Method: Trailing space manipulation
  • ๐Ÿ”ธ Multi-Encoding: UTF-8, ASCII support
  • ๐Ÿ”ธ Batch Processing: Handle multiple files
  • ๐Ÿ”ธ Smart Detection: Automatic method detection

๐Ÿ“„ File Steganography

  • ๐Ÿ”ธ PDF Support: Hide data in PDF documents
  • ๐Ÿ”ธ Office Files: DOCX, XLSX, PPTX support
  • ๐Ÿ”ธ ZIP Archives: Embed in compressed files
  • ๐Ÿ”ธ Integrity Checking: File modification detection
  • ๐Ÿ”ธ Metadata Preservation: Maintain file properties

๐Ÿ” Security Features

  • ๐Ÿ”ธ AES-256 Encryption: Military-grade protection
  • ๐Ÿ”ธ PBKDF2 Key Derivation: Secure password hashing
  • ๐Ÿ”ธ Random Salt Generation: Enhanced security
  • ๐Ÿ”ธ Password Protection: Multi-layer security
  • ๐Ÿ”ธ Secure Memory: Protected key storage

๐ŸŽจ Modern GUI Interface

๐ŸŒŸ Professional & Intuitive Design

Design UX
  • ๐ŸŽฏ 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

๐Ÿš€ Quick Start

๐Ÿ“‹ Prerequisites

Python OS RAM

๐Ÿ”ง Installation

# 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

๐ŸŽฎ Quick Demo

# Run interactive demo
python demo.py

# Run test suite
python -m pytest tests/ -v

# Run with GUI
python main.py

๐Ÿ—๏ธ Architecture Overview

๐Ÿฅท 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

๐ŸŽฏ Usage Examples

๐Ÿ–ผ๏ธ 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}")

๐Ÿงช Testing & Quality Assurance

# 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

๐ŸŽฏ Test Coverage

  • โœ… 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

๐Ÿ”ง Advanced Configuration

โš™๏ธ 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

๐Ÿ“Š Performance Metrics

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

๐ŸŒŸ What Makes StegNinja Special?

Precision
Pixel-Perfect
Advanced LSB algorithms with minimal visual distortion
Security
Military-Grade
AES-256 encryption with secure key derivation
Performance
Lightning Fast
Optimized algorithms for maximum speed
Interface
Intuitive Design
Professional GUI with modern aesthetics
Tested
Battle-Tested
Comprehensive test suite with 100% coverage
Documented
Well-Documented
Complete documentation and examples

๐Ÿ” Security & Compliance

Encryption Hash Random

๐Ÿ›ก๏ธ Security Features

  • ๐Ÿ”’ 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

โš–๏ธ Compliance & Ethics

  • ๐ŸŽ“ Educational Purpose: Designed for learning and research
  • ๐Ÿข Professional Use: Suitable for authorized security testing
  • โš ๏ธ Responsible Disclosure: Ethical use guidelines included

โš ๏ธ Important Disclaimer

Educational & Research Purpose Only

StegNinja is designed for educational purposes, authorized security research, and legitimate penetration testing.

๐Ÿ“ธ Screenshots

๐Ÿ–ฅ๏ธ User Interface

StegNinja UI StegNinja UI StegNinja UI

About

Coursework 1 (3rd Semester)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages