时代新威网络安全实验室

  • 首页
  • 安全资讯
  • 安全服务
    • 渗透测试
    • 攻防演习
    • 安全咨询
    • 代码审查
    • 应急响应
    • 安全培训
  • 知识分享
  • 内部资源
    • 信息搜集
    • 漏洞发现
    • 漏洞利用
    • 权限维持
    • 密码爆破
    • 内网渗透
    • APT
    • 安全竞赛
    • 2021HW
  • 关于我们
  • 登录与注册
    • 登录
    • 注册
Kratos
一款专注于用户阅读体验的响应式博客主题
  1. 首页
  2. 知识分享
  3. 正文

Kali linux中加载github.com中metasploit-framework新脚本

2020年9月18日 416点热度 0人点赞 0条评论

Kali linux中加载github.com中metasploit-framework新脚本

在使用metasploit-framework过程中,有时在github.com中新增了msf脚本,但是kali中的metasploit-framework脚本通过常规更新无法及时加载这些新出现的msf脚本,这时就需要将脚本下载到本地加载。于是就有了这篇文章。

以CVE-2020-16875为例

  1. 找到github.com中的CVE-2020-16875项目漏洞地址,查看脚本位置

https://github.com/rapid7/metasploit-framework/pull/14126/

  1. 根据查到的脚本位置,找到脚本

双击“code”进入代码页面

依次进入modules/exploits/windows/http,找到exchange_ecp_dlp_policy.rb,双击。

点击“raw”查看源码

https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/windows/http/exchange_ecp_dlp_policy.rb

  1. 将github上的exchange_ecp_dlp_policy.rb拷贝到kali linux中

在kali linux中,将example.rb模板拷贝到/usr/share/metasploit-framework/modules/exploits/windows/http下,并改名为exchange_ecp_dlp_policy.rb:

cp /usr/share/metasploit-framework/modules/exploits/example.rb /usr/share/metasploit-framework/modules/exploits/windows/http/exchange_ecp_dlp_policy.rb

复制https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/windows/http/exchange_ecp_dlp_policy.rb中的内容,通过编辑器VI替换掉exchange_ecp_dlp_policy.rb(example.rb)的内容。

赋予exchange_ecp_dlp_policy.rb权限

chmod 755 exchange_ecp_dlp_policy.rb

  1. 将说明文档的内容加到kali linux中

在“code”网页,找到documentation页面,分别进入exchange_ecp_dlp_policy.rb对应的路径documentation/modules/exploit/windows/http,找到说明文档exchange_ecp_dlp_policy.md

找到它的源码链接地址:

https://raw.githubusercontent.com/rapid7/metasploit-framework/master/documentation/modules/exploit/windows/http/exchange_ecp_dlp_policy.md

在kali linux中,将exchange_ecp_dlp_policy.md下载下来

wget https://raw.githubusercontent.com/rapid7/metasploit-framework/master/documentation/modules/exploit/windows/http/exchange_ecp_dlp_policy.md

然后将它拷贝到/usr/share/metasploit-framework/documentation/modules/exploit/windows/http目录下:

cp exchange_ecp_dlp_policy.md /usr/share/metasploit-framework/documentation/modules/exploit/windows/http/

  1. 打开msfconsole,并加载 exchange_ecp_dlp_policy.rb

root@kali:/# msfconsole

msf5 > reload_all

调用exchange_ecp_dlp_policy.rb

msf5 > search exchange_ecp_dlp_policy

sf5 > use exploit/windows/http/exchange_ecp_dlp_policy

[*] Using configured payload windows/x64/meterpreter/reverse_https

msf5 exploit(windows/http/exchange_ecp_dlp_policy) > show options

至此 exchange_ecp_dlp_policy.rb加载完全加载到kali linux中。

标签: 暂无
最后更新:2020年9月18日

powertimeauthorhgq

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

COPYRIGHT © 2022 时代新威网络安全实验室. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang