StegoAI is a full-stack, production-grade machine learning platform designed to detect hidden (steganographic) data embedded within PDF files.
Unlike traditional security tools, StegoAI performs deep structural and statistical analysis to uncover covert communication channels that remain invisible to standard detection systems.
The platform integrates:
- π§ Machine Learning Engine (XGBoost, LightGBM, RandomForest)
- π FastAPI Backend (real-time inference API)
- π¨ Streamlit Cyber UI (interactive detection dashboard)
Modern cyber threats increasingly use steganography to conceal data inside documents such as PDFs.
This enables attackers to:
- Exfiltrate sensitive information
- Deliver hidden malware payloads
- Maintain covert communication channels
π΄ Traditional security systems fail because they:
- Rely on signature-based detection
- Ignore document structure anomalies
- Cannot detect hidden semantic patterns
StegoAI introduces a forensic AI pipeline that:
-
Extracts multi-dimensional features from PDFs
-
Detects anomalies in:
- Metadata entropy
- Invisible / encoded text
- Structural inconsistencies
- Binary padding patterns
-
Classifies files into:
- β Clean (Safe)
β οΈ Stego (Hidden Data Detected)
-
π§ Ensemble Learning Models
- Random Forest (baseline)
- XGBoost (production model)
- LightGBM (optimized alternative)
-
π Advanced Feature Engineering
- Entropy-based detection
- XREF and object structure analysis
- Hidden text and Unicode anomaly detection
-
π Robust Evaluation Framework
- Cross-validation
- Confusion matrix & ROC analysis
-
π Real-Time API
- Upload PDFs
- Get instant threat classification
-
π¨ Cybersecurity Dashboard (UI)
- Interactive threat visualization
- Risk-level indicators
PDF Input
β
Feature Engineering (Forensic Analysis)
β
ML Model (XGBoost / RF / LGBM)
β
FastAPI Backend
β
Streamlit UI Dashboard
Evaluation performed using Stratified 5-Fold Cross-Validation
| Model | Accuracy | Precision | Recall | F1 Score | CV Mean F1 |
|---|---|---|---|---|---|
| Random Forest | 0.7989 | 0.7995 | 0.7989 | 0.7988 | 0.7963 |
| XGBoost | 0.8061 | 0.8067 | 0.8061 | 0.8060 | 0.8107 |
| LightGBM | 0.8137 | 0.8147 | 0.8137 | 0.8135 | 0.8075 |
π XGBoost selected for deployment due to superior generalization and stability.
git clone https://github.com/amn2905/stegoai.git
cd stegoaipip install -r requirements.txtMODEL_PATH=models/best_model.pkl
PORT=8000
MAX_FILE_SIZE_MB=10https://drive.google.com/file/d/1sLig5TaZXeAZyS_E7N3tpdcOxLiToyCE
models/best_model.pkl
uvicorn api.main:app --reloadstreamlit run ui/app.py- API Docs β http://127.0.0.1:8000/docs
- UI β http://localhost:8501
/upload-pdfβ Upload & analyze PDF/predictβ Feature-based prediction/model-infoβ Model metadata
{
"prediction":"Stego"
"confidence":0.6217
"risk_level":"High"
"decision":"Confident Stego"
"model_used":"XGBoost"
"probabilities":{
"clean":0.3783
"stego":0.6217
}
}StegoAI has strong applicability across multiple high-impact domains:
- Detect hidden malware payloads in documents
- Prevent covert data exfiltration
- Investigate cybercrime evidence
- Identify hidden communication channels
- Scan documents in secure pipelines
- Integrate with SIEM systems
- Detect fraud via hidden document manipulation
- Secure confidential document exchange
- Intelligence analysis
- Covert communication detection
- Scan uploaded files for hidden threats
- π Enables detection of non-obvious cyber threats
- π Provides forensic-level document analysis
- β‘ Supports real-time threat detection pipelines
- π§ Bridges gap between ML and cybersecurity
api/ β Backend API
src/ β ML pipeline
ui/ β Streamlit frontend
models/ β trained models
results/ β evaluation outputs
docs/ β documentation
- Python
- Scikit-learn
- XGBoost / LightGBM
- FastAPI
- Streamlit
- Optuna
StegoAI focuses on behavioral + structural detection, not just signatures, making it resilient against:
- Unknown attack patterns
- Obfuscated payloads
- Adaptive steganography techniques
- Multi-modal steganalysis (image/audio/video)
- Deep learning-based detection
- Real-time streaming analysis
- SIEM integration
For research, funding, or deployment:
All Rights Reserved
StegoAI is not just a modelβit is a cybersecurity-grade intelligent detection system built to uncover hidden threats in modern digital environments.

