Skip to content

Commit b459d1a

Browse files
committed
Updated CA datastore option definition
1 parent c619960 commit b459d1a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def initialize(info = {})
9797
OptString.new('BASE_DN', [false, 'LDAP base DN if you already have it']),
9898
OptEnum.new('REPORT', [true, 'What templates to report (applies filtering to results)', 'vulnerable-and-published', %w[all published enrollable vulnerable vulnerable-and-published vulnerable-and-enrollable]]),
9999
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-
OptString.new('CA', [true, 'The name of the Certificate Authority you wish to preform the registry checks on'], conditions: %w[RUN_REGISTRY_CHECKS == true]),
100+
OptString.new('CA', [false, 'The name of the Certificate Authority you wish to preform the registry checks on'], conditions: %w[RUN_REGISTRY_CHECKS == true]),
101101
OptInt.new('TIMEOUT', [false, 'The WinRM timeout when running registry checks', 20], conditions: %w[RUN_REGISTRY_CHECKS == true]),
102102
])
103103
end
@@ -386,15 +386,13 @@ def query_dc_reg_values(ca_ip_address, domain, user)
386386
query_ca_reg_values(ca_ip_address, domain, user)
387387
end
388388

389-
# Query registry values directly from the CA
390389
def query_ca_reg_values(ca_ip_address, domain, user)
391390
conn = create_winrm_connection(ca_ip_address, domain, user, datastore['TIMEOUT'])
392391
conn.shell(:powershell) do |shell|
393392
@registry_values.merge!(query_ca_policy_values(shell))
394393
end
395394
end
396395

397-
# Enumerate registry values for the module
398396
def enum_registry_values
399397
@registry_values ||= {}
400398
domain = adds_get_domain_info(@ldap)[:dns_name]

0 commit comments

Comments
 (0)