-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Make the DomainControllerRhost optional #18446
Make the DomainControllerRhost optional #18446
Conversation
Similar trickery is needed to do wmiexec over NATs w Rex (old prototype code I have to materialize at some point), back then my resolver stuff was manually hacked in (incorrectly) at various layers of dcerpc to facilitate this but now that we've got things wired seemingly correctly it might be worth revisiting that effort (likely in the new smb lib). Thanks man |
@@ -213,7 +231,7 @@ def authenticate(options = {}) | |||
) | |||
end | |||
if options[:credential] | |||
print_status("#{peer} - Using cached credential for #{options[:credential].server} #{options[:credential].client}") | |||
print_status("Using cached credential for #{options[:credential].server} #{options[:credential].client}") |
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 removed the #{peer} -
prefix from these messages about using cached credentials because they could occur before a connection was made meaning that the peer host may not have been populated leading to :88 -
being used. Since communication doesn't always occur when using a cached credential, it doesn't make much sense to print the peer information anyways.
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.
You know... now that we have intrinsic name lookup facilities in our socket library, maybe we could start treating valid hostnames as peers?
@@ -183,6 +184,23 @@ def rport | |||
port | |||
end | |||
|
|||
def connect(options = {}) |
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.
Placeholder comment: For something like a kerberos smb login bruteforcer, will this end making hundreds of DNS requests
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.
CachedResolver
doesn't care how many requests you make, so long as you're within the record's TTL (or create a static entry after the first lookup in the brute mixin) it'll pull from the cache.
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.
Yeah I was thinking that caching should be the resolvers responsibility if it needs to be implemented.
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.
Changes look good and testing was as expected. Nice work! 🚀
Please excuse my fatfinger closure of this PR 🙈 |
c855c56
to
f000c39
Compare
Double checked everything was working as expected after landing the rex-socket PR and building the new gem 👍 landing now.
|
Release NotesThis PR makes the DomainControllerRhost option optional, even when the authentication mode is set to Kerberos. It does so by looking up the Kerberos server using the SRV records that Active Directory publishes by default for the specified realm. |
This makes the
DomainControllerRhost
option optional, even when the authentication mode is set to Kerberos. It does so by looking up the Kerberos server using the SRV records that Active Directory publishes by default for the specified realm. This means the user does not need to set this option if they don't want to. This requires the changes from rapid7/rex-socket#64.Verification
msfconsole
use exploit/windows/smb/psexec
Example
The
VERBOSE
datastore option is on so the user can see the additional messages.