公网服务器安装msf和CobaltStrike

cs安装:https://blog.csdn.net/qq_40624810/article/details/107572575

具体注意java环境的配置,不同的系统配置命令不同。

msf安装,我是参考这篇博客的:https://www.aqniu.com/vendor/50662.html

因为的vps也是CentOS的,各位安装还是要看好自己的操作系统版本。

1. 使用安装脚本安装MSF

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

权限:chmod 755 msfinstall

安装:./msfinstall

2. 测试安装完成的MSF

安装完成的MSF目录为/opt/metasploit-framework/
执行msfconsole查看MSF是否正常

> msfconsole

出现没有数据库支持警告,首先创建数据库连接配置文件

 

 

3. 初始化数据库

首先初始化数据库
> cd /opt/metasploit-framework/bin/
> ./msfdb
# 不能使用root来初始化数据库
Please run msfdb as a non-root user

# 创建账号用于初始化数据库
> useradd msf
> su msf
> ./msfdb
......
Commands:
init initialize the component
reinit delete and reinitialize the component
delete delete and stop the component
status check component status
start start the component
stop stop the component
restart restart the component
# 初始化数据库
> ./msfdb init
Creating database at /home/msf/.msf4/db
Starting database at /home/msf/.msf4/db...success
Creating database users
Writing client authentication configuration file /home/msf/.msf4/db/pg_hba.conf
Stopping database at /home/msf/.msf4/db
Starting database at /home/msf/.msf4/db...success
Creating initial database schema
......
# 创建完成后在msf用户目录会生成一个.msf目录里面会有一个database.yml文件
# 退出msf 账号 回到 root 账号下

> cp /home/msf/.msf4/database.yml /opt/metasploit-framework/embedded/framework/config/
cp:是否覆盖"/opt/metasploit-framework/embedded/framework/config/database.yml"? y

以上过程完成后,msf再次启动测试正常,数据库连接正常

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值