ApkX
Advanced APK analysis tool with intelligent caching, pattern matching, and comprehensive security vulnerability detection
Install / Use
/learn @h0tak88r/ApkXREADME
apkX - Advanced APK & iOS Analysis Tool
A comprehensive security analysis tool for Android APK and iOS IPA files with advanced pattern matching, vulnerability detection, and cloud storage integration.
🚀 What's New in v4.0.0
- ✅ Cloudflare R2 Integration: Full support for cloud storage with zero local dependencies
- ✅ Dokploy Compatibility: Enhanced Docker configuration for easy deployment on Dokploy
- ✅ iOS Download Improvements: Fixed ipatool issues and enhanced iOS app scanning
- ✅ Configurable Docker Setup: All paths and ports now configurable via environment variables
- ✅ Security Improvements: Environment variable usage instead of hardcoded credentials
- ✅ Simplified Documentation: Clean README with clear tool list and official links
✨ Features
🔍 Advanced Analysis
- Pattern Matching: 1600+ security patterns for sensitive data detection
- Vulnerability Detection: Built-in Janus vulnerability detection
- Static Analysis: Comprehensive code analysis for both Android and iOS
- MITM Patching: Automatic APK patching for network traffic analysis
📱 Multi-Platform Support
- Android APK: Full decompilation and analysis
- iOS IPA: Binary plist parsing and Swift/Objective-C analysis
- XAPK Support: Extended Android package format
☁️ Storage Options
- Local Storage: Traditional file-based storage
- Cloudflare R2 Storage: Cloud-based storage with zero local dependencies
- Auto-Sync: Automatic synchronization between storage backends
🎨 Modern UI
- Responsive Design: Works on desktop and mobile
- Real-time Updates: Live job status and progress tracking
- Interactive Reports: Rich HTML reports with navigation
- Download Support: Direct download of patched APKs and manifests
🚀 Installation & Quick Start
Option 1: Docker (Recommended)
The easiest way to run apkX is with Docker, which includes all dependencies:
# Clone the repository
git clone https://github.com/h0tak88r/apkX.git
cd apkX
# Set your Apple ID credentials (for iOS downloads)
export IPATOOL_EMAIL="your-email@example.com"
export IPATOOL_PASSWORD="your-app-specific-password"
export IPATOOL_KEYCHAIN_PASSPHRASE="your-passphrase"
# Start with Docker Compose
docker-compose up --build
Access the web interface at: http://localhost:9090
Option 2: Local Installation
For local installation, you need the following tools installed:
Required Tools
- Go 1.21+ - Install Go
- Java 17+ - Install Java
- Node.js 18+ - Install Node.js
- apkeep - Install apkeep
- ipatool - Install ipatool
- apk-mitm - Install apk-mitm
Build and Run
# Clone and build
git clone https://github.com/h0tak88r/apkX.git
cd apkX
go mod download
go build -o apkx-web ./cmd/server/main.go
# Set environment variables
export IPATOOL_EMAIL="your-email@example.com"
export IPATOOL_PASSWORD="your-app-specific-password"
export IPATOOL_KEYCHAIN_PASSPHRASE="your-passphrase"
# Run the server
./apkx-web -addr :9090 -mitm
📖 Usage
Web Interface
- Open your browser to
http://localhost:9090 - Upload APK/IPA files or download from package managers
- View analysis reports and download patched APKs
- Delete reports using the delete button
API Endpoints
POST /upload- Upload APK/IPA filesPOST /download- Download APKs from package managersPOST /download-ios- Download iOS apps from App StoreGET /api/install/{reportID}- Download patched APKDELETE /api/report/delete/{reportID}- Delete reportGET /api/jobs- List analysis jobs
iOS App Download
For iOS apps, you can use the download-ios endpoint:
curl -X POST "http://localhost:9090/download-ios" \
-d "bundle_id=com.example.app&ios_version=1.0.0"
Note: iOS downloads require Apple ID authentication. Before using iOS downloads, you need to authenticate ipatool with your Apple ID:
# Run this command interactively to authenticate
docker exec -it apkx-web ipatool auth login
This is a one-time setup that stores your credentials securely in the container's keychain.
Command Line
# Analyze APK
./apkx-web -apk app.apk -output ./reports
# Analyze with MITM patching
./apkx-web -apk app.apk -mitm -output ./reports
🔧 Configuration
Environment Variables
Required for iOS Downloads
export IPATOOL_EMAIL="your-apple-id@example.com"
export IPATOOL_PASSWORD="your-app-specific-password"
export IPATOOL_KEYCHAIN_PASSPHRASE="your-keychain-passphrase"
Optional Configuration
# Server Configuration
export PORT="9090" # Web server port (default: 9090)
# Storage Paths (Docker)
export APKX_UPLOAD_DIR="/app/web-data/uploads"
export APKX_REPORTS_DIR="/app/web-data/reports"
export APKX_DOWNLOAD_DIR="/app/web-data/downloads"
export APKX_PATTERNS_PATH="/app/config/regexes.yaml"
# Cloudflare R2 Storage (Optional)
export USE_R2_STORAGE="true"
export R2_BUCKET_NAME="your-bucket-name"
export R2_ACCOUNT_ID="your-account-id"
export R2_ACCESS_KEY_ID="your-access-key-id"
export R2_SECRET_KEY="your-secret-key"
export R2_PUBLIC_URL="https://your-custom-domain.com"
# Authentication (Optional)
export APKX_AUTH_ENABLED="true"
export APKX_AUTH_USERNAME="your-username"
export APKX_AUTH_PASSWORD="your-secure-password"
export APKX_SESSION_SECRET="your-session-secret"
Cloudflare R2 Setup
- Create a Cloudflare R2 bucket
- Generate R2 API tokens with read/write permissions
- Set environment variables or use the setup script
Required Environment Variables:
export USE_R2_STORAGE=true
export R2_BUCKET_NAME="your-bucket-name"
export R2_ACCOUNT_ID="your-account-id"
export R2_ACCESS_KEY_ID="your-access-key-id"
export R2_SECRET_KEY="your-secret-key"
export R2_PUBLIC_URL="https://your-custom-domain.com" # Optional
iOS Downloads Setup (Automatic Authentication)
For automatic iOS app downloads, configure Apple ID credentials with an App-Specific Password:
Required Environment Variables:
export IPATOOL_KEYCHAIN_PASSPHRASE="your-keychain-passphrase"
export IPATOOL_EMAIL="your-apple-id@example.com"
export IPATOOL_PASSWORD="your-app-specific-password"
App-Specific Password Setup:
- Go to Apple ID Account Settings
- Sign in with your Apple ID
- In the "Security" section, click "Generate Password" under "App-Specific Passwords"
- Enter a label (e.g., "apkX iOS Downloads")
- Copy the generated password and use it as
IPATOOL_PASSWORD
Note: iOS downloads require a valid Apple ID with purchased apps. Authentication is handled automatically using the App-Specific Password.
Authentication Setup
By default, authentication is disabled and the web interface is publicly accessible. To enable authentication:
- Enable Authentication: Set
APKX_AUTH_ENABLED=true - Set Credentials: Configure
APKX_AUTH_USERNAMEandAPKX_AUTH_PASSWORD - Session Security: Optionally set
APKX_SESSION_SECRETfor session security
Default Credentials (when authentication is enabled but credentials not provided):
- Username:
admin - Password:
admin123
⚠️ Important: Change the default password in production environments!
🐳 Docker Commands
# Start the application
docker-compose up --build
# Start in background
docker-compose up -d --build
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
# Rebuild and start
docker-compose up --build --force-recreate
🔧 Troubleshooting
Common Issues
Missing Dependencies
If you get "command not found" errors, install the missing tools:
- apkeep: Installation Guide
- ipatool: Installation Guide
- Java: Installation Guide
- Node.js: Installation Guide
iOS Download Authentication
# Authenticate ipatool manually
ipatool auth login --email your-email@example.com
# Or set environment variables
export IPATOOL_EMAIL="your-email@example.com"
export IPATOOL_PASSWORD="your-app-specific-password"
export IPATOOL_KEYCHAIN_PASSPHRASE="your-passphrase"
Docker Issues
# Check if config file is mounted
docker exec -it apkx-web ls -la /app/config/
# Recreate volumes
docker-compose down -v
docker-compose up --build
# Check logs
docker-compose logs -f
Getting Help
- Check the logs:
docker-compose logs -f - Verify dependencies:
docker exec -it apkx-web which apkeep ipatool jadx - Test iOS auth:
docker exec -it apkx-web ipatool auth login
📊 Analysis Features
Android APK Analysis
- Decompilation: JADX-based APK decompilation
- Manifest Analysis: Permission and component analysis
- Code Analysis: Java/Kotlin source code scanning
- Vulnerability Detection: Security pattern matching
- MITM Patching: Network traffic interception setup
iOS IPA Analysis
- Binary Plist Parsing: Automatic conversion of binary plists
- Swift/Objective-C Analysis: Source code pattern matching
- Bundle Analysis: App metadata and configuration
- Security Scanning: iOS-specific vulnerability patterns
Pattern Categories
- API Keys: AWS, Google, Firebase, etc.
- Authentication: OAuth, JWT, session tokens
- Database: Connection strings, credentials
- Payment: Stripe, PayPal, payment tokens
- **So
