SmartShield is an advanced malware detection and secure image-sharing system that leverages machine learning, steganography, browser-based security protocols, and TypeScript. It detects image-based malware and ensures that sensitive image files can only be accessed by the intended recipient or device.
- Detects malware hidden in image files using an ensemble ML model.
- Uses ResNet50 for feature extraction and SVM, Random Forest, and Logistic Regression for classification.
- Integrated into a browser extension for real-time malware scanning.
- Steganographically embeds user/device metadata in images.
- Ensures only authorized users/devices can decode or access the image.
- Unauthorized access results in image corruption or destruction.
- “Check Image” button for analyzing images before download.
- Option to manually upload and check images for malware threats.
- HTML, CSS, JavaScript, TypeScript
- React (for extension UI)
- Tailwind CSS (for styling)
- Flask (Python)
- SQLAlchemy + SQLite
- Steganography libraries (
cv2
,Pillow
)
- ResNet50 – Used as a feature extractor for malware images.
- Ensemble Classifier – Combination of:
- Support Vector Machine (SVM)
- Random Forest
- Logistic Regression
- VotingClassifier – Implements soft voting for better accuracy.
- Malimg Dataset – Dataset of malware images used for training and evaluation.
- Joblib – Used for saving and loading the trained model (
svm_model.pkl
).
Layer | Tech Used |
---|---|
Frontend | React.js, Tailwind CSS |
Backend | Flask (Python) |
Steganography | Stegano (Python) |
Database | MongoDB |
Auth | Email/Password Login |
- 🖼️ User uploads an image
- 🔍 Image is analyzed using ResNet + ML ensemble
- ✅ Safe images are either:
- Downloaded normally, or
- Embedded with user/device metadata
- 🔓 Only the intended user/device can view or decode the image
- 🚫 Unauthorized attempts lead to image corruption or destruction
- ResNet50 pre-trained model is used for feature extraction.
- Extracted features are passed to a soft voting ensemble model:
- SVM (linear kernel)
- Random Forest (n=100)
- Logistic Regression
- Predicts one of the 25 malware classes from Malimg dataset.
- If confidence < threshold (e.g., 60%), returns "No Malware".
-
Device-Level Locking
Bind image access to device fingerprints or MAC addresses. Ensures only specific machines can decode or view sensitive files. -
Time-Based Access Control
Auto-expire access after a set time window (e.g., 24 hours after download link is generated). -
IP Whitelisting
Restrict file access to predefined IP ranges (great for enterprise/internal networks). -
Cryptographic Enhancement
Integrate AES encryption in addition to steganography for dual-layer security. -
Blockchain Audit Trails
Maintain tamper-proof logs of image modifications, access attempts, and transmission. -
Watermarking + Steganography
Combine visible and invisible markings to prevent both unauthorized use and tampering.
We plan to integrate an LLM-powered chatbot into the platform to assist with:
-
User Queries
- "Why was my file blocked?"
- "How can I securely send this image?"
-
Forensic & Security Insights
- "This image was modified twice and attempted to be accessed by an unauthorized system."
- "Tampering suspected. Recommend isolating source device."
-
Dynamic Policy Generation
- “For healthcare images, only allow access from these 3 IPs and auto-delete after 24 hours.”
-
Security Recommendations
- Based on image metadata and usage patterns, recommend firewall rules or access restrictions.
✅ Perfect for enterprise clients, security analysts, and forensics teams looking to enforce adaptive policies.
smartshield/ │ ├── backend/ │ ├── app.py │ ├── model/ │ │ └── ensemble_model.pkl │ └── utils/ │ └── steganography.py │ ├── frontend/ │ ├── index.html │ └── extension/ │ ├── manifest.json │ ├── popup.tsx │ ├── background.ts │ ├── utils/ │ │ └── imageUtils.ts │ └── style.css │ └── README.md
git clone https://github.com/yourusername/smartshield.git
cd smartshield/backend
pip install -r requirements.txt
python app.py