使用報錯
昨天MSF還正常使用,今天突然來個報錯。
Could not find rake-12.3.1 in any of the sources
Run `bundle install` to install missing gems.
按照指示運(yùn)行bundle install
撑蒜,缺失的gems安裝完成。但是依舊報相同的錯誤玄渗。
然后嘗試git fetch/msfupdate更新了一下座菠。
更新后仍然相同錯誤。
gem info cake
看到確實(shí)已經(jīng)安裝了對應(yīng)版本了藤树。查了一圈也沒解決浴滴。
于是決定重新安裝。我現(xiàn)在用的是直接從github clone下來的岁钓。決定換個方式安裝升略,使用安裝器。
重新安裝
下載
版本 | 下載地址 |
---|---|
最新的版本 | https://osx.metasploit.com/metasploitframework-latest.pkg |
安裝
運(yùn)行下載的pkg文件按照向?qū)е敢惭b屡限。
配置
macOS下Metasploit的可執(zhí)行文件的位置為:
/opt/metasploit-framework/bin
? tree /opt/metasploit-framework/bin
/opt/metasploit-framework/bin
├── msfbinscan
├── msfconsole
├── msfd
├── msfdb
├── msfelfscan
├── msfmachscan
├── msfpescan
├── msfremove
├── msfrop
├── msfrpc
├── msfrpcd
├── msfupdate
└── msfvenom
編輯~/.zshrc
文件:
注釋掉之前msf的配置品嚣,添加環(huán)境變量:
export PATH="$PATH:/opt/metasploit-framework/bin"
刷新zsh后生效。
執(zhí)行msfconsole進(jìn)行初始化配置:
? msfconsole
** Welcome to Metasploit Framework Initial Setup **
Please answer a few questions to get started.
Would you like to use and setup a new database (recommended)?
Please answer yes or no.
Would you like to use and setup a new database (recommended)? yes
Creating database at /Users/lanvnal/.msf4/db
Starting database at /Users/lanvnal/.msf4/db...success
Creating database users
Writing client authentication configuration file /Users/lanvnal/.msf4/db/pg_hba.conf
Stopping database at /Users/lanvnal/.msf4/db
Starting database at /Users/lanvnal/.msf4/db...success
Creating initial database schema
[?] Initial MSF web service account username? [lanvnal]: xxx
[?] Initial MSF web service account password? (Leave blank for random password):
Generating SSL key and certificate for MSF web service
Attempting to start MSF web service...success
MSF web service started and online
Creating MSF web service user msf
############################################################
## MSF Web Service Credentials ##
## ##
## Please store these credentials securely. ##
## You will need them to connect to the webservice. ##
############################################################
MSF web service username: xxx
MSF web service password: xxx
MSF web service user API token: xxxxxx
MSF web service configuration complete
The web service has been configured as your default data service in msfconsole with the name "local-https-data-service"
If needed, manually reconnect to the data service in msfconsole using the command:
db_connect --token 283adf2496b28811eb4630b82f8b4573d04cc67bc86069b6540f76560d3f226de5f442787e613033 --cert /Users/lanvnal/.msf4/msf-ws-cert.pem --skip-verify https://localhost:5443
The username and password are credentials for the API account:
https://localhost:5443/api/v1/auth/account
** Metasploit Framework Initial Setup Complete **
.;lxO0KXXXK0Oxl:.
,o0WMMMMMMMMMMMMMMMMMMKd,
'xNMMMMMMMMMMMMMMMMMMMMMMMMMWx,
:KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK:
.KMMMMMMMMMMMMMMMWNNNWMMMMMMMMMMMMMMMX,
lWMMMMMMMMMMMXd:.. ..;dKMMMMMMMMMMMMo
xMMMMMMMMMMWd. .oNMMMMMMMMMMk
oMMMMMMMMMMx. dMMMMMMMMMMx
.WMMMMMMMMM: :MMMMMMMMMM,
xMMMMMMMMMo lMMMMMMMMMO
NMMMMMMMMW ,cccccoMMMMMMMMMWlccccc;
MMMMMMMMMX ;KMMMMMMMMMMMMMMMMMMX:
NMMMMMMMMW. ;KMMMMMMMMMMMMMMX:
xMMMMMMMMMd ,0MMMMMMMMMMK;
.WMMMMMMMMMc 'OMMMMMM0,
lMMMMMMMMMMk. .kMMO'
dMMMMMMMMMMWd' ..
cWMMMMMMMMMMMNxc'. ##########
.0MMMMMMMMMMMMMMMMWc #+# #+#
;0MMMMMMMMMMMMMMMo. +:+
.dNMMMMMMMMMMMMo +#++:++#+
'oOWMMMMMMMMo +:+
.,cdkO0K; :+: :+:
:::::::+:
Metasploit
=[ metasploit v5.0.74-dev-6b48337f3d056543875d02d65ca954b2d307fba4]
+ -- --=[ 1966 exploits - 1095 auxiliary - 337 post ]
+ -- --=[ 558 payloads - 45 encoders - 10 nops ]
+ -- --=[ 7 evasion ]
msf5 > exit