溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Debian8添加kali源并安裝metasploit

發(fā)布時間:2020-04-11 13:25:09 來源:網(wǎng)絡(luò) 閱讀:11457 作者:sunlinyao1993 欄目:數(shù)據(jù)庫

應(yīng)朋友需求,他要在vps上面安裝metasploit,因為kali2.0 是基于debian8的,所以我建議他使用debian8。但是他說使用debian8 添加kali源,更新時出現(xiàn)404 Not Found錯誤。于是乎,我就親自嘗試了一下。

先看一下環(huán)境

root@localhost:~# cat /etc/issue.net && uname -a
Debian GNU/Linux 8
Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux


  • 在/etc/apt/sources.list添加kali源:

root@localhost:~# cat >> /etc/apt/sources.list << EOF
#Kali Source
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
EOF
root@localhost:~# apt-get update

##如果出現(xiàn)GPG error,參考這里

##注意,有的網(wǎng)站的教程,kali-rolling這個位置使用kali或者sana。這個位置表示發(fā)行代號。我去官方源站點中看了一下,并沒有kali這個代號,而且官方網(wǎng)站已經(jīng)停止對sana源的支持,推薦使用20161月推出的kali-rolling代號,這也應(yīng)該是我朋友上面的404 錯誤的原因。以后讀到這篇文章的小伙伴,出現(xiàn)404錯誤的話,記得注意一下你的發(fā)行代號是否已經(jīng)沒有或者停止支持了。


后面的部分就和其它網(wǎng)站上的教程如出一轍了

  • 安裝postgresql數(shù)據(jù)庫

root@localhost:~# apt-get install postgresql
root@localhost:~# su - postgres -c "psql"              #切換到postgres用戶并登陸數(shù)據(jù)庫
##有的教程中使sudo -u postgres psql也是可以的
postgres=# alter user postgres with password 'postgrespass';   #修改數(shù)據(jù)庫密碼為postgrespass
postgres=# \q           #退出數(shù)據(jù)庫


  •  安裝metasploit

root@localhost:~# apt-get install metasploit-framework

# 這里會裝一大堆東西,而且會更新libc之類軟件,如果你的系統(tǒng)還裝有其它軟件,請謹慎安裝


  • 配置metasploit

root@localhost:~# msconfig
msf > db_connect postgres:postgrespass@127.0.0.1/msfbook    #使msf連接到postgresql數(shù)據(jù)庫
[*] Rebuilding the module cache in the background...      #這句話的意思是在后臺重建模塊緩存。
msf > db_status                #查看數(shù)據(jù)庫連接狀態(tài)
[*] postgresql connected to msfbook       #這個時候就可以正常使用msf了。

msf > search smb
[!] Module database cache not built yet, using slow search
##如果出現(xiàn)了這個信息,意思是說數(shù)據(jù)庫中沒有模塊的緩存,使用緩慢的搜索(直接搜索磁盤)。
##出現(xiàn)這個情況有可能是后臺重建緩存未完成,只需稍等片刻再嘗試,也可能是數(shù)據(jù)庫連接不正常,
##導(dǎo)致無法重建/讀取緩存。



向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI