Skip to content

How does msfvenom template an APK's Launcher Activity without an onCreate method? #16781

Answered by Morsmalleo
Morsmalleo asked this question in Q&A
Discussion options

You must be logged in to vote

Finally figured out how the backdooring process works in order to start a metasploit Android Payload that's been bound to a legit APK upon launching the App after installation.

I'll keep it as short as possible.

So thanks to @bcoles answer, I've found out that msfvenom throws a static hook method into a legit APK's main launcher activity just before the first instance of return-void, the hook method resembles the example below before it's obfuscated or encrypted later on before building.

invoke-static {}, Lsome/package/id/metasploit/stage/MainService;->start()V

Once this is done the Smali code inside the following metasploit .smali files...

  • MainService.smali
  • Payload.smali
  • MainActivity.smali

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@Morsmalleo
Comment options

@Morsmalleo
Comment options

@bcoles
Comment options

bcoles Jul 18, 2022
Collaborator

@Morsmalleo
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Morsmalleo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants