Remove check for '.' in domain name for dcsync

The code in dcsync was checking to make sure that the domain name provided either by the user or by the result of an API call was an FQDN. To do this, it was checking that a period ('.') was present in the name. Often FQDNs contain periods, however I was on a gig recently that had at least one domain that did not have a period in the FQDN, and as a result the calls to dcsync were failing.

This PR updates mimikatz so that it no longer checks for the period in the FQDN, and assumes that the user knows what they're doing!
This commit is contained in:
OJ 2018-05-04 17:20:38 +10:00
parent c8cb4111d7
commit 0f8620b080
No known key found for this signature in database
GPG Key ID: D5DC61FB93260597

View File

@ -44,7 +44,9 @@ NTSTATUS kuhl_m_lsadump_dcsync(int argc, wchar_t * argv[])
if(kull_m_net_getCurrentDomainInfo(&pPolicyDnsDomainInfo))
szDomain = pPolicyDnsDomainInfo->DnsDomainName.Buffer;
if(szDomain && wcschr(szDomain, L'.'))
// Don't check for a period in the FQDN because it's possible that the domain doesn't have one!
// Instead, we'll just check to make sure we have a domain specified and that is has at least one character.
if(szDomain && wcslen(szDomain) > 0)
{
kprintf(L"[DC] \'%s\' will be the domain\n", szDomain);
if(!(kull_m_string_args_byName(argc, argv, L"dc", &szDc, NULL) || kull_m_string_args_byName(argc, argv, L"kdc", &szDc, NULL)))
@ -2522,4 +2524,4 @@ ULONG SRV_IDL_DRSVerifyNames(DRS_HANDLE hDrs, DWORD dwInVersion, DRS_MSG_VERIFYR
ULONG SRV_IDL_DRSUpdateRefs(DRS_HANDLE hDrs, DWORD dwVersion, DRS_MSG_UPDREFS *pmsgUpdRefs)
{
return STATUS_SUCCESS;
}
}