A Python-based heuristic tool for detecting potential steganography in images (PNG / JPEG).
This project requires:
Python 3.9 or newer
(Recommended: Python 3.9 -- 3.13)
Python 3.14+ may work but is very recent and some third-party libraries may take time to fully support it.
Windows:
py --versionor
python --versionLinux / macOS:
python3 --versiongit clone https://github.com/zer0trace1/KANTEI.git
cd KANTEIpy -m venv [name]
.\[name]\Scripts\activatepython3 -m venv [name]
source [name]/bin/activatepip install -r requirements.txtIf you do not have requirements.txt, install manually:
pip install pillow numpy matplotlibOptional (for future ML module):
pip install scikit-learn pandasDepending on your OS and Python installation:
py stego-scanner.py image.png --plotor
python stego-scanner.py image.png --plotpython3 stego-scanner.py image.png --plotIf multiple Python versions are installed, you can specify one explicitly:
py -3.12 stego-scanner.py image.pngpython stego-scanner.py image.png --plot --report report.json| Option | Description |
|---|---|
--visualize |
Generates bitplane images (PNG/BMP) |
--plot |
Generates metric graph (*_metrics.png) |
--report file.json |
Saves full report as JSON |
--csv metrics.csv |
Appends metrics to a cumulative CSV |
python inject_lsb.pyBy default, it generates:
img1_infected_30.pngimg1_infected_100.png
*_metrics.png→ Metric visualization graph*_ELA.png→ JPEG ELA image*_bit0.png ... *_bit7.png→ Bitplanesmetrics.csv→ Accumulated dataset of runsreport.json→ Full analysis report
The system combines classical steganalysis techniques:
- LSB Chi-Square (statistical deviation detection)
- Simplified RS Analysis
- ELA (JPEG recompression difference)
- Structural file analysis (trailing data detection)
The tool produces a heuristic score (0--1) and a verdict:
LOWMEDIUMSUSPICIOUS
- Heuristic-based detection (not mathematically definitive).
- Does not automatically extract hidden payloads.
- Advanced DCT-based detection not yet implemented.
- 🤖 Machine Learning classifier based on extracted features
- 📊 Large-scale dataset evaluation
- 🧠 Full RS and SPA implementation
- 🔍 Advanced DCT-based JPEG analysis
- 📦 Packaging as an installable CLI tool
This project is intended for educational and cybersecurity research
purposes only.
Do not use it for illegal activities.