Introduction
metasploitHelper is meant to assist penetration testers in network penetration tests.
metasploitHelper (msfHelper) communicates with Metasploit via msrpc. It uses both port and web-related exploits from Metasploit.
You can point msfHelper at an IP address/Nmap XML file/File containing a list of Ip addresses.
First, it performs a Nmap scan of the target host(s) and then attempts to find compatible and possible Metasploit modules based on 1) nmap service banner and 2) service name and run them against the targets.
Please see the slides for more information regarding the tool as well as the video demo.
It is also possible to use the -m option in msfHelper along with msfconsole (load msgrpc Pass=xxx) if you would like to interact with the targets that msfHelper had compromised.
msfHelper by default only test ports which were found in Metasploit modules. If you would like to scan all ports, please use the -a option.
Requirements
On Kali Linux 2016.2 VM
Usage
Sample Usage Examples
Use the intelligent mode and scan/test the target IP :
python msfHelper.py 192.168.1.6 -i
Specify the ports to be tested :
python msfHelper.py 192.168.1.6 -i -p 21,5432
Run Metasploit modules that match the port number :
python msfHelper.py 192.168.1.6 -i -e ports
Scan and test all ports on the target host :
python msfHelper.py 192.168.1.6 -i -a
Enable verbose mode (see results from Metasploit modules :
python msfHelper.py 192.168.1.6 -i -v
Run msfHelper and interact with the shells :
#on the first terminal window $ msfconsole $ load msgrpc Pass=xxxxx #on the second terminal window python msfHelper.py 192.168.1.6 -i -m -P xxxxx
As Nmap sometimes is unable to fingerprint the target port accurately, you might want to use the –info option to retrieve information from speedguide (google cache) as to what applications typically use the port :
python msfHelper.py 192.168.1.6 -i --info
Do not run Metasploit modules. Only run exploit-db detection :
python msfHelper.py 192.168.1.6 -e exploitdb
Run “port” based detection :
python msfHelper.py 192.168.1.6 -i -e ports
Run “services” based detection :
python msfHelper.py 192.168.1.6 -i -e services
Run “web” based detection :
python msfHelper.py 192.168.1.6 -i -e web
Slides for Black Hat Asia 2017: https://goo.gl/pSUgnc
Demo
Source: https://github.com/milo2012/