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

Rescue EOFError in cve_2019_0708_bluekeep get_once #12152

Merged
merged 3 commits into from Aug 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb
Expand Up @@ -207,7 +207,11 @@ def check_for_patch
rdp_send(x64_packet)

# Quick check for the Ultimatum PDU
res = sock.get_once(-1, 1)
begin
res = sock.get_once(-1, 1)
rescue EOFError
# we don't care
end
return Exploit::CheckCode::Vulnerable if res && res.include?(["0300000902f0802180"].pack("H*"))

# Slow check for Ultimatum PDU. If it doesn't respond in a timely
Expand Down Expand Up @@ -396,6 +400,8 @@ def rdp_recv
raise RdpCommunicationError unless res # nil due to a timeout

res
rescue EOFError
raise RdpCommunicationError
end

def rdp_send_recv(data)
Expand Down