[工具使用] 运行 Metasploit Framework

519 0
Honkers 2026-2-3 01:38:57 来自手机 | 显示全部楼层 |阅读模式

依照 Kali Linux 网络服务策略,
Kali 没有自动启动的网络服务,
包括数据库服务在内。
所以为了让 Metasploit 以支持数据库的方式运行有些必要的步骤。
启动 Kali 的 PostgreSQL 服务
Metasploit 使用 PostgreSQL 作为数据库,所以必须先运行它。
service postgresql start
你可以用 ss -ant 的输出来检验 PostgreSQL 是否在运行,然后确认 5432 端口处
于 listening 状态。
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 ::22 ::*
:
:
LISTEN 0 128 *:22 *:*
LISTEN 0 128 127.0.0.1:5432 *:*
LISTEN 0 128 :
:1:5432 ::*
:

启动 Kali 的 Metasploit 服务
随着 PostgreSQL 的启动和运行,接着我们要运行 Metasploit 服务。第一次运行
服务会创建一个 msf3 数据库用户和一个叫 msf3 的数据库。
还会运行 Metasploit
RPC 和它需要的 WEB 服务端。
service metasploit start
在 Kali 运行 msfconsole
现在 PostgreSQL 和 Metasploit 服务都运行了,可以运行 msfconsole ,然后
用 db_status 命令检验数据库的连通性。
msfconsole
msf > db_status
  • postgresql connected to msf3
    msf >
    配置 Metasploit 随系统启动运行
    如果你想 PostgreSQL 和 Metasploit 在开机时运行,
    你可以使用 update-rc.d 启用服务。
    update-rc.d postgresql enable
    update-rc.d metasploit enable
  • 您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    中国红客联盟公众号

    联系站长QQ:5520533

    admin@chnhonker.com
    Copyright © 2001-2026 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行