-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Msf::Payload::Apk: Try rebuilding APK with AAPT2 if rebuilding APK fails #16340
Conversation
d6a44d2
to
fe70296
Compare
@msjenkins-r7 test this please |
FWIW; the tests passed the first time. Force push was only to update the commit message. ( |
LGTM. I can't find a good way of detecting if --use-aapt2 is necessary, so this change will do for now. Before
After
|
Release notesThis change fixes the APK injection behaviour to use aapt2 if msfvenom is unable to rebuild the APK with apktool. This fixes a bug and allows more APKs to be compatible with msfvenom. |
I wasn't able to find any reliable way to detect whether an APK was built with AAPT2 (that doesn't mean there isn't one).
The easiest option is to simply try rebuilding with AAPT2 if rebuilding with AAPT fails. Not efficient, but foolproof.
Fixes #16152
Tested using:
Before
After