|
--- |
|
title: Malicious Email & URL Detector |
|
emoji: 🛡️ |
|
colorFrom: red |
|
colorTo: yellow |
|
sdk: streamlit |
|
sdk_version: 1.43.2 |
|
app_file: app.py |
|
pinned: false |
|
short_description: A web app for detecting malicious emails and URLs |
|
--- |
|
|
|
# Malicious Email & URL Detector |
|
|
|
A lightweight **Streamlit** web application that utilizes a fine-tuned deep learning model to detect malicious content in emails and URLs. The app helps individuals and organizations identify threats such as **phishing** and **malware** before any harm can occur. |
|
|
|
--- |
|
|
|
## Key Features |
|
|
|
- **Real-Time Detection** |
|
Quickly classifies emails or URLs as **malicious** or **benign** using a fine-tuned transformer model. |
|
- **User-Friendly Interface** |
|
Paste the email text or URL, then click a button—no advanced knowledge required. |
|
- **Lightweight & Fast** |
|
Built on Streamlit for a snappy, interactive experience. |
|
|
|
--- |
|
|
|
## How It Works |
|
|
|
1. **Model** |
|
A fine-tuned variant of [distilbert/distilbert-base-uncased](https://huggingface.co/distilbert/distilbert-base-uncased) (or your chosen model) trained on a curated dataset of phishing, malware, and legitimate examples. |
|
2. **Input** |
|
Users provide either an email’s textual content or a single URL. The app normalizes and processes the input. |
|
3. **Inference** |
|
The model returns a **label** (malicious/benign) and a **confidence score**, enabling quick decisions on blocking or flagging potential threats. |
|
|
|
--- |
|
|
|
## Quickstart |
|
|
|
1. **Clone the Repository** |
|
```bash |
|
git clone https://huggingface.co/spaces/your-username/Malicious-URL-Detector |
|
cd Malicious-URL-Detector |
|
|
|
2. **Install Dependencies** |
|
pip install -r requirements.txt |
|
|
|
3. **Run the App** |
|
streamlit run app.py |
|
|
|
4. **Use It** |
|
Paste an email’s content or a URL into the text box. |
|
|
|
Click Analyze to see the classification results. |
|
|
|
5. **Example** |
|
|
|
Input: |
|
|
|
"Hello, your account has been locked. Please verify at http://suspicious-link.com" |
|
|
|
Output: |
|
|
|
Malicious (Confidence: 0.95) |
|
|
|
|
|
## Limitations |
|
Limitations |
|
False Positives/Negatives: No model is perfect. Always combine with other security measures. |
|
|
|
Dataset Bias: Performance depends on how well the training data represents real-world threats. |
|
|
|
Evolving Threats: Regular updates are recommended to keep pace with new phishing or malware tactics. |
|
|
|
## Contact |
|
Author: Eason Liu |