You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb
+39-39Lines changed: 39 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -95,11 +95,12 @@ def initialize(info = {})
95
95
96
96
register_options([
97
97
OptString.new('BASE_DN',[false,'LDAP base DN if you already have it']),
98
-
OptEnum.new('REPORT',[true,'What templates to report (applies filtering to results)','all',['all','vulnerable-and-enrollable']]),
98
+
OptEnum.new('REPORT',[true,'What templates to report (applies filtering to results)','all',%w[allvulnerablevulnerable-and-publishedvulnerable-and-enrollable]]),
99
99
OptBool.new('RUN_REGISTRY_CHECKS',[true,'Authenticate to WinRM to query the registry values to enhance reporting for ESC9, ESC10 and ESC16. Must be a privileged user in order to query successfully',false]),
100
100
])
101
101
end
102
102
103
+
# TODO: Spencer to check all of these are still used and shouldn't be moved
print_good(" Vulnerable to: #{techniques.join(', ')}")
812
817
else
813
-
print_good(" Vulnerable to: #{(techniques - %w[ESC9ESC10]).join(', ')}")
814
-
iftechniques.include?('ESC9')
815
-
print_warning(' Potentially vulnerable to: ESC9 (the template is in a vulnerable configuration but in order to exploit registry key StrongCertificateBindingEnforcement must not be set to 2)')
816
-
end
817
-
iftechniques.include?('ESC10')
818
-
print_warning(' Potentially vulnerable to: ESC10 (the template is in a vulnerable configuration but in order to exploit registry key StrongCertificateBindingEnforcement must be set to 0 or CertificateMappingMethods must be set to 4)')
819
-
end
818
+
print_status(' Vulnerable to: (none)')
819
+
end
820
+
821
+
ifpotential_techniques.include?('ESC9')
822
+
print_warning(' Potentially vulnerable to: ESC9 (the template is in a vulnerable configuration but in order to exploit registry key StrongCertificateBindingEnforcement must not be set to 2)')
823
+
end
824
+
ifpotential_techniques.include?('ESC10')
825
+
print_warning(' Potentially vulnerable to: ESC10 (the template is in a vulnerable configuration but in order to exploit registry key StrongCertificateBindingEnforcement must be set to 0 or CertificateMappingMethods must be set to 4)')
0 commit comments