Debian 8添加kali更新源并安装metasploit

2023-03-13,,

一、Debian 8添加kali更新源

中科大kali更新源:

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib  

1、通过vim或者可视化文本编辑器将以上更新源添加到"/etc/apt/sources.list"文件中 2、执行命令更新可安装列表

# apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
# apt-get update

至此,kali更新源添加成功

二、安装postgresql数据库

# apt-get install postgresql
# su - postgres -c "psql"      #切换到postgres数据库并登录数据库
postgres=# alter user postgres with password 'zxcv'; #修改postgres用户的密码为'zxcv'
postgres=# \q     #退出数据库

三、安装metasploit-framework

# apt-get install metasploit-framework

这里静静等候安装完成

四、配置metasploit

# msconfig
msf > db_connect postgres:zxcv@127.0.0.1/msfbook    #使msf连接到postgresql数据库
Rebuilding the module cache in the background...      #这句话的意思是在后台重建模块缓存。
msf > db_status                #查看数据库连接状态
postgresql connected to msfbook       #这个时候就可以正常使用msf了。
msf > search smb
[!] Module database cache not built yet, using slow search

##如果出现了这个信息,意思是说数据库中没有模块的缓存,使用缓慢的搜索(直接搜索磁盘)。 ##出现这个情况有可能是后台重建缓存未完成,只需稍等片刻再尝试,也可能是数据库连接不正常, ##导致无法重建/读取缓存。

或者采用自动化安装,执行以下三条命令

curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
chmod 755 msfinstall
./msfinstall  

Debian 8添加kali更新源并安装metasploit的相关教程结束。

《Debian 8添加kali更新源并安装metasploit.doc》

下载本文的Word格式文档,以方便收藏与打印。