Overview
Script:androbugs_framework.bat
Platform: Windows (SSH client for remote Linux execution)
Purpose: Automated Android APK security analysis with detailed vulnerability reporting
Tool Information
AndroBugs Framework: Android Security Analysis Tool- Developer: AndroBugs Team
- Repository:
https://github.com/AndroBugs/AndroBugs_Framework - Type: Efficient Android vulnerability scanner
- Language: Python
- Output: Text-based vulnerability reports with severity ratings
Installation
From install scripts (Linux):Script Parameters
| Parameter | Description | Example |
|---|---|---|
PathAPK | Local path to APK file | C:\samples\app.apk |
FileApk | APK filename (no extension) | app |
Timestamp | Unique timestamp identifier | 20230615_143022 |
Documentacion | Local output directory | C:\reports |
DirApp | AndroBugs directory on server | /root/AndroBugs_Framework |
Server | SSH server hostname/IP | 192.168.1.100 |
Username | SSH username | root |
Password | SSH password | password123 |
Analysis Workflow
Execute Analysis
Runs AndroBugs Framework with specified parameters.Analysis is performed directly on the server.
Script Implementation
Command Line Options
AndroBugs Parameters
| Option | Description | Value in Script |
|---|---|---|
-f | Path to APK file to analyze | /tmp/<Timestamp>/<FileApk>_<Timestamp>.apk |
-e | Efficiency mode (analysis depth) | 2 (Standard mode) |
-o | Output directory for report | /tmp/<Timestamp> |
Efficiency Modes
| Mode | Description | Analysis Speed | Detail Level |
|---|---|---|---|
1 | Fast mode | Fastest | Basic checks only |
2 | Standard mode | Balanced | Comprehensive analysis |
3 | Deep mode | Slowest | Maximum detail |
2 for balanced performance and coverage.
Report Format
Text Report Structure
The generated report contains:Severity Levels
| Level | Color | Description |
|---|---|---|
CRITICAL | Red | Immediate security risks requiring urgent fixes |
WARNING | Yellow | Security issues that should be addressed |
NOTICE | Blue | Potential security concerns to review |
INFO | White | Informational findings, no direct risk |
Vulnerability Categories
AndroBugs Framework checks for:Critical Issues
- SSL/TLS Security: Certificate validation, hostname verification
- Cryptography: Weak algorithms, hardcoded keys, ECB mode usage
- WebView Security: JavaScript injection, file access vulnerabilities
- Database Security: Unencrypted SQLite databases
- Code Injection: Dynamic code loading, reflection abuse
Warnings
- Exported Components: Unprotected activities, services, receivers
- Debug Features: Debuggable flag, logging sensitive data
- Backup Security: Android backup enabled for sensitive apps
- External Storage: Writing sensitive data to SD card
- Permissions: Dangerous permission usage
Notices
- Network Communication: HTTP usage, clear-text traffic
- Third-party Libraries: Known vulnerable library versions
- Code Obfuscation: ProGuard/R8 configuration analysis
- Content Providers: SQL injection vulnerabilities
Information
- Certificate Details: Signing certificate information
- Permissions List: All requested permissions
- Components: Application components inventory
- API Usage: Sensitive API calls detected
Output Location
Report File Naming
Report Contents Example
Usage Example
Comparison with Other Tools
| Feature | AndroBugs | MobSF | QARK |
|---|---|---|---|
| Output Format | Text | HTML | |
| Exploit Generation | No | No | Yes |
| Analysis Speed | Fast | Medium | Slow |
| Report Detail | High | Very High | High |
| Server Required | Yes | Yes | Yes |
| Automation Friendly | Excellent | Good | Good |
Performance Characteristics
- Analysis Time: 2-5 minutes for typical APK
- Large APKs: 10-15 minutes for complex applications
- Resource Usage: Lightweight compared to MobSF/QARK
- Network Transfer: Minimal (APK upload + text report download)
Troubleshooting
Python Not Found
Script Not Found
Directory Already Exists
If timestamp directory already exists:Permission Denied
/tmp/:
Report Download Failed
If report file not found:- Check analysis completed successfully
- Verify output path in
-oparameter - Look for Python errors in SSH output
Advanced Usage
Custom Analysis Mode
Modify script to use deep analysis:Multiple APK Analysis
Batch process multiple APKs:Parse Report for CI/CD
Extract critical findings:Integration with SVM
AndroBugs Framework integrates with Simple Vulnerability Manager:- Automated Scanning: Called from SVM web interface
- Report Storage: Results stored in project documentation folder
- Centralized Management: All mobile app scans tracked in SVM database
- Timestamp Tracking: Unique identifiers for version comparison
Security Considerations
- Credentials: Script uses plain-text SSH passwords
- Network: Ensure SSH traffic is on secure network
- Data Protection: Reports may contain sensitive app information
- Cleanup: Temporary files automatically removed from server
- Access Control: Restrict access to report files
Related Scripts
mobsf.bat: PDF-based comprehensive mobile security analysisqark.bat: HTML reports with exploit generationapktool_decode_local.bat: Manual code review and modification