CipherCop is a comprehensive security tool that analyzes websites, mobile apps, and APK files to identify potential phishing, malware, and other security risks. It employs a powerful hybrid approach, integrating AI analysis, custom machine learning models, and real-time data from APIs like VirusTotal to deliver a robust threat assessment.
The application is built on a monolithic Django backend that serves RESTful APIs. Its core relies on a hybrid analysis engine that combines generative AI, pre-trained machine learning models, and external APIs for comprehensive threat detection.
CipherCop provides three main analysis modules accessible through its API.
- Hybrid Threat Detection: Uses a dual-pass system. It first queries Google's Gemini AI for a rapid assessment. If confidence is low, it performs a deep analysis using a custom Machine Learning model trained on over 80 lexical and domain-based features.
- Real-Time Data Enrichment: Integrates WHOIS lookups for domain age and registration details and queries the Open PageRank API to factor in domain authority.
- Comprehensive Reporting: Delivers a final fraud score and a verdict of "Legitimate," "Suspicious," or "Phishing."
- Dual-Vector Analysis: Checks APK files along two vectors: safety and authenticity.
- Safety (Malware Detection): A machine learning model analyzes the permissions requested in the APK's manifest to predict if it's benign or malicious.
- Authenticity (Reputation Check): The file's SHA256 hash is checked against the VirusTotal API. If the file has been flagged by security vendors, it's marked as "Modified"; otherwise, it's considered "Official."
- Clear Verdicts: Provides a combined category like "Safe, Official App" or "Malicious Mod APK."
- Public Sentiment Analysis: Scrapes user reviews for a given app from the Play Store and uses a sentiment analysis model to gauge public opinion and trust.
- Rule-Based Permission Checking: Flags potentially dangerous or unnecessary permissions based on the app's declared category (e.g., a calculator app asking for contact access).
- Hybrid Risk Scoring: Combines sentiment score and permission risk to categorize apps as "Low-Risk," "Medium-Risk," or "High-Risk."
- Real-Time Protection: A companion browser extension allows users to analyze their current webpage with a single click.
- Seamless Integration: It sends the active URL to the backend and displays the security verdict directly within the browser, providing an immediate layer of defense against phishing.
- Backend: Django, Django REST Framework
- Machine Learning: TensorFlow, Scikit-learn, Pandas, NLTK
- Data Parsing:
pyaxmlparser(for APKs), BeautifulSoup (for scraping) - APIs & Services: Google Gemini, VirusTotal, Open PageRank
- Database: SQLite3 (default, configurable)
- Frontend: HTML, CSS, JavaScript (for the web interface)
Follow these instructions to set up the project locally.
- Python 3.9+
- pip package manager
- Git
- Clone the repository:
git clone [https://github.com/Hemanth098/CipherCop.git](https://github.com/Hemanth098/CipherCop.git) cd CipherCop - Create and activate a virtual environment:
# For Windows python -m venv venv .\venv\Scripts\activate # For macOS/Linux python3 -m venv venv source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Set up environment variables:
Create a
.envfile in the project's root directory and add your API keys. You can use an.env.examplefile as a template:# .env GEMINI_API_KEY="YOUR_GOOGLE_GEMINI_API_KEY" VIRUSTOTAL_API_KEY="YOUR_VIRUSTOTAL_API_KEY" DOMCOP_API_KEY="YOUR_OPEN_PAGERANK_API_KEY"
- Run Django migrations:
python manage.py migrate
- Start the development server:
The API will now be running at
python manage.py runserver
http://127.0.0.1:8000.
The system exposes the following POST endpoints for analysis.
- Endpoint:
/analyze_website - Description: Analyzes a URL for phishing risks.
- Request Body:
{ "url": "[http://example-phishing-site.com](http://example-phishing-site.com)" } - Success Response:
{ "url": "[http://example-phishing-site.com](http://example-phishing-site.com)", "fraudScore": 95, "category": "Phishing", "analysisDetails": "...", "timestamp": "2025-09-30T18:00:00Z" }
- Endpoint:
/analyze_apk - Description: Analyzes an uploaded
.apkfile for malware and authenticity. Use amultipart/form-datarequest. - Request (
curlexample):curl -X POST -F "apk_file=@/path/to/your/app.apk" [http://127.0.0.1:8000/analyze_apk](http://127.0.0.1:8000/analyze_apk) - Success Response:
{ "url": "app.apk", "category": "Malicious Mod APK", "analysisDetails": "This app is a modified version AND our model detected malicious permission patterns...", "safetyPrediction": "Malicious", "authenticityPrediction": "Modified", "timestamp": "2025-09-30T18:05:00Z" }
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss any changes.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.
