Install Metasploit Framework In Termux

It’s easy to install Metasploit framework in Termux, all you need to do is follow step by step guide. There are various methods of installing the Metasploit framework in your termux. Lets first understand some concepts of Metasploit.

What is the Metasploit framework

Introduction To Metasploit

Metasploit Framework is an open-source tool written in ruby especially for penetration testers, ethical hackers and security researchers to develop payloads, exploits and validate vulnerabilities.

It was originally started as a network security game by four developers.

Metasploit is considered as the best security auditing and penetration testing tool between the pen-testers.

Why Metasploit Framework?

Uses of Metasploit framework

  • It provides end to end framework for penetration testing.
  • Information Gathering
  • Vulnerability analysis
  • Pre and post-exploitation
  • Exploit development

Basic Terminologies

Vulnerability – It can be defined as a weakness in a system that can be used to compromise the security of a system.

Payload – A piece of code that is executed through a given exploit.

TCP Shell – Opens a vulnerable listening port in target machine.

Reverse TCP – Used to connect the target machine with the attacker machine through listening port of the attacker machine.

Modules of Metasploit Framework.

Exploits – Code that allows the attacker to take advantage of a vulnerability.

Encoders – Used to bypass firewalls and antivirus software.

NOPS (No Operation) – Maintains the stability of payload by keeping payload size consistent.

Auxilary – Used to provide additional functionality like scanning and fuzzing.

Methods to install Metasploit Framework in Termux

Method 1

  1. Install termux and type ”termux-setup-storage”.
  2. Now we need to install some basic termux packages to get started.
  3. Go to the and copy this link.
  4. Open Termux terminal and after typing ”git clone” paste the above-copied URL from GitHub and press enter.
  5. Press ”Y” when asked for installing packages.
  6. Type ”pkg install unstable-repo
  7. Then ”pkg install Metasploit
  8. Again type ”pkg install ruby” just in case if ruby had older version make sure you update it.
  9. Type ” gem install bigdecimal -v 1.4.3
  10. Now carefully type the following command ”export LD_PRELOAD = $ LD_PRELOAD: $ PREFIX / lib / ruby ​​/ gems / 2.6.0 / gems / bigdecimal-1.4.3 / ext / bigdecimal /
  11. Type ”msfconsole” to launch metasploit framework.

Method 2

This is the easiest method to install Metasploit framework in your termux.

  1. Download and install Termux in your android smartphone.
  2. Type ”termux-setup-storage
  3. Type ”pkg install git” and press enter.
  4. Go to the and copy this link.
  5. Open Termux terminal and after typing ”git clone” paste the above-copied URL from GitHub and press enter.
  6. Press ”Y” when asked for installing packages.
  7. After installing all the packages type ”pkg install unstable-repo” and press enter and wait for process completion.
  8. Type ”pkg install metasploit” and press enter.
  9. The installation process will take several minutes to install, make sure you have a stable internet connection.
  10. The last step is to type ”msfconsole” and wait for Metasploit to start.
Make Sure to watch the full video for the proper installation of the Metasploit framework.

Useful Metasploit Commands

Adding a new workspace in Metasploit: msf -a Workspacename

Connection to remote clients: msfd -h

Manage MSF database: msfdb -h’

Connects to an RPC instance of Metasploit: msfrpc -h

Provides an RPC interface to Metasploi: msfrpcd -h

Leave a Reply