How to install Metasploit in Termux Android [No Root] 2021

install metasploit framework on termux android

Are you looking for a step by step guide to install Metasploit in your android device using Termux terminal without bundle error? Then you are at the right place. (No root required)

 

Introduction

Termux terminal is one of the most popular applications which allows you to run linux commands on your android device. Termux provides you a wide range of customization and incredible features. You can install and run node.js, c++, ruby and many programming languages with ease.

Metasploit is a popular penetration testing project which supports a wide variety of platforms, including termux. Termux provides you a simple and easy modules management tool so that you can install metasploit and other popular libraries within a couple of seconds. You can use metasploit module to –

  • Access remote server through open ssh,
  • Create apk and pdf files,
  • Create a listener on a port,
  • Create php files, etc.

Install Metasploit in Termux without error

Note: If you have already installed the termux terminal in your android device then make sure that termux is granted access to the internal as well as external or sd card storage. If you are not able to access the storage then run ‘termux-setup-storage’ without quotes. A pop up box will appear asking permission to grant access to the storage, then tap allow.

Step 1: Upgrade the packages

The very first thing which you need to do is upgrade all the packages, including security patches of your terminal. For upgrading to the latest version of the packages, run the below command.

apt update && apt upgrade

Step 2: Install Curl packages

Now you need to run the below command for installing CURL packages.

apt-get install curl

Step 3: Download Metasploit library

Run the below command one by one in order to download Metasploit library.

pkg install wget

wget http://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh

Step 4: Make the Metasploit library executable

Once you have installed the metasploit library. Then, you need to run the below command to navigate to the metasploit folder.

cd metasploit-framework

And then run the below command to make the file executable.

chmod +x metasploit.sh

Step 5: Install Metasploit Framework

Now you have to run the below command in order to install the metasploit framework on your terminal.

./metasploit.sh

Step 6: Start Metasploit and run native commands

Now the metasploit framework is successfully installed in your terminal. Now you need to type and run the below command to start the metasploit.

msfconsole

 

Done. You can now start hacking websites, WiFi network, etc.

I found that most of the contents across the internet are outdated and no longer works. And so, I have published this article and so that you do not have to face any difficulty with respect to installation.

Let’s see the Frequently asked questions,

FAQs

How to fix  an error parsing `Gemfile

Most of the time you might face Gemfile error while installing metasploit framework on termux terminal. The problem arises due to not having the required modules for the terminal. You can easily solve the problem by running the below command. The command usually installs the Gemfile modules and its dependencies in the terminal’s packages library.

pkg install gem bundler

How to fix payload permission denied

The other problem which you might face during installation is payload permission denied error. The problem arises due to termux api and setup-storage not configured properly. So you need to run the below command one by one.

apt install termux-api

termux-setup-storage

And then you can create Payload.

Final Words

As there are many contents across the web which are outdated and they no longer work. I have tried my best to show you a step by step guide to install Metasploit framework using termux in android without bundle error.

There are also so many alternatives to termux that you can try and use on your device. However, no terminal is much more flexible than the termux emulator which comes with a wide variety of features such as python compilation, web scraping, website hacking, and lots more.

If you want to enhance the power of termux then I would suggest you try the additional add-on which is freely available at the F-droid open source repository. You should make sure that you have downloaded and installed the open source version of termux from f-droid repo, because all these add-on are available free there.

The Google play store and f-droid repo have different versions of termux terminal and so the additional add-on from f-droid repo does not work with the play store version of termux.

Thanks. You can comment in the comment box below, if you have any questions arising in your mind or facing any error apart from Gemfile and payload issues.

19 thoughts:

  1. JUST TO SAY : EXCELENT EXPLANATION, that’s what I call ‘step-by-step’ .
    GRACIAS

    Reply
    • I’m glad you liked it. Thanks, this encourages me to put more of alike stuff.. thank you

      Reply
    • Sir, it is showing that ruby file not found

      Reply
  2. Can you talk with me? here is my instagram imback2880

    Reply
  3. Got error =
    minitest-5.12.2 requires ruby version ~> 2.2, which is incompatible with the current version, ruby 3.0.0p0
    dpkg: error pr

    Help

    Reply
    • You need to install ruby2 packages. Run the following commands:

      apt update

      apt remove ruby

      apt install ruby2

      Reply
      • Unable to locate package ruby2

        Reply
  4. Having issues with the installation of metasploit and the gem builder.
    Please help me out.

    Reply
    • You have to install gem bundler package. Run pkg install gem bundler.This command will install gem packages.

      Reply
  5. Non mei installa metasploit instazzione si inrerromoe a 4 kb
    Co me posso risolvere

    Reply
  6. CANNOT LINK EXECUTABLE “ruby”: library “/data/data/com.termux/files/usr/lib/ruby/2.7.0/aarch64-linux-android/bigdecimal.so” not found: needed by main executable

    While running msfconsole

    Reply
    • CANNOT LINK EXECUTABLE “ruby”: library “/data/data/com.termux/files/usr/lib/ruby/2.7.0/aarch64-linux-android/bigdecimal.so” not found: needed by main executable

      Reply
      • Run the below command

        bash <(curl -fsSL "https://git.io/abhacker-repo") --install ruby=2.7.2 -r

        Reply
  7. ====================== *** Installation… =======================
    metasploit.sh: line 71: gem: command not found
    metasploit.sh: line 74: gem: command not found
    metasploit.sh: line 76: gem: command not found
    metasploit.sh: line 77: bundle: command not found
    metasploit.sh: line 78: bundle: command not found
    metasploit.sh: line 79: bundle: command not found

    Reply
  8. Unable to locate package gem
    And Unable to locate bundler
    Plsss help me

    Reply
  9. Remove this redundant step:
    “`
    cd metasploit-framework
    “`

    Reply
  10. i cant download ruby2 cause its say that it didnt locate file no matter what

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.