Names that were generated, not typed DGA
Everyone scores the name. At one false positive in 550, fifty thousand names a day is ninety alerts and maybe one is real, so the detector gets switched off. The evidence was never in the string.
The log
A Zeek dns.log, a SIEM export, a resolver’s own log, or anything with a name, a machine and a response code in it. The columns are worked out from the header where there is one and from the shape of the values where there is not, and can be set by hand below if it guesses wrong. It is read by this page on this device. A DNS log is a list of everything everyone in the building looked at, which is precisely why this sort of analysis normally needs a purchase order and a data processing agreement.
Which column is which
Only the name is essential. Without the machine, everything is treated as one machine and the bursts run together. Without the time, the window stops working and a day’s failures are judged as one. Without the response code, nothing can be told to have failed, which is most of the signal.
What it found
Every name that did not exist, by machine along the side and by time across. A generator shows up as a dense vertical band: hundreds of names in minutes. A decommissioned printer is an even scatter all day. The difference is visible before any arithmetic, and that is most of the method.
Every group, and which tests it passed
Four tests, all four required, and each useless alone. Many: enough distinct names that do not exist, inside one window. Once each: asked about once or twice rather than over and over, which is what separates a generated list from a dead printer. Registered level: varying the part of the name that decides which server answers, rather than a label underneath a parent. Not sheltered: that parent does not answer for anything else in this log, which is what a content network’s random names always do.
What scoring the names would have cost
One in 550 at ninety per cent detection is the published figure for a character-pair scorer; without an allow-list in front of it the rate on ordinary domains is around eight per cent. Neither of those is a bad implementation. They are what happens when a test with a small error rate meets a haystack, and it is the same arithmetic that makes a screening test for a rare disease produce mostly false alarms. Put your own numbers in and see what the queue looks like.
Settings
Raise the window and a slow generator that works through its list over an hour still lands in one group, at the cost of pulling more ordinary failures in with it. Lower the distinct-name count to catch a short list, at the cost of raising every machine with a handful of typos. The numbers are yours because the right ones depend on your network, and a tool that hid them behind a single sensitivity dial would be pretending otherwise.
The working
Questions people ask about DGA
Why does it not score how random the name looks?
Because that is the approach everybody builds and the arithmetic defeats it. The published figure for a character-pair scorer is one false positive in 550 at ninety per cent detection; without an allow-list the rate on ordinary domains is around eight per cent. Fifty thousand distinct names in a day (a modest company) is ninety alerts, of which perhaps one is real. Nobody works that queue, so the detector gets turned off, and the reason it was turned off is never written down anywhere. The problem is not the implementation. It is that a rare thing behind a test with any error rate produces mostly errors.
What is wrong with the name as evidence?
A content network’s addresses are random strings. So are a load balancer’s, a storage bucket’s, a Kubernetes service’s and a virtual machine’s. The worked example settles it without anyone having to take a view: scored against the same model, the twenty-two content-network names average −3.83 and the thirty-nine generated ones average −3.80, and every one of the twenty-two falls inside the range the generated ones occupy. By that measure the content network is slightly more random than the malware. Anything that tells them apart has to use something other than the characters, because in characters they are the same object.
So what does it use instead?
Structure and behaviour, both already in the log. A generator has to vary the registered part of the name, because that is what decides which server answers; a content network varies the leftmost label under a parent it already owns. And a generator produces many distinct names, asked about once each, nearly all failing, from one machine, within minutes. A dead printer is one name all day. A typo is one name once. A stale internal record is a handful under one suffix. A content network is many names that resolve. Four tests, all four required.
How does it know a parent is a content network without a public suffix list?
It asks the log. For the names in a suspicious group it finds the longest suffix they all share, then counts how many other names in the whole log sit under that same suffix and how many of those resolved. A parent with hundreds of children that answer is somebody’s service. A shared suffix of just .com is not a parent at all, it is a registry. This is better than a list as well as lighter: a shipped public suffix list goes stale, and is wrong about somebody’s country the week it does.
Why build the character model from my own log?
Because that is the entire fix for the false positive rate. A model trained on English, or on a list of popular domains, has never seen your vendors, your acronyms, your build servers or your internal hostnames, and calls all of them random. A model built from the names this same log resolved has seen nothing else. It is still only used to corroborate, never to decide: on the worked example the one name that mattered scores as more ordinary than the ones that did not exist, which is left in the output rather than tidied away.
How does it find the command server?
By where and when it was asked, not by what it looks like: a name this machine asked about inside the burst, under the same top level, that answered, and that no other machine on the network asked about at any other time. A generated command server is contacted by the machine that generated it and by nothing else. That name is the only one in the burst worth blocking, because the others do not exist, and it is what to take to the proxy and firewall logs to find out what actually happened.
What log formats does it read?
A Zeek dns.log with its #fields line, a CSV or TSV with a header, or a file with no header at all. Where there are column names it matches the usual ones; where there are not it looks at the values: an address column looks like addresses, a name column has dots in it, a response column repeats a handful of words. If it guesses wrong the columns can be set by hand. Only the name is essential; the machine, the time and the response code each make it sharper, and the page says what it loses without each of them.
Will it catch a dictionary-based generator?
The structural tests will, because a generator that assembles names from a word list still varies the registered part and still produces a burst of names that do not exist from one machine. The character model will not, and says so by scoring them as ordinary, which they are. That is the case where scoring names fails completely and where behaviour is the only evidence there is, which is the argument this page is built around rather than an exception to it.
What does it miss?
A generator that works slowly enough to stay under the window, one that checks few enough names, one whose traffic goes to a resolver this log does not cover, and one whose first candidate answers so that almost nothing fails. It will also miss everything on a machine using DNS over HTTPS to a resolver you do not see, which is an increasingly ordinary thing for malware to do and worth knowing about your own network either way. Nothing raised means this pattern is absent from this log, which is not the same as a clean network, and the page says that rather than printing a tick.
Is anything sent anywhere?
No. The file is read by the page on your device, the analysis runs in the browser, and the page works with the network switched off. That matters more here than on most tools: a DNS log is a record of everything everyone in the building looked at, including things that are nobody’s business, and it is the sort of file whose upload needs a contract.
Doing this often? The Sovereign Console pulls every domain and indicator out of logs and files across a whole case, and exports a report. On its own, US$2 a month; with everything else, US$5 a month or US$48 a year.