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

Fix report_vuln/print_error in smb_ms17_010 #8255

Merged
merged 1 commit into from Apr 17, 2017
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
11 changes: 5 additions & 6 deletions modules/auxiliary/scanner/smb/smb_ms17_010.rb
Expand Up @@ -48,11 +48,10 @@ def run_host(ip)
if status == "STATUS_INSUFF_SERVER_RESOURCES"
print_warning("Host is likely VULNERABLE to MS17-010!")
report_vuln(
:host => rhost,
:port => rport,
:proto => 'tcp',
:sname => 'SMB',
:info => "Vulnerable to MS17-010",
host: ip,
name: self.name,
refs: self.references,
info: 'STATUS_INSUFF_SERVER_RESOURCES for FID 0 against IPC$'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to change this to something else, but this is what made the most sense to me, given that we're already reporting module title and references.

)
elsif status == "STATUS_ACCESS_DENIED" or status == "STATUS_INVALID_HANDLE"
# STATUS_ACCESS_DENIED (Windows 10) and STATUS_INVALID_HANDLE (others)
Expand All @@ -67,7 +66,7 @@ def run_host(ip)
rescue ::Rex::Proto::SMB::Exceptions::LoginError
print_error("An SMB Login Error occurred while connecting to the IPC$ tree.")
rescue ::Exception => e
print_error("#{e.class}: #{e.message}")
vprint_error("#{e.class}: #{e.message}")
ensure
disconnect
end
Expand Down