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 failure in secrets dump edge case #19665

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion modules/auxiliary/gather/windows_secrets_dump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,13 @@ def decrypt_supplemental_info(dcerpc_client, result, attribute_value)
result[:kerberos_keys] = []
result[:clear_text_passwords] = {}
plain_text = dcerpc_client.decrypt_attribute_value(attribute_value)
user_properties = RubySMB::Dcerpc::Samr::UserProperties.read(plain_text)
begin
user_properties = RubySMB::Dcerpc::Samr::UserProperties.read(plain_text)
rescue IOError
# May be no kerberos keys e.g. due to password reset
vprint_warning('Unable to read supplemental credentials')
return
end
user_properties.user_properties.each do |user_property|
case user_property.property_name.encode('utf-8')
when 'Primary:Kerberos-Newer-Keys'
Expand Down