Kali2017 Metasploit串連postgresql資料庫

來源:互聯網
上載者:User

標籤:roo   .com   資料   postgre   databases   exploit   adapter   kali   dap   

 

msfdb:msf資料庫管理命令

 

1、查看msf資料庫連接狀態

msf > db_status[*] postgresql selected, no connection    //未串連

 

2、msfdb命令

msf > msfdb      //msfdb可以在命令列直接使用[*] exec: msfdbManage a metasploit framework database  msfdb init    # initialize the database          //初始化資料庫  msfdb reinit  # delete and reinitialize the database  //清空配置重新初始化資料庫  msfdb delete  # delete database and stop using it    //刪除資料庫並停止使用  msfdb start   # start the database         //啟動資料庫  msfdb stop    # stop the database         //停止資料庫

 

3、初始化資料庫

msf > msfdb init[*] exec: msfdb initCreating database user ‘msf‘為新角色輸入的口令: 再輸入一遍: Creating databases ‘msf‘ and ‘msf_test‘Creating configuration file in /usr/share/metasploit-framework/config/database.ymlCreating initial database schema

 

4、查看msf資料庫設定檔

[email protected]:~# cat /usr/share/metasploit-framework/config/database.ymldevelopment:  adapter: postgresql  database: msf  username: msf  password: EUsDzzKRsyxvmwmPI+dZ2KF1rojkKeEKqNRvNbV7LdY=  host: localhost  port: 5432  pool: 5  timeout: 5production:  adapter: postgresql  database: msf  username: msf  password: EUsDzzKRsyxvmwmPI+dZ2KF1rojkKeEKqNRvNbV7LdY=  host: localhost  port: 5432  pool: 5  timeout: 5test:  adapter: postgresql  database: msf_test  username: msf  password: EUsDzzKRsyxvmwmPI+dZ2KF1rojkKeEKqNRvNbV7LdY=  host: localhost  port: 5432  pool: 5  timeout: 5

 

5、啟動或重啟msf

[email protected]:~# msfconsole                                                   ______________________________________________________________________________|                                                                              ||                          3Kom SuperHack II Logon                             ||______________________________________________________________________________||                                                                              ||                                                                              ||                                                                              ||                 User Name:          [   security    ]                        ||                                                                              ||                 Password:           [               ]                        ||                                                                              ||                                                                              ||                                                                              ||                                   [ OK ]                                     ||______________________________________________________________________________||                                                                              ||                                                       https://metasploit.com ||______________________________________________________________________________|       =[ metasploit v4.15.5-dev                          ]+ -- --=[ 1673 exploits - 959 auxiliary - 294 post        ]+ -- --=[ 489 payloads - 40 encoders - 9 nops             ]+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]msf > db_status[*] postgresql connected to msf

 

Kali2017 Metasploit串連postgresql資料庫

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.