Metasploit is the most popular penetration testing framework. It is the favourite tool of Ethical Hackers. There are many security researchers who use Kali Linux and Metasploit is pre-installed on Kali. Now you can use Metasploit in your Android device through Termux. Here is the complete guide to install Metasploit in Termux without root and without error.

Top 3 Methods to Install Metasploit 6 in Termux Without Error

There are two methods to download the Metasploit Framework in Termux. You can use any method that you find convenient.

#1 Method to Install Metasploit in Termux

Following are the steps to download Metasploit in Termux:

  • Firstly, install Termux in your Android device from F-Droid.

  • Then enter the below commands in Termux for basic setup.
pkg update && pkg upgrade
termux-setup-storage
pkg install -y git curl wget ruby perl openssh binutils python autoconf bison clang coreutils findutils apr apr-util postgresql openssl readline libffi libgmp libpcap libsqlite libgrpc libtool libxml2 libxslt ncurses make ncurses-utils ncurses git unzip zip tar termux-tools termux-elf-cleaner pkg-config

  • After that, download the Metasploit file.
  • Next, move the Metasploit file to Termux.
cd /sdcard/download
cp metasploit-framework-6.2.27.zip /data/data/com.termux/files/home

  • Afterwards, unzip the Metasploit file.
cd
unzip metasploit-framework-6.2.27.zip

  • Now run the Metasploit framework.
cd metasploit-framework-6.2.27
ls
gem install nokogiri -v '1.13.9' -- --use-system-libraries
bundle install
./msfconsole

#2 Method to Install Metasploit in Termux

If you do not find the first method convenient, then you can use the second method to install the Metasploit Framework. Follow the below steps to download Metasploit in Termux:

  • Firstly, install Termux in your Android device from F-Droid.
  • After that, enter the following commands
pkg update && pkg upgrade
termux-setup-storage
pkg install tar
pkg install axel
axel --alternate https://github.com/rapid7/metasploit-framework/archive/refs/tags/6.2.27.tar.gz
ls
tar -xf $HOME/metasploit-framework-6.2.27.tar.gz
ls
cd metasploit-framework-6.2.27
./msfconsole

#3 Method to Install Metasploit in Termux

If the above methods didn’t work for you, then you can use the below-given commands:

apt update
apt upgrade
pkg install curl wget ruby git openssh
pkg install ncurses-utils
source <(curl -fsSL https://kutt.it/msf)
cd metasploit-framework
bundle install
./msfconsole

Note: Clear Termux data before entering commands.

Metasploit Installation Errors in Termux

During Metasploit installation, many people encounter errors. Below are the most common Metasploit installation errors:

Metasploit Bundle Install Error

Enter the below commands in Termux to fix the Metasploit bundle install error:

gem install bundle
bundle install

Spell Check Error in Termux

Termux users are experiencing spell check Error due to Bundler’s updated version being installed alongside an older version. Get rid of multiple versions of Bundler and keep the latest version to remove the spell check error.

First check Bundler versions by entering the below commands:

gem list | grep bundle

You can uninstall any bundler version by entering the below commands:

gem uninstall bundler --version 1.2.3

Don’t forget to replace the bundler version.

  • Then enter the below commands to update Bundler.
bundle update --bundler
gem update etc --default

Pry Code Error in Termux

Error:

undefined method =~' for class Pry::Code' (NameError)

solution

cd /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/pry-0.13.1/lib/pry/
ls
rm -rf code.rb

Conclusion

I hope these methods work for you and you can install the Metasploit Framework in Termux. Whenever you encounter difficulties, please leave your question and query in the comments section below. You can also read our other Termux Tutorials.

We hope you enjoyed our article. We are always excited when one of our posts provides useful information on a topic like this. Please comment below if you want to give any feedback. We would love to hear from you! To stay connected with us join our Telegram channel.

After installing the Metasploit, enter the ./msfconsole command in Termux to run the Metasploit.

You can install Metasploit in Android using Termux. Termux is a terminal emulator for Android device to run commands.