1

I'm trying to inject a reverse_tcp meterpreter payload into my own app for educational purposes.

Loading the raw payload apk on my phone works over LAN/WAN.

I injected the payload manually by decompiling both apk using apktool and put the Payload.smali file into com/metasploit/stage. What was interesting is that my MainActivity.smali file is incredibly small, and there were no protected functions. There was a public onCreate that called a private and empty n_onCreate native function.

After the call to the private n_onCreate I added the invoke static call to the payload. This crashes my app and I don't understand why. I also don't understand why the smali file is so small. Here is the smali file https://pastebin.com/jjX8TCMy - Line 171 is my invoke static call to the payload

I also don't know how to access the crash log (if any) that is produced when my app crashes like that.

I used Xamarin.Android to create the app if that makes any difference, and it might explain the private native methods that are seemingly empty?

What am I doing wrong in injecting this payload to the apk?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.