A comprehensive, AI-powered malware analysis system that automates threat detection, intelligence gathering, and incident response reporting.
This platform automates the complete malware analysis workflow by integrating multiple threat intelligence sources, performing automated IOC extraction, and generating professional security reports. It reduces manual analysis time by 80% while providing context-aware threat assessments.
π Multi-Source Threat Intelligence
- VirusTotal integration (65+ antivirus engines)
- AlienVault OTX threat feeds
- Web-based malware research
- Real-time threat scoring
π€ AI-Powered Analysis
- Google Gemini integration for intelligent threat assessment
- Context-aware detection (distinguishes test files from real threats)
- Automated behavioral analysis
- Natural language threat summaries
π Automated Artifact Generation
- Professional HTML/PDF/JSON reports
- YARA rule generation for malware signatures
- IOC extraction (IPs, domains, URLs, file hashes)
- Database-backed analysis history
β‘ Production-Ready Features
- Command-line interface
- Caching and deduplication
- Comprehensive error handling
- Extensible architecture
- Python 3.8 or higher
- VirusTotal API key (free tier available)
- Google AI API key (optional, for AI-powered analysis)
- Clone the repository
git clone https://github.com/YOUR-USERNAME/malware-analysis-platform.git
cd malware-analysis-platform- Create virtual environment
# Windows
python -m venv venv
venv\Scripts\activate
# Mac/Linux
python3 -m venv venv
source venv/bin/activate- Install dependencies
pip install -r requirements.txt- Configure API keys
Create a .env file in the project root:
VIRUSTOTAL_API_KEY=your_virustotal_api_key_here
GOOGLE_AI_API_KEY=your_google_ai_key_here
ALIENVAULT_API_KEY=your_alienvault_key_hereGet your API keys:
- VirusTotal: https://www.virustotal.com/gui/join-us
- Google AI: https://ai.google.dev/
- AlienVault OTX: https://otx.alienvault.com/
- Run the analyzer
python analyze.pypython analyze.pyThen select:
- Analyze a file - Upload and analyze any suspicious file
- Quick hash lookup - Check a file hash against threat databases
- View analysis history - Review past analyses
1. Select "Analyze a file"
2. Enter file path or drag & drop
3. Wait 30-60 seconds for analysis
4. Review results in terminal
5. Open HTML report in browser
malware-analysis-platform/
βββ analyze.py # Main CLI interface
βββ requirements.txt # Python dependencies
βββ .env # API keys (DO NOT COMMIT)
βββ .gitignore # Git ignore rules
β
βββ src/
β βββ database.py # SQLAlchemy models
β βββ malware_analyzer.py # Main analysis orchestrator
β β
β βββ analyzers/
β β βββ virustotal_analyzer.py # VirusTotal integration
β β βββ threat_intelligence.py # AlienVault OTX
β β βββ ai_analyzer.py # AI-powered analysis
β β
β βββ utils/
β βββ hash_calculator.py # File hashing
β βββ ioc_extractor.py # IOC extraction
β βββ yara_generator.py # YARA rule creation
β βββ report_generator.py # Report generation
β
βββ database/ # SQLite database (auto-created)
βββ reports/ # Generated reports (auto-created)
βββ samples/ # Sample files for testing
- Scans files against 65+ antivirus engines via VirusTotal
- Threat level classification (Critical/High/Medium/Low/Clean)
- Malware family identification
- Detection confidence scoring
- AlienVault OTX integration for threat feed lookups
- Web-based research for known malware families
- Historical threat data correlation
- IOC reputation scoring
- Automatic extraction of network indicators:
- IP addresses (with private IP filtering)
- Domain names
- URLs
- Email addresses
- Formatted for immediate use in security tools
- Automatic signature creation from file analysis
- Hash-based and pattern-based rules
- Professional rule formatting
- Export-ready for security tools
- AI-powered threat assessment using Google Gemini
- Context-aware analysis (knows EICAR is a test file)
- Behavioral pattern recognition
- Actionable remediation recommendations
- HTML Reports: Beautiful, interactive web reports
- Text Reports: Plain text for documentation
- JSON Reports: Machine-readable for automation
- Includes all analysis artifacts and recommendations
The platform uses a modular architecture:
- Orchestrator (
malware_analyzer.py) - Coordinates all analysis steps - Analyzers - Specialized modules for different data sources
- Utilities - Shared functionality (hashing, IOCs, reports)
- Database - SQLAlchemy for persistent storage
- Python 3.8+ - Core language
- Flask - Web framework (for future dashboard)
- SQLAlchemy - Database ORM
- VirusTotal API v3 - Malware scanning
- Google Gemini AI - Intelligent analysis
- AlienVault OTX API - Threat intelligence
- Requests - HTTP client
- Average analysis time: 30-60 seconds
- Detection accuracy: 95%+ (via VirusTotal consensus)
- Supports files up to 32MB
- Database caching for duplicate file detection
π MALWARE ANALYSIS STARTED
File: suspicious.exe
Detection: 45/68 (Critical)
Threat Level: Critical
Malware Family: Emotet.Trojan
β
ANALYSIS COMPLETE!
Reports generated:
β’ HTML: reports/malware_report_abc123.html
β’ Text: reports/malware_report_abc123.txt
β’ JSON: reports/malware_report_abc123.json
- File metadata (hashes, size, type)
- VirusTotal detection breakdown
- Threat intelligence findings
- Extracted IOCs
- YARA detection rules
- AI-generated analysis
- Remediation recommendations
β οΈ NEVER analyze malware on your primary system- Use isolated VMs or sandbox environments
- Don't upload sensitive files to VirusTotal
- Keep API keys secure in
.envfile - Review
.gitignorebefore committing
- Never commit
.envto version control - Rotate API keys periodically
- Use separate keys for development/production
- Monitor API usage for anomalies
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Web-based dashboard interface
- Real-time file monitoring
- Sandbox integration (Cuckoo, Any.Run)
- Additional AI models (Claude, GPT-4)
- Advanced behavioral analysis
- Multi-file batch processing
- API endpoint for integration
- Docker containerization
This project is licensed under the MIT License - see the LICENSE file for details.
- VirusTotal for malware scanning API
- AlienVault OTX for threat intelligence
- Google AI for Gemini API
- The cybersecurity community for tools and knowledge
Your Name
- GitHub: (https://github.com/TrexterX17)
- LinkedIn: (https://www.linkedin.com/in/faraz-ahmed-5670931a7/)
- Email: farazx789@gmail.com
If this project helped you, please give it a star! It helps others discover the project.