{"id":26047721,"url":"https://github.com/elrashedy1992/apknife","last_synced_at":"2025-04-10T14:20:26.859Z","repository":{"id":279676333,"uuid":"939555133","full_name":"elrashedy1992/APKnife","owner":"elrashedy1992","description":"APKnife is an advanced APK analysis and modification tool designed for security researchers and ethical hackers. It allows users to extract, analyze, modify, and sign APK files. The tool provides features like APK extraction, AndroidManifest.xml editing, API call detection, vulnerability scanning, and APK signing ","archived":false,"fork":false,"pushed_at":"2025-03-13T01:49:58.000Z","size":8770,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-24T12:56:23.028Z","etag":null,"topics":["android","android-application","android-pentesting","android-security","android-studio","apk","apk-analysis","apk-modificator","apk-reverse-engineering","apktool","cypersecuirty","ethical-hacking","ethical-hacking-tools","ethicalhacking","mobile-secuirty","pentesting"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elrashedy1992.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T18:18:19.000Z","updated_at":"2025-03-20T14:38:07.000Z","dependencies_parsed_at":"2025-02-26T20:39:26.510Z","dependency_job_id":null,"html_url":"https://github.com/elrashedy1992/APKnife","commit_stats":null,"previous_names":["elrashedy1992/apknife"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrashedy1992%2FAPKnife","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrashedy1992%2FAPKnife/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrashedy1992%2FAPKnife/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elrashedy1992%2FAPKnife/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elrashedy1992","download_url":"https://codeload.github.com/elrashedy1992/APKnife/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248233935,"owners_count":21069493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-application","android-pentesting","android-security","android-studio","apk","apk-analysis","apk-modificator","apk-reverse-engineering","apktool","cypersecuirty","ethical-hacking","ethical-hacking-tools","ethicalhacking","mobile-secuirty","pentesting"],"created_at":"2025-03-07T23:13:26.285Z","updated_at":"2025-04-10T14:20:26.836Z","avatar_url":"https://github.com/elrashedy1992.png","language":"Python","readme":"\n# APKnife: The Cyber Blade of APK Domination 🔪🧸\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"apknife/assets/cover.png\" alt=\"APKnife Cover\" width=\"100%\"\u003e\n\u003c/p\u003e\n\nAPKnife – The Double-Edged Blade of APK Analysis 🔪\n\nFear the Blade, Trust the Power!\n\nAPKnife is an advanced tool for APK analysis, modification, and security auditing. Whether you're a security researcher, penetration tester, or Android developer, APKnife provides powerful features for reverse engineering, decompiling, modifying, and analyzing APK files.\n\n---\n\n## 🚀 Features \u0026 Capabilities\n\n- ✅ Extract \u0026 decompile APKs into readable formats\n- ✅ Modify \u0026 repackage APKs effortlessly\n- ✅ Analyze APKs for security vulnerabilities\n- ✅ Edit AndroidManifest.xml \u0026 Smali code\n- ✅ Extract Java source code from an APK\n- ✅ Detect Remote Access Trojans (RATs) \u0026 malware\n- ✅ Decode binary XML files \u0026 scan for API calls\n- ✅ Change APK metadata (icon, name, package name)\n- ✅ Identify security risks like excessive permissions\n- ✅ Sign APKs for smooth installation\n\n---\n\n## 🔧 Installation\n\n### 📌 Prerequisites\n\nEnsure you have the following installed on your system:\n\n- **Python 3.12**\n- **Java (JDK 8 or later)**\n- **apktool**\n- **zipalign**\n- **keytool**\n\n### 🛠 Setting Up a Python Virtual Environment\n\nBefore installing APKnife, it's recommended to set up a Python virtual environment to avoid package conflicts.\n\n1️⃣ **Create a Python Virtual Environment:**\n\n```\npython3 -m venv venv\nsource venv/bin/activate  # On Linux/macOS\nvenv\\Scripts\\activate  # On Windows\n```\n\n2️⃣ **Install Required Packages**\n\nOnce the virtual environment is activated, install APKnife:\n\n```\npip install apknife\n```\n\n---\n\n## 📥 Installing Rust (Required for APKnife)\n\nAPKnife requires Rust for building. Follow the installation steps based on your OS:\n\n### 🐧 On Linux:\n\n```\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n```\n\nThen follow the on-screen instructions.\n\n### 🍏 On macOS (Using Homebrew):\n\n```\nbrew install rust\n```\n\n### 🖥️ On Windows:\n\n1. Visit [rustup.rs](https://rustup.rs/) and install Rust.\n2. Verify installation:\n\n```\nrustc --version\n```\n\n---\n\n## ⚠️ Troubleshooting Common Issues\n\n### ❌ Issue Installing Rust on Termux\n\nEnsure Termux is up to date:\n\n```\npkg update \u0026\u0026 pkg upgrade\n```\n\nInstall required build tools:\n\n```\npkg install clang make python rust\n```\n\n### ❌ Issues Installing APKnife\n\n- **Rust not installed properly?** Ensure it's correctly installed via rustup or your package manager.\n- **Python conflicts?** If there are issues with virtual environments, reset it:\n\n```\nrm -rf venv\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n### ✅ Verifying Installed Versions\n\n```\npython --version\nrustc --version\n```\n\n---\n\n## 🌍 Setting Up Rust Environment Variables\n\n### 🐧 On Linux/macOS\n\n```\nnano ~/.bashrc # For bash\nnano ~/.zshrc   # For zsh\n```\n\nAdd this line at the end:\n\n```\nexport PATH=\"$HOME/.cargo/bin:$PATH\"\n```\n\nApply changes:\n\n```\nsource ~/.bashrc  # For bash\nsource ~/.zshrc   # For zsh\n```\n\n### 🖥️ On Windows\n\n1. Open \"Environment Variables\" from the Start menu.\n2. Edit Path under System Variables and add:\n\n```\nC:\\Users\\\u003cYourUsername\u003e\\.cargo\\bin\n```\n\n3. Click OK and restart your terminal.\n\nVerify the setup:\n\n```\ncargo --version\nrustc --version\n```\n\n---\n\n## 📥 Installing APKnife\n\n```bash\npip install apknife\n```\n\n---\n\n## 📜 Usage\n\n### 🖥️ Interactive Mode\n\nTo enter interactive mode, run:\n\n```bash\npython3 apknife.py interactive\n```\n\nThis will launch a command-line interface for executing APKnife commands.\n\n---\n\n## 🛠️ Available Commands\n\n### 🟢 Extract APK Contents\n\n```bash\npython3 apknife.py extract -i target.apk -o extracted/\n```\n\n### 🟢 Modify \u0026 Rebuild APK\n\n```bash\npython3 apknife.py build -i extracted/ -o modified.apk\n```\n\n### 🟢 Sign APK\n\n```bash\napknife sign -i modified.apk\n```\n\n### 🟢 Analyze APK for Vulnerabilities\n\n```bash\napknife scan_vulnerabilities -i target.apk\n```\n\n### 🟢 Detect Remote Access Trojans (RATs)\n\n```bash\napknife catch_rat -i malicious.apk\n```\n\n### 🟢 Extract Java Source Code\n\n```bash\napknife extract-java -i target.apk -o src_folder\n```\n\n### 🟢 Change APK Name\n\n```bash\napknife modify-apk --name -i app.apk\n```\n\n### 🟢 Change APK Icon\n\n```bash\napknife modify-apk --icon new_icon.png -i app.apk\n```\n\n### 🟢 Modify Package Name\n\n```bash\napknife modify-apk --package com.example.example -i app.apk\n```\n\n### 🟢 Modify Multiple APK Attributes\n\n```bash\napknife modify-apk --name new_name --package new.package.name --icon anysize.any -o modified_apk.apk\n```\n\n### 🟢 Scan APK Permissions\n\n```bash\napknife scan_permissions -i target.apk\n```\n\n---\n\n## 👇 Help Menu\n\n\n\n### 🟢 **Extract APK Contents**\nExtract the contents of an APK file.\n\n```bash\npython3 apknife.py extract -i target.apk -o extracted/\n```\n\n- **`-i`**: Path to the input APK file.\n- **`-o`**: Directory to save the extracted files.\n\n---\n\n### 🟢 **Build APK**\nRebuild an APK from extracted files.\n\n```bash\npython3 apknife.py build -i extracted/ -o modified.apk\n```\n\n- **`-i`**: Directory containing the extracted files.\n- **`-o`**: Path to save the rebuilt APK.\n\n---\n\n### 🟢 **Sign APK**\nSign an APK file.\n\n```bash\napknife sign -i modified.apk\n```\n\n- **`-i`**: Path to the APK file to sign.\n\n---\n\n### 🟢 **Analyze APK**\nAnalyze an APK for security vulnerabilities.\n\n```bash\napknife analyze -i target.apk\n```\n\n- **`-i`**: Path to the APK file to analyze.\n\n---\n\n### 🟢 **Edit Manifest**\nEdit the `AndroidManifest.xml` of an APK.\n\n```bash\napknife edit-manifest -i target.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Decompile to Smali**\nDecompile an APK to Smali code.\n\n```bash\napknife smali -i target.apk -o smali_output/\n```\n\n- **`-i`**: Path to the APK file.\n- **`-o`**: Directory to save the decompiled Smali code.\n\n---\n\n### 🟢 **Decode Manifest**\nDecode the `AndroidManifest.xml` of an APK.\n\n```bash\napknife decode_manifest -i target.apk -o output_dir/\n```\n\n- **`-i`**: Path to the APK file.\n- **`-o`**: Directory to save the decoded manifest.\n\n---\n\n### 🟢 **Find onCreate Methods**\nFind `onCreate` methods in an APK.\n\n```bash\napknife find-oncreate -i target.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Find API Calls**\nFind API calls in an APK.\n\n```bash\napknife find-api -i target.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Scan for Vulnerabilities**\nScan an APK for vulnerabilities.\n\n```bash\napknife scan-vulnerabilities -i target.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Scan Permissions**\nScan and list permissions used by an APK.\n\n```bash\napknife scan-permissions -i target.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Catch RAT**\nAnalyze an APK for Remote Access Trojan (RAT) indicators.\n\n```bash\napknife catch_rat -i malicious.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Extract Java Source Code**\nExtract Java source code from an APK.\n\n```bash\napknife extract-java -i target.apk -o src_folder/\n```\n\n- **`-i`**: Path to the APK file.\n- **`-o`**: Directory to save the extracted Java source code.\n\n---\n\n### 🟢 **Extract Sensitive Data**\nExtract sensitive data from an APK.\n\n```bash\napknife extract-sensitive -i target.apk -o sensitive_data.json\n```\n\n- **`-i`**: Path to the APK file.\n- **`-o`**: Path to save the extracted sensitive data (JSON format).\n\n---\n\n### 🟢 **Modify APK Metadata**\nModify an APK's metadata (name, icon, package name).\n\n```bash\napknife modify-apk -i target.apk --name \"New App Name\" --icon new_icon.png --package com.new.package\n```\n\n- **`-i`**: Path to the APK file.\n- **`--name`**: New app name.\n- **`--icon`**: Path to the new icon (any size/format).\n- **`--package`**: New package name.\n\n---\n\n### 🟢 **Extract DEX Files**\nExtract DEX files from an APK.\n\n```bash\napknife extract-dex -i target.apk -o dex_output/\n```\n\n- **`-i`**: Path to the APK file.\n- **`-o`**: Directory to save the extracted DEX files.\n\n---\n\n### 🟢 **Scan for Protection Mechanisms**\nScan an APK for protection mechanisms (e.g., Firewall, ProGuard).\n\n```bash\napknife waf -i target.apk\n```\n\n- **`-i`**: Path to the APK file.\n\n---\n\n### 🟢 **Interactive Mode**\nLaunch APKnife in interactive mode.\n\n```bash\npython3 apknife.py interactive\n```\n\n---\n\n### 🟢 **Help Menu**\nDisplay the help menu with all available commands.\n\n```\napknife -h\n```\n\n---\n\n### 🟢 **Update Commands**\nReload the commands from the external file.\n\n```\napknife update-commands\n```\n\n---\n\n### 🟢 **List Commands**\nDisplay the current list of available commands.\n\n```\napknife list-commands\n```\n\n---\n\n### 🟢 **Exit Interactive Mode**\nExit the interactive shell.\n\n```\nexit\n```\n\n---\n\n## ⚠️ Legal Disclaimer\n\nThis tool is designed for educational and security research purposes only. Unauthorized use of APKnife on third-party applications without permission is illegal. The developers are not responsible for any misuse.\n\n---\n\n## 📜 License\n\nAPKnife is released under the MIT License – You are free to modify and distribute it for legal use.\n\n---\n\n## 💡 Contributions \u0026 Support\n\n🚀 Contributions are welcome! Fork the repo, submit pull requests, and report issues. Let's make APKnife even better!\n\n---\n\n**APKnife – The Double-Edged Blade of APK Analysis 🔪🧸**\n\nAll rights reserved to **MR_nightmare**.\n``` \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felrashedy1992%2Fapknife","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felrashedy1992%2Fapknife","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felrashedy1992%2Fapknife/lists"}