A privacy-focused phishing email detection tool that runs locally on your machine using Ollama and AI. Analyze suspicious emails without sending your data to external servers.
- Privacy First: All analysis happens on your machine - no data sent to external servers
- AI-Powered: Uses local LLM via Ollama for intelligent phishing detection
- Simple Interface: Clean, responsive web interface built with Streamlit
- Multiple Input Methods: Paste email content or upload the .eml file
- Risk Scoring: 1-10 risk scale with clear Low/Medium/High levels and detailed red flag explanations
Before installing Phish-Net, ensure you have:
-
Clone the repository
git clone https://github.com/capyBearista/phish-net.git cd phish-net -
Set up Python environment
# Linux/Mac python3 -m venv .venv source .venv/bin/activate # Windows (Command Prompt) python -m venv .venv .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up Ollama model
# Install and start Ollama ollama pull phi4-mini-reasoning # Alternative models: phi4-mini, llama3.1, mistral, codellama
# Use the provided batch script (requires virtual environment setup first)
run.bat# Use the provided shell script
chmod +x run.sh
./run.sh-
Ensure Ollama is running
# In a separate terminal ollama serve -
Launch Phish-Net
# From the project directory streamlit run src/app.py -
Open your browser to
http://localhost:8501
- Copy the full source of a suspicious email (including headers)
- Paste into the text area
- Click "Analyze Email"
- Click "Upload .eml file"
- Select your email file
- Click "Analyze Email"
- Risk Score: 1-10 scale (1=Safe, 10=Very Dangerous)
- Risk Level: Color-coded assessment (Green/Yellow/Red)
- Red Flags: Specific phishing indicators found
- Confidence: AI model's confidence in the assessment
Configure in the sidebar:
- Server URL: Default
http://localhost:11434 - Model: Choose from available models
- Timeout: Adjust for slower systems
- trusted_domains.txt: Add domains to trust list
- Performance settings: Adjust timeouts and retries
phish-net/
βββ src/ # Source code
β βββ app.py # Main Streamlit application
β βββ email_processor.py # Email parsing and processing
β βββ llm_service.py # Ollama API communication
β βββ risk_assessment.py # Risk scoring logic
β βββ error_handling.py # Error management
βββ docs/ # Documentation
β βββ prd.md # Product requirements
β βββ phases.md # Development phases
βββ examples/ # Sample emails for testing
βββ tests/ # Test files and utilities
β βββ sample_emails.py # Test data for automated testing
β βββ test_*.py # Component and integration tests
βββ examples/ # Sample .eml files for testing
βββ trusted_domains.txt # Trusted domains list
βββ requirements.txt # Python dependencies
βββ run.bat # Windows launcher
βββ run.sh # Linux/Mac launcher
βββ README.md # This file
Test the installation and basic functionality:
# From project directory with virtual environment activated
python tests/test_comprehensive.pyTest with provided examples:
examples/legitimate_example_1.emlexamples/phishing_example_1.eml
Solution:
- Ensure Ollama is installed and running:
ollama serve - Check if the model is available:
ollama list - Verify URL in sidebar settings
Solution:
- Pull the required model:
ollama pull phi4-mini-reasoning - Check available models:
ollama list - Update model name in settings (default: phi4-mini-reasoning)
Solution:
- Increase timeout in sidebar settings
- Try a smaller/faster model
- Check system resources
Solution:
- Ensure Python 3.8+:
python --version - Activate virtual environment:
.venv\Scripts\activate(Windows) orsource .venv/bin/activate(Linux/Mac) - Reinstall dependencies:
pip install -r requirements.txt --force-reinstall
If you encounter issues:
- Check the error message in the sidebar system health panel
- Review the troubleshooting guide above
- Ensure all prerequisites are met (Python 3.8+, Ollama running, model available)
- Try the quick test:
python tests/test_comprehensive.py
Q: Is my email data sent anywhere? A: No, all analysis happens locally on your machine. No data leaves your computer.
Q: What email formats are supported? A: Both plain text emails (with headers) and .eml files are supported.
Q: Can I use different AI models? A: Yes, any Ollama-compatible model can be used. Adjust the model name in settings.
Q: How accurate is the phishing detection? A: Accuracy depends on the AI model used. Results should be used as guidance, not definitive security decisions.
Q: Can I analyze attachments? A: Currently, only email text content is analyzed. Attachment analysis is not supported.
Q: What about email authentication (SPF/DKIM)? A: The tool focuses on content analysis and doesn't perform technical email authentication checks.
- Local Processing: All analysis happens on your machine
- No Data Transmission: Email content never leaves your device
- Open Source: Transparent, auditable code
- No Logging: Sensitive data is not logged to files
This is an educational project focused on local privacy-preserving phishing detection. Contributions and suggestions are welcome!
- Fork the repository
- Set up the development environment following the installation guide
- Create a feature branch for your changes
- Test your changes with the provided test suite
- Submit a pull request with a clear description of improvements