-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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 dcerpc hidden scanner #16016
Fix dcerpc hidden scanner #16016
Conversation
@@ -3,6 +3,8 @@ | |||
# Current source: https://github.com/rapid7/metasploit-framework | |||
## | |||
|
|||
require 'English' | |||
require 'English' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am unclear why rubocop added double English.....?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. rubocop
doesn't complain when both are removed.
$ rubocop modules/auxiliary/scanner/dcerpc/hidden.rb
Inspecting 1 file
W
Offenses:
modules/auxiliary/scanner/dcerpc/hidden.rb:76:11: W: Lint/UselessAssignment: Useless assignment to variable - res.
res = dcerpc.call(0, NDR.long(0) * 128)
^^^
modules/auxiliary/scanner/dcerpc/hidden.rb:84:9: W: Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
rescue ::Exception => e ...
^^^^^^^^^^^^^^^^^^^^^^^
modules/auxiliary/scanner/dcerpc/hidden.rb:114:3: W: Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
rescue ::Exception => e ...
^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 3 offenses detected
20e03f5
to
f17d460
Compare
Confirm that this was broken when RHOSTS scanning came in. I monkeyed around it at some point to get it to work on engagement - something gross was done 😄. Thank you for fixing this. |
Changes look good to me, and the Output of module run on `master`
Output of module run after fix
|
Release NotesThis fixes an issue in the |
This is a fix for a bug brought up in the pentest huddle. It turns out that this module did not originally have an RHOST value. I think what happened was that later in changes to RHOST and RHOSTS, RHOST became synonymous with RHOSTS, so the original removal of RHOST as a value then took out RHOSTS.
This change just takes out the RHOST removal and pulls out only RPORT, which is populated by talking to the RPC service.
This is a one-line change- to make life easier, I separated the actual fix from the rubocop fixes into two different commits.
For testing, it is as simple as:
use use auxiliary/scanner/dcerpc/hidden
show options
set RHOST <ip>
run
set RHOSTS <ip>
I had little luck targeting workstations, but lots of luck targeting servers. Specifically, the best target for me was a Server 2016 VM running exchange:
Wall of Text