Skip to content

Commit

Permalink
Update lib/msf/core/exploit/remote/ms_icpr.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Spencer McIntyre <[email protected]>
  • Loading branch information
jheysel-r7 and smcintyre-r7 authored Jan 16, 2025
1 parent 42abf6b commit b5a116f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/msf/core/exploit/remote/ms_icpr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,13 @@ def do_request_cert(icpr, opts)

return unless response[:certificate]

if (policy_oids = get_cert_policy_oids(response[:certificate])).empty?
if application_policies.present?
print_error('Certificate application policy OIDs were submitted, but none were found in the response. This indicates the target has received the patch for ESC15 (CVE-2024-49019)')
return
end
else
policy_oids = get_cert_policy_oids(response[:certificate])
if application_policies.present? && !(application_policies - policy_oids.map(&:value)).empty?
print_error('Certificate application policy OIDs were submitted, but some are missing in the response. This indicates the target has received the patch for ESC15 (CVE-2024-49019).')
return
end

if policy_oids
print_status('Certificate Policies:')
policy_oids.each do |oid|
print_status(" * #{oid.value}" + (oid.label.present? ? " (#{oid.label})" : ''))
Expand Down

0 comments on commit b5a116f

Please sign in to comment.