DEV Community

Serguey Shinder
Serguey Shinder

Posted on

Any Account in Our Domain Could Request a Ticket That Gave Away Our Trading System's Password

Last year an engineer in my team came back from a security course and asked permission to try one technique against our own Windows domain. It is called Kerberoasting, and it relies on the domain working exactly as designed.

Many of our applications run as services under their own domain accounts. When a user wants to reach one of those services, their computer asks a domain controller for a ticket for it. The domain controller issues that ticket to any signed in user, because deciding who may use the service is the service's job. Part of the ticket is encrypted with a key derived from the service account's password. Take the ticket away, and you can guess that password offline as fast as your hardware allows. There are no failed sign ins and no lockouts, and nothing in the logs looks like an attack.

Using a test account with the same rights as a counter assistant, he requested tickets for all thirty one accounts in our domain that had a service registered. That took under a minute. On a spare workstation with a gaming graphics card he had cracked four of the passwords within three hours. One belonged to the account our trading system's database ran under. The engineer who installed it in 2014 had chosen our company name followed by the year, and the account was a member of Domain Admins, because the installation guide had asked for that and nobody had taken it out.

Any of our fourteen hundred staff, or anyone who had phished one of them, was an afternoon away from controlling every computer we own.

Where the software allows, services now run under group managed service accounts, whose passwords are a hundred and twenty characters long, generated and changed by the domain itself, and known to nobody. The nine accounts that cannot use them have random passwords of more than thirty characters, held in our vault and changed every year, and accept only AES encryption, because tickets using the older RC4 cipher are far quicker to crack. No service account is a Domain Admin any more. We alert when one account requests tickets for many services in a short time, and we keep one decoy service account that nothing legitimate uses, so any request for it raises an alarm.

Our password policy forced people to change their passwords. Service accounts were exempt, because changing them breaks things, so our most powerful accounts had our oldest passwords. Find out which of yours anyone in the company can take home and attack without you knowing.

– Serguey Shinder

Top comments (0)