Backdooring any APK using OpenSource PENETRATION TESTING tools
Smartphone Pentest Framework ships in with Kali Linux and is quiet well known for its utility in the penetration testing of the Android Devices . It has a huge range of attack tools included in itself for penetration testing of the Android devices . One of the features is to take a compiled APK file and add backdoor code to it . This tutorial is about how you can take custom compiled APK files and add the SPF backdoor to them .
The resulting app looks and feels like the original app, but with some extra functionality. This is just what a penetration tester would want .
Building SPF Agents: Backdooring Any APK :
Lets say you are doing a Mobile Security Audit for an organisation . If you dont want to use the plain APK generated by the SPF then SPF allows you to take a pre compiled APK and Add custom backdoor code to it . This is also known as refactoring the APK in the penetration testing terms . This however will require you to use a third party apktool .
For backdooring any APK choose option 1 from the main menu followed by 5.) Backdoor APK with Agent. You will be prompted for the APK to backdoor. If apktool is not found SPF will ask you if you want to download it before continuing.
spf> 1Select An Option from the Menu: 1.) Attach Framework to a Deployed Agent 2.) Generate Agent App 3.) Copy Agent to Web Server 4.) Import an Agent Template 5.) Backdoor Android APK with Agent 6.) Create APK Signing Key spf> 5 APKTool not found! Is it installed? Check your config file Install Android APKTool(y/N)? spf> y ..snip.. Puts the Android Agent inside an Android App APK. The application runs normally with extra functionality APK to Backdoor: /root/Desktop/MapsDemo.apk I: Baksmaling...
You will be prompted for the same information for control as backdooring source code.
Phone number of the control modem for the agent: 15555215554Control key for the agent: KEYKEY1 Webserver control path for agent: /androidagent1 Control Number: 15555215554 Control Key:KEYKEY1 ControlPath:/androidagent1 Is this correct?(y/n) y ..snip..
The APK will be rebuilt with the SPF Agent included.
Clean and Simple as that . This is as quick as it can get . Thanks to Georgia Weidman SmartPhone Pentest Framework is Open source and allows quick penetration testing of the Mobile Devices . I hope you all have enjoyed Backdooring any apk tutorial using open source tools.