3

I work for a large Eastern European bank as a programmer.

Recently, I was setting up a documentation website for my team. We came up with the host name, and now all we needed was to pick the best suitable zone for it and send a request to IT support team to create a new DNS record.

So, I fired up PowerShell and loaded DnsServer module to list available DNS zones (I was unaware at the time, that ordinary users, generally, can not enumerate anything on AD DNS server. Access SHOULD be denied by default).

The Get-DnsServerZone cmdlet promptly listed all available zones. I've picked one, and to make sure there were no similar host names in this zone, ran Get-DnsServerResourceRecord command too. Everything worked fine.

While I was at it, out of curiosity, I decided to explore "Add-*" commands too: Add-DnsServerResourceRecordA, Add-DnsServerResourceRecordCName etc. I did not expect these to work at all, but, to my great surprise, cmdlets did not throw errors - they completed successfully!!!

I've verified created records using Get-DnsServerResourceRecord and nslookup. Also ran same commands using non-privileged technical user account (which belongs only to DOMAIN\Users group and nothing else) and got same result: DNS records were added successfully. Looks like any authenticated user can create DNS records. This does not feel right.

The Question:

Is this an acceptable practice or a security misconfiguration? Should I report it?

(I have not reported it yet, because of lots of beaurocracy involved. Also I dont want to attract unneeded attention. We have quite unhealthy culture and broken communication here - this is a bank, after all).

3 Answers 3

2

This should definitely be reported to your CSO and/or his/her team.

Besides you being able to add DNS records, chances are good, that you can execute other commands as well to manipulate the DNS configuration. From my experience it is better to report findings like this fast.

If the network administrators in charge notice the alterations that you have made, they will most likely be able to trace them back to you. If you have not reported this incident to them by then (or even in a timeframe that acceptably small), this will put you in a far worse light than reporting the issue in the first place.

2
  • Thanks for answer! Although I must say about "user account with too many rights": as I mentioned in the question, I have tried same command using another throwaway technical user, and it worked. Most likely this is a case of ill-configured DNS server.
    – Julak Doom
    Commented Feb 14, 2018 at 15:45
  • Ah, sorry. Read over that line. My mistake.
    – Tom K.
    Commented Feb 14, 2018 at 15:48
2

UPDATE: I reported this issue to the Microsoft Security Response Center (Case 91434 on 24/9/2024). They responded on 5/11/2024 as follows (emphasis as in original):

Thank you again for submitting this issue to Microsoft. Although your report is valid, currently, MSRC prioritizes vulnerabilities that are assessed as “Important” or “Critical” severities for immediate servicing. After careful investigation, this case is rated as Moderate severity and does not meet MSRC’s current bar for immediate servicing. This is because the wildcard record in DNS which will cause all unknown domains to go to the attackers machine does not allow targeted spoofing.

However, we have shared the report with the team responsible for maintaining the product or service. They will take appropriate action as needed to help keep customers protected.

Original answer:

All newly-created Active Directory Integrated forward and reverse DNS zones include the following entry by default in their DACL, at least up to Windows Server 2022:

Principal: Authenticated Users (S-1-5-11)
Access: Create all child objects

It has been noted by The Hacker Recipes, NetSPI, and GoSecure that this represents a potential vulnerability - it is possible for any user in the domain/forest to add and control a new DNS record (so long as it doesn't exist already) with an arbitrary name, including a new wildcard record, using a simple LDAP request, or a dynamic DNS update request.

It can be mitigated by removing the above DACL; however, it is not a supported configuration, so you may experience issues. In particular, if you need secure dynamic updates to operate (e.g. for Active Directory Domain Join), you should also probably consider adding the following Allow entries in its place:

Principal: <DOMAINNAME>\Domain Computers
Access: Create all child objects

Principal: <DOMAINNAME>\Read-only Domain Controllers
Access: Create all child objects

Also, if you have configured any Windows DHCP Servers to use dedicated service accounts to update DNS records for clients (not the default), you should also give those service accounts the above permissions. However you will also need to mitigate against another related vulnerability in Windows DHCP servers when the default option allowing dynamic updates of DNS records on behalf of clients is enabled.

8
  • Any more information about replacing Authenticated Users with the two computer groups Domain Computers and Read-only Domain Controllers? Have you implemented this before? Commented Sep 27 at 16:15
  • I’ve seen it suggested by others but not tried it myself. Have raised this issue with MSRC to see if they’re interested in issuing an advisory…
    – Minkus
    Commented Sep 28 at 18:27
  • Here’s where replacing Authenticated Users with Domain Computers is suggested (adding the RODC group is my own addition): learn.microsoft.com/en-us/archive/msdn-technet-forums/…
    – Minkus
    Commented Sep 29 at 6:54
  • 1
    You’re right - if you’re running the DHCP service with a dedicated user account per learn.microsoft.com/en-us/troubleshoot/windows-server/… that account also needs to be added. If you’re running with the default configuration though, the record should be the computer account of the DHCP server, which should be already be included in Domain Computers. I’ll update the answer.
    – Minkus
    Commented Oct 1 at 7:00
  • 1
    (Of course that feature is a whole other vulnerability in its own right - but at least it doesn’t allow for wildcard records) akamai.com/blog/security-research/spoofing-dns-by-abusing-dhcp
    – Minkus
    Commented Oct 1 at 7:15
1

Authenticated users by default have the create child object permission. Removing this breaks ddns.

Related Technet post

1
  • Thanks, I've googled DDNS and this one seems legitimate concern too. This is confusing. But I've decided to report it anyways.
    – Julak Doom
    Commented Feb 14, 2018 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .