-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Refactor smb lookupsid module #19170
Refactor smb lookupsid module #19170
Conversation
7b22cd7
to
af8a18a
Compare
|
||
# Brute force through a common RID range | ||
min_rid.upto(max_rid) do |rid| | ||
print "%bld%blu[*]%clr Trying RID #{rid} / #{max_rid}\r" |
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.
Potentially we have a library we can use here.
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.
It should probably be behind verbose printing logic
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.
Well when I run it with the default MinRID and MaxRID options, it takes a few minutes to finish against my DC. If this weren't printed, there wouldn't be anything displayed and it would appear as though the module had hung.
9f07444
to
3158074
Compare
24a548f
to
6911c35
Compare
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 fixed a couple of error classes that weren't renamed in 2c561b5 and landed the RubySMB side of things. All that should be left to do is revert the Gemfile changes and bump to ruby_smb 3.3.8. Thanks for all of your work on this!
2c561b5
to
638ad36
Compare
Will land since Spencer's approved 👍 |
Release NotesFixes the |
This PR fixes the smb_lookupsid module hanging with 'STATUS_PENDING' when running vs. Samba in a Docker container. This is similar to #19053
This PR requires the changes from: rapid7/ruby_smb#267
This PR:
connect_ipc
method into an MsIpc mixin. This code would have been copy-pasta'd three times with the changes in this PR otherwise.disconnect_ipc
method that can be called during cleaupBefore
After
Verification
msfconsole
use smb_login
use smb_lookupsid
use smb_login
use smb_lookupsid