Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Msf::Exploit::Remote::RDP mixin and refactor BlueKeep (CVE-2019-0708) scanner #12171

Merged
merged 7 commits into from
Aug 7, 2019

Conversation

TomSellers
Copy link
Contributor

@TomSellers TomSellers commented Aug 7, 2019

This PR is a WIP and refactors RDP protocol code into a Msf::Exploit::Remote mixin. The intent is for this to serve as a point of discussion during the process. If it reaches a usable state a new PR will be created against the current master branch.

This PR will be noisy as I iterate over the changes and address feedback.

Desired for #12170.

lib/msf/core/exploit/rdp.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@wvu wvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it, but this looks good enough from a code standpoint. Thanks for doing this!

Copy link
Contributor

@OJ OJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Tom :)

@wvu wvu self-assigned this Aug 7, 2019
@wvu
Copy link
Contributor

wvu commented Aug 7, 2019

Vuln Win7 SP1 x64 with NLA disabled

msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) > run

[*] 192.168.56.117:3389   - Verifying RDP protocol...
[*] 192.168.56.117:3389   - Attempting to connect using TLS security
[*] 192.168.56.117:3389   - Sending erect domain request
[*] 192.168.56.117:3389   - Sending client info PDU
[*] 192.168.56.117:3389   - Received License packet
[*] 192.168.56.117:3389   - Waiting for Server Demand packet
[*] 192.168.56.117:3389   - Received Server Demand packet
[*] 192.168.56.117:3389   - Sending client confirm active PDU
[*] 192.168.56.117:3389   - Sending client synchronize PDU
[*] 192.168.56.117:3389   - Sending client control cooperate PDU
[*] 192.168.56.117:3389   - Sending client control request control PDU
[*] 192.168.56.117:3389   - Sending client input sychronize PDU
[*] 192.168.56.117:3389   - Sending client font list PDU
[*] 192.168.56.117:3389   - Sending patch check payloads
[+] 192.168.56.117:3389   - The target is vulnerable.
[*] 192.168.56.117:3389   - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) >

Vuln Win7 SP1 x64 with NLA enabled

msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) > run

[*] 192.168.56.117:3389   - Verifying RDP protocol...
[*] 192.168.56.117:3389   - Attempting to connect using TLS security
[*] 192.168.56.117:3389   - Server requires NLA (CredSSP) security which mitigates this vulnerability.
[*] 192.168.56.117:3389   - The target is not exploitable.
[*] 192.168.56.117:3389   - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) >

Not vuln Win10 x64 with NLA disabled

msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) > run

[*] 192.168.56.112:3389   - Verifying RDP protocol...
[*] 192.168.56.112:3389   - Attempting to connect using TLS security
[*] 192.168.56.112:3389   - Sending erect domain request
[*] 192.168.56.112:3389   - Sending client info PDU
[*] 192.168.56.112:3389   - Received License packet
[*] 192.168.56.112:3389   - Waiting for Server Demand packet
[*] 192.168.56.112:3389   - Received Server Demand packet
[*] 192.168.56.112:3389   - Sending client confirm active PDU
[*] 192.168.56.112:3389   - Sending client synchronize PDU
[*] 192.168.56.112:3389   - Sending client control cooperate PDU
[*] 192.168.56.112:3389   - Sending client control request control PDU
[*] 192.168.56.112:3389   - Sending client input sychronize PDU
[*] 192.168.56.112:3389   - Sending client font list PDU
[*] 192.168.56.112:3389   - Sending patch check payloads
[*] 192.168.56.112:3389   - The target is not exploitable.
[*] 192.168.56.112:3389   - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) >

Not vuln Win10 x64 with NLA enabled

msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) > run

[*] 192.168.56.112:3389   - Verifying RDP protocol...
[*] 192.168.56.112:3389   - Attempting to connect using TLS security
[*] 192.168.56.112:3389   - Server requires NLA (CredSSP) security which mitigates this vulnerability.
[*] 192.168.56.112:3389   - The target is not exploitable.
[*] 192.168.56.112:3389   - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf5 auxiliary(scanner/rdp/cve_2019_0708_bluekeep) >

@wvu wvu merged commit 2d5e9cb into rapid7:master Aug 7, 2019
wvu added a commit that referenced this pull request Aug 7, 2019
@wvu
Copy link
Contributor

wvu commented Aug 7, 2019

Release Notes

The BlueKeep (CVE-2019-0708) scanner code has been moved into an Msf::Exploit::Remote::RDP mixin for consolidation and reuse.

msjenkins-r7 pushed a commit that referenced this pull request Aug 7, 2019
@TomSellers TomSellers deleted the rdp_library branch August 8, 2019 00:02
@wvu wvu changed the title [WIP] RDP: Refactor protocol code Add Msf::Exploit::Remote::RDP mixin and refactor BlueKeep (CVE-2019-0708) scanner Aug 8, 2019
@wvu wvu added the library label Aug 8, 2019
@tdoan-r7 tdoan-r7 added the rn-enhancement release notes enhancement label Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants