kali Linux配置Metasploit Framework

启动Kali的PostgreSQL服务

Metasploit 使用PostgreSQL作为数据库,所以必须先运行它。

  1. service postgresql start

 

你可以用ss -ant的输出来检验PostgreSQL是否在运行,然后确认5432端口处于listening状态。

  1. State Recv-Q Send-Q Local Address:Port Peer Address:Port

  2. LISTEN 0 128 :::22 :::*/ L:

  3. LISTEN 0 128 *:22 *:*

  4. LISTEN 0 128 127.0.0.1:5432 *:*

  5. LISTEN 0 128 ::1:5432 :::*

 

启动Kali的Metasploit服务
随着PostgreSQL的启动和运行,接着我们要运行Metasploit服务。第一次运行服务会创建一个msf3数据库用户和一个叫msf3的数据库。还会运行Metasploit RPC和它需要的WEB 服务端。

  1. service metasploit start

 

在Kali运行msfconsole
现在PostgreSQL 和 Metasploit服务都运行了,可以运行 msfconsole,然后用 db_status 命令检验数据库的连通性。

  1. msfconsole

 

  1. msf > db_status

  2. [*] postgresql connected to msf3

  3. msf >

 

配置Metasploit随系统启动运行
如果你想PostgreSQL和Metasploit在开机时运行,你可以使用update-rc.d启用服务。

  1. update-rc.d postgresql enable

 

    1. update-rc.d metasploit enable

posted @ 2014-03-19 16:39  harry0906  Views(387)  Comments(0)    收藏  举报