diff --git a/lib/msf/core/post/windows/ldap.rb b/lib/msf/core/post/windows/ldap.rb index 26f509a7bd..121465ca58 100644 --- a/lib/msf/core/post/windows/ldap.rb +++ b/lib/msf/core/post/windows/ldap.rb @@ -119,7 +119,7 @@ module LDAP bind_default_ldap_server(1) do |session_handle| print_status("Querying default naming context") - query_result = query_ldap(session_handle, "", 0, "(objectClass=*)", ["defaultNamingContext"]) + query_result = query_ldap(session_handle, "", 0, "(objectClass=computer)", ["defaultNamingContext"]) first_entry_fields = query_result[:results].first # Value from First Attribute of First Entry default_naming_context = first_entry_fields.first