Stop Phishing Before It Strikes, Stay Secure
Phishing-Detector is a comprehensive security tool designed to detect potential phishing threats by analyzing URLs in real-time. Built with a modular architecture, it employs multiple detection rules to identify suspicious websites and provides detailed threat analysis with risk scoring.
- Real-time URL Analysis: Instant threat detection with comprehensive risk scoring
- Modular Detection Engine: Easily extensible rules-based system for evolving threats
- RESTful API: Clean API endpoints for seamless integration
- Interactive Dashboard: Real-time analytics and threat monitoring
- Threat Intelligence: Optional integration with external threat databases
- Detailed Reporting: Structured analysis results with actionable insights
- Security Best Practices: Built-in security headers and rate limiting
- Database Integration: Persistent analysis history with H2/PostgreSQL support
Clean, intuitive interface for URL analysis
Detailed threat analysis with risk breakdown
Real-time insights and threat metrics
Interactive API documentation for developers
Fully responsive design for all devices
- Backend: Java 17+, Spring Boot 3.5+
- Database: H2 (dev) / PostgreSQL (prod)
- Frontend: HTML5, CSS3, JavaScript, Chart.js
- Build Tool: Maven
- Security: Spring Security
- API: RESTful with OpenAPI documentation
- Java: JDK 17 or higher
- Maven: 3.6 or higher
- Git: For cloning the repository
git clone https://github.com/your-username/phishing-detector.git
cd phishing-detector# Windows
.\mvnw.cmd spring-boot:run
# Linux/macOS
./mvnw spring-boot:run- Web Interface: http://localhost:8080
- H2 Console: http://localhost:8080/h2-console
- API Documentation: http://localhost:8080/developer.html
- Navigate to http://localhost:8080
- Enter a URL in the analysis form
- Click "Analyze URL" to get instant results
- View detailed threat analysis and risk score
curl -X POST http://localhost:8080/api/v1/phishing/analyze \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'curl http://localhost:8080/api/v1/phishing/historycurl http://localhost:8080/api/v1/analytics/dashboard# Server Configuration
SERVER_PORT=8080
# Database (Production)
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/phishing_detector
SPRING_DATASOURCE_USERNAME=your_username
SPRING_DATASOURCE_PASSWORD=your_password
# Security
ADMIN_PASSWORD=your_secure_password
# Threat Intelligence
THREAT_INTELLIGENCE_ENABLED=true
PHISHTANK_API_KEY=your_api_keyKey configurations in application.properties:
- Database settings (H2 for dev, PostgreSQL for prod)
- Security configurations
- Threat intelligence settings
- Rate limiting parameters
phishing-detector/
├── src/
│ ├── main/
│ │ ├── java/com/security/phishing_detector/
│ │ │ ├── controller/ # REST controllers
│ │ │ ├── domain/ # Entity classes
│ │ │ ├── dto/ # Data transfer objects
│ │ │ ├── repository/ # Data access layer
│ │ │ ├── service/ # Business logic
│ │ │ ├── security/ # Security configurations
│ │ │ ├── detection/ # Detection rules engine
│ │ │ └── PhishingDetectorApplication.java
│ │ └── resources/
│ │ ├── static/ # CSS, JS, images
│ │ ├── templates/ # Thymeleaf templates
│ │ └── application.properties
│ └── test/ # Unit and integration tests
├── pom.xml # Maven configuration
├── mvnw & mvnw.cmd # Maven wrapper
├── Procfile # Heroku deployment
└── README.md
Run the test suite:
./mvnw testRun with coverage:
./mvnw test jacoco:report- Create a Heroku app
- Set environment variables
- Deploy using the Procfile
# Build the image
docker build -t phishing-detector .
# Run the container
docker run -p 8080:8080 phishing-detector# Build the JAR
./mvnw clean package -DskipTests
# Run the JAR
java -jar target/phishing-detector-0.0.1-SNAPSHOT.jar| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/phishing/analyze |
Analyze a URL for threats |
| GET | /api/v1/phishing/history |
Get analysis history |
| GET | /api/v1/analytics/dashboard |
Get dashboard analytics |
| GET | /api/v1/phishing/health |
Health check |
URL Analysis Request:
{
"url": "https://suspicious-site.com"
}Analysis Response:
{
"url": "https://suspicious-site.com",
"phishing": true,
"riskScore": 85.5,
"riskLevel": "HIGH",
"detectedThreats": [
"Suspicious domain age",
"SSL certificate issues"
],
"recommendation": "Avoid accessing this URL"
}We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Java coding standards
- Add unit tests for new features
- Update documentation
- Ensure all tests pass
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenPhish for phishing data
- OWASP for security guidelines
- Spring Boot for the framework
- All contributors and security researchers
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: your-email@example.com
Stay Safe Online! 🛡️
Built with ❤️ for cybersecurity
To complete the README with visual documentation:
- Take screenshots of your application in action
- Save them in the
screenshots/directory with these names:landing-page.png- The main landing pageanalysis-results.png- URL analysis results pageanalytics-dashboard.png- The analytics dashboarddeveloper-docs.png- Developer/API documentation pagemobile-responsive.png- Mobile view of the application
- Commit and push the images to your repository
The README will automatically reference these images once added.