September 26, 2021

How to create metasploit payload easily using Linux and Termux



 Metasploit framework is a well known framework which is mostly used for penetration testing, especially for exploit execution on target machine.

To create a payload in metasploit, we need to manually create a payload by typing long command which is time consuming. So there are some plenty automated tools to create payload in easy way but the problem is many tools only works on Linux or sometime works on Termux. To overcome this issue, there is a tool which can create payload easily and works perfectly on both Linux & Termux. In this post we are going to use a python based tool called 'Paybag' to create payloads.


  • Features of Paybag -


1) Simple and easy to use.

2) Works on both Linux & Termux.

3) Can start listener directly from tool. 

4) For Termux users, if you haven't Metasploit, it will download automatically on your system.

5) If you don't know about LHOST, you can select it from table.


  • Installation -


1. For Linux users -

1) sudo apt-get install python3 python3-pip net-tools

2) git clone https://github.com/Deadpool2000/Paybag.git

3) cd Paybag

4) sudo pip3 install -r requirements.txt

5) python3 paybag.py 


2. For Termux users -

1) apt install python wget

2) git clone https://github.com/Deadpool2000/Paybag.git

3) cd Paybag

4) pip install -r requirements.txt

5) python paybag.py 



  • Usage -


After running this tool, you will get following options -


1) Create a payload


Create a payload by just giving LHOST and LPORT and send it to victim.


All payloads will store in 'payload' folder.


2) Start Listner


After creating payload, just send it to victim & execute it on victim machine. Then select 'Start Listner' and select LHOST from table and enter LPORT which used while creating payload. After this, just wait until you get a successful connection.


3) Launch Metasploit


Using this option, you can launch metasploit directly from the tool.


That's it !


If you have any problem regarding this, leave a comment !


Share this post to your friends -


Also read - How to install Metasploit on Windows 10


0 comments:

Post a Comment

If you have any problem regrading this post, leave a comment !