Skip to content

Commit 389e8af

Browse files
committed
Add additional common SIDs
1 parent 2e84217 commit 389e8af

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,17 @@ def query_ldap_server_certificates(esc_raw_filter, esc_id, notes: [])
218218
def map_sids_to_names(sids_array)
219219
mapped = []
220220
sids_array.each do |sid|
221-
# this common SID doesn't always have an entry
222-
if sid == Rex::Proto::Secauthz::WellKnownSids::SECURITY_AUTHENTICATED_USER_SID
221+
# these common SIDs don't always have an entry
222+
case sid
223+
when Rex::Proto::Secauthz::WellKnownSids::SECURITY_AUTHENTICATED_USER_SID
223224
mapped << SID.new(sid, 'Authenticated Users')
224225
next
226+
when Rex::Proto::Secauthz::WellKnownSids::SECURITY_ENTERPRISE_CONTROLLERS_SID
227+
mapped << SID.new(sid, 'Enterprise Domain Controllers')
228+
next
229+
when Rex::Proto::Secauthz::WellKnownSids::SECURITY_LOCAL_SYSTEM_SID
230+
mapped << SID.new(sid, 'Local System')
231+
next
225232
end
226233

227234
sid_entry = get_object_by_sid(sid)

0 commit comments

Comments
 (0)