Skip to content

Commit a9ab666

Browse files
authored
Merge pull request rapid7#19873 from adfoster-r7/remove-report-note-calls-from-vuln-cert-finder
Remove report note calls from vuln cert finder
2 parents 517bf54 + 0fefe06 commit a9ab666

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -543,21 +543,14 @@ def find_enrollable_vuln_certificate_templates
543543
ca_server_ip_address = get_ip_addresses_by_fqdn(ca_server_fqdn)&.first
544544

545545
if ca_server_ip_address
546-
service = report_service({
546+
report_service({
547547
host: ca_server_ip_address,
548548
port: 445,
549549
proto: 'tcp',
550550
name: 'AD CS',
551551
info: "AD CS CA name: #{ca_server[:name][0]}"
552552
})
553553

554-
report_note({
555-
data: ca_server[:dn][0].to_s,
556-
service: service,
557-
host: ca_server_ip_address,
558-
ntype: 'windows.ad.cs.ca.dn'
559-
})
560-
561554
report_host({
562555
host: ca_server_ip_address,
563556
name: ca_server_fqdn
@@ -618,7 +611,7 @@ def print_vulnerable_cert_info
618611
info = hash[:notes].select { |note| note.start_with?(prefix) }.map { |note| note.delete_prefix(prefix).strip }.join("\n")
619612
info = nil if info.blank?
620613

621-
hash[:ca_servers].each do |ca_fqdn, ca_server|
614+
hash[:ca_servers].each_value do |ca_server|
622615
service = report_service({
623616
host: ca_server[:ip_address],
624617
port: 445,
@@ -641,14 +634,6 @@ def print_vulnerable_cert_info
641634
else
642635
vuln = nil
643636
end
644-
645-
report_note({
646-
data: hash[:dn],
647-
service: service,
648-
host: ca_fqdn.to_s,
649-
ntype: 'windows.ad.cs.ca.template.dn',
650-
vuln_id: vuln&.id
651-
})
652637
end
653638
end
654639
end

0 commit comments

Comments
 (0)