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

Add more password changing structures and calls #279

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

smashery
Copy link
Contributor

@smashery smashery commented Nov 20, 2024

Add structures for changing passwords. This is primarily to support rapid7/metasploit-framework#19666

@smashery smashery marked this pull request as ready for review November 20, 2024 04:28
@smcintyre-r7 smcintyre-r7 self-assigned this Nov 21, 2024
@smcintyre-r7 smcintyre-r7 added the DCERPC DCERPC related label Nov 21, 2024
Copy link
Contributor

@smcintyre-r7 smcintyre-r7 left a comment

Choose a reason for hiding this comment

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

Just a couple of minor comments. Over all this looks good so I'll start the testing with Metasploit.

lib/ruby_smb/dcerpc/samr.rb Show resolved Hide resolved
lib/ruby_smb/dcerpc/samr.rb Show resolved Hide resolved
@@ -14,7 +14,7 @@ class PsamprGetMembersBuffer < SamprGetMembersBuffer
extend Ndr::PointerClassPlugin
end

# [2.1.5.8.3 SamrGetMembersInGroup (Opnum 25)](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/a4adbf20-040f-4416-a960-e5b7917fdae7)
# [3.1.5.8.3 SamrGetMembersInGroup (Opnum 25)](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/a4adbf20-040f-4416-a960-e5b7917fdae7)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# [3.1.5.8.3 SamrGetMembersInGroup (Opnum 25)](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/a4adbf20-040f-4416-a960-e5b7917fdae7)
# [3.1.5.8.3 SamrGetMembersInGroup (Opnum 25)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/3ed5030d-88a3-42ca-a6e0-8c12aa2fdfbd)

I think the URL here is wrong too.

@cdelafuente-r7
Copy link
Contributor

Thanks @smashery! Do you think it would be possible to add specs for these new DCERPC structures?

Copy link
Contributor

@smcintyre-r7 smcintyre-r7 left a comment

Choose a reason for hiding this comment

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

Tested with the new Metasploit Framework module and things are all looking good so I'll get this landed.

metasploit-framework.pr (S:0 J:0) auxiliary(admin/smb/change_password) > run
[*] Running module against 192.168.159.10

[*] 192.168.159.10:445 - Changing password
[*] 192.168.159.10:445 - Connecting to Security Account Manager (SAM) Remote Protocol
[*] 192.168.159.10:445 - Binding to \samr...
[+] 192.168.159.10:445 - Bound to \samr
[+] 192.168.159.10:445 - Successfully changed password for smcintyre
[*] Auxiliary module execution completed
metasploit-framework.pr (S:0 J:0) auxiliary(admin/smb/change_password) > 

@smcintyre-r7 smcintyre-r7 merged commit c29e6d2 into rapid7:master Dec 6, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DCERPC DCERPC related
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants