A hybrid static and dynamic Android malware analysis platform using machine learning classifiers (Random Forest & XGBoost). Built as a final year academic project to demonstrate multi-modal mobile security verification.
The platform performs dual-channel analysis to determine malware verdicts:
graph TD
A[Upload APK File] --> B(Static Analysis Engine)
A --> C(Dynamic Behavior Log Parser)
B --> B1[Androguard Extraction]
B1 --> B2[Permissions & API Vectors]
C --> C1[Behavioral Signature Matches]
B2 --> D[Machine Learning Models]
C1 --> D
D --> D1[Random Forest Predictor]
D --> D2[XGBoost Predictor]
D1 --> E[Hybrid Consensus Verdict]
D2 --> E
E --> F[Next.js Dashboard Display]
- Static Analysis Channel:
- Fast extraction of permissions and Android Manifest attributes using Androguard.
- Auditing of 14 highly sensitive API signatures (e.g.
sendTextMessage,getDeviceId,Runtime;->exec). - Optional Deep Structural Decompilation via Jadx command line integration.
- Dynamic Analysis Channel:
- Real-time log parsing for behavioral traits: detects anomalous network socket requests, file writes, and background service execution.
- Explainable AI (XAI) Integration:
- Integration of model prediction explanation framework (SHAP) to visualize feature contributions.
- Modern User Interface:
- Fully responsive web interface styled with Tailwind CSS v4 and animated using Framer Motion.
- Interactive history, metrics visualization, and live file uploads.
- Dataset Source: Meta-data obtained from Androzoo and curated samples.
- Feature Space: 21-vector static permissions and API call flags.
- Evaluation Metrics:
Classifier Accuracy Precision Recall F1-Score Random Forest 94.2% 93.8% 94.5% 94.1% XGBoost 93.6% 92.9% 94.1% 93.5%
Note: The system implements a High Recall (Hybrid) consensus logic—if either model flags an APK as malicious, it is categorized as malware to minimize false negatives.
- Python 3.10+
- Node.js 18+ (for frontend)
- Jadx (optional, for Deep Scan feature)
- Navigate to the project directory:
cd android-malware-detector - Install dependencies:
pip install -r requirements.txt
- Start the Flask application:
The backend will boot up at
python app.py
http://127.0.0.1:5000.
- Navigate to the frontend directory:
cd android-malware-detector/frontend - Install Node modules:
npm install
- Start the dev server:
The frontend dashboard will be available at
npm run dev
http://localhost:3000.
- android-malware-detector/app.py: Backend Flask Server.
- android-malware-detector/frontend/src/app/page.tsx: Frontend React layout.
- android-malware-detector/models/: Pretrained weights (
.pklfiles). - android-malware-detector/src/: Source modules for feature extraction, predictions, and models.
- android-malware-detector/scripts/: Dataset setup and testing utilities.
- android-malware-detector/tests/: Placeholder for unit test cases.
Licensed under the MIT License.
