Detecting Timeroasting the Hard Way

Key Takeaways

  • This article walks through a new way to detect "timeroasting," which abuses Microsoft's MS-SNTP protocol to make a domain controller (DC) hand you a password-derived MAC for any computer or trust account with zero authentication, then cracking it offline. The technique has a second, 120-byte "extended" form built with HMAC-SHA512 that modern Windows sends by default. Because this form has no public documentation and no hashcat module, a collector assuming the legacy MD5 form could crack the wrong format and misread weak accounts as safe.

  • A Huntress researcher reversed netlogon.dll and w32time.dll off a fully patched Windows Server 2025 DC to recover the exact extended crypto—down to the null byte in the label and the little-endian RID context—proved it against live DC output, and shipped a reference implementation plus a hashcat module that makes the extended form as cheap to attack as the legacy one.

  • Packet size is a baseline question rather than an attack signal, because modern members send the 120-byte form as normal time sync; a legitimate host only ever asks a DC to sign for its own machine account, so alerting when the requested RID is not the sender's own catches a single packet, a slow sweep, and both forms.

  • Timeroasting reaches only computer and trust accounts and only weak or non-rotating secrets ever fall. Microsoft Defender for Identity does not catch the unauthenticated sweep, so we recommend logging UDP/123 requests to your DCs and detecting on the own-RID mismatch rather than relying on identity analytics.

Most detection rules come from one of two places: a vendor feed or a breach report. There is a third source that stays underused, and it is the one that actually teaches you something. Read the protocol spec, then read the binary that implements it. Not the attacker's tool, and not the vendor's marketing page: the target's own code.

This post is what happened when I did that for timeroasting. The detection you can copy for it today is a volumetric counter of connections to UDP/123 that understands nothing about the protocol. Nobody keys on what actually separates an attacker from a member, and the extended form has no coverage at all. So I reversed the binary to understand the protocol well enough to detect it properly. This is the walk from the bytes in netlogon.dll to detection that works against a real fleet. Reversing the crypto that precisely also hands you a working cracker, which is a nice bonus, but detection is the point. That is the "hard way" in the title: there is no public documentation for the extended crypto and no hashcat module for it, so you recover both by reading the binary.

The roasts you know

There are three roasts most people can name without thinking.

  • Kerberoasting. Request a service ticket for any account with an SPN, then crack the encrypted ticket blob offline.

  • AS-REP roasting. For accounts with Kerberos pre-authentication turned off, grab the AS-REP and crack its encrypted chunk.

  • Timeroasting. Per Tom Tervoort's 2023 research, abuse Microsoft's proprietary NTP authentication extension, MS-SNTP, to make a DC hand you a password-derived MAC for any computer or trust account, with zero authentication, then crack it offline.

The form nobody cracks

Timeroasting's request comes in two authenticator formats, and only one of them has public cracking support: hashcat has a mode for the legacy form and none for the other.

MS-SNTP lets a domain client confirm that a time response really came from a DC that knows the client's machine password, without the client authenticating first. The client sends an NTP request that names an account by its Relative Identifier (RID), and the DC answers with a MAC computed over the response using that account's password-derived key. A RID is the tail of an account's Security Identifier (SID), its unique index within the domain; naming a target by that number is all "sweep RIDs" means. Sign for whatever RID I name, no auth required: that is the entire attack surface. Sweep RIDs, collect MACs, crack offline.

The form everyone knows is 68 bytes on the wire, and its MAC is built with MD5. That is what hashcat mode 31300 cracks, what timeroast.py and netexec produce, and what every writeup covers.

The form almost nobody covers is 120 bytes, and it is neither new nor exotic. Microsoft added it to the spec as the preferred option, explicitly because of weaknesses in MD5, and it has been in real traffic for years. chrony added handling for it back in 2016, and modern Windows w32time sends it by default, to the point that it broke time synchronization against Samba AD domain controllers (DCs), which do not implement the extended form. The documented workaround is a Windows registry flag, SignatureAuthAllowed=0, that forces clients back to the legacy authenticator. Its MAC is built with an SP800-108 key derivation step followed by HMAC-SHA512. The gap is this: the exact crypto is not documented anywhere I could find, and hashcat has no module for it, so when you collect the extended MAC the legacy cracker cannot touch it.

Note: The two forms are trivial to tell apart on the wire. A 68-byte authenticated NTP packet is the legacy form; a 120-byte one is the extended form. Keep them apart in your head, because which form you have decides whether your cracker works, though as we will see, building detection on size is a mistake.

Why a defender should care

Timeroasting leaves no authentication event. The targeted accounts never log on, so there are no 4768, 4769, 4624, or 4776 events. That part of the usual claim is true, and it is where the attack earns its reputation for being quiet.

But quiet is not invisible. The DC still receives and answers a burst of UDP/123, and that is visible on the wire and in host network telemetry if you collect it, the half of the story most writeups skip. The extended form adds one wrinkle: if your DC speaks the 120-byte dialect and your collection assumes 68-byte MD5, your cracker produces nothing, and you misread an account as safe because you cracked the wrong format.

So the defender's questions are simple. Can you see the request happen? And if you harvest the MAC, can you actually crack it? We will answer both, but first we have to know exactly what the DC computes, and for that we read its code.

The two forms on the wire

Both forms are a standard 48-byte NTP packet with an authenticator appended. Two fields carry the rest of this post: 

  • The KeyIdentifier at offset 48 (the target RID, little-endian)

  • In the extended form, a Flags byte at offset 53 whose 0x01 bit means USE_OLDKEY_VERSION

The remaining extended fields are defined in [MS-SNTP] and sit at their defaults in a request.

A 68-byte authenticator is the legacy form (48-byte header, 4-byte KeyID, 16-byte MD5 MAC); a 120-byte authenticator is the extended form. The client sends the MAC zeroed, and the DC fills it in and echoes the structure back.

Reading the code instead of guessing

The spec tells you the shape. It says, roughly, "K equals KDF of the key, a label, and a context, and the checksum is HMAC-SHA512 of K over the message." That is not enough to write a cracker. What is the label, down to the byte? How is the RID turned into the context? Which hash drives the KDF? Guess any of these wrong and your cracker produces confident garbage.

So I did not guess. Everything below is read off the actual binaries from a live, fully patched Windows Server 2025 domain controller (build 26100.33438), in radare2. I pulled w32time.dll and netlogon.dll off the DC over SMB and read them there.

Step 1: the crypto is not where you would expect it

My first assumption was that the signing happened in w32time.dll, since that is the service listening on UDP/123. It does not. I grepped the binary for the KDF label and came up empty:

rabin2 -zzq w32time.dll | grep -i "sntp-ms"                  -> (nothing)

rabin2 -zzq w32time.dll | grep -iE "SP800|SHA512"   -> (nothing)

What w32time does import tells the story. Its crypto is delegated to Netlogon through:

logoncli.dll:
logoncli.dll  I_NetlogonComputeServerSignature  <- extended (SHA-512)
logoncli.dll  I_NetlogonComputeServerDigest     <- legacy (MD5)
logoncli.dll  I_NetlogonComputeClientSignature
logoncli.dll  I_NetlogonComputeClientDigest
logoncli.dll  I_NetlogonGetTrustRid
bcrypt.dll    BCryptCreateHash / HashData / FinishHash / DestroyHash / GenRandom

So w32time parses the packet and dispatches. The "Signature" functions are the extended, SHA-512 path; the "Digest" functions are the legacy, MD5 path. The interesting bytes live in netlogon.dll.

Step 2: the w32time dispatch and the extended-vs-legacy branch

the time service imports

Figure 1: the time service imports I_NetlogonComputeServerSignature and I_NetlogonComputeServerDigest from logoncli.dll, and a string search for sntp-ms in w32time.dll comes back empty. The signing logic lives in Netlogon, not in w32time.


Two functions in w32time call both compute paths, and the server picks the SHA-512 path or the MD5 path based on the request it parsed. The important finding at this layer: the attacker-controlled fields from the packet, the RID at offset 48 and the flag byte at offset 53, flow through w32time only as a RID value and a key selector that get passed down to Netlogon. They are not used as a length, an index, or a buffer size anywhere in the parse.

Step 3: NlGetKDFKey, the function that builds the key

In netlogon.dll, the function that derives the KDF key uses its own debug-string name, NlGetKDFKey. It builds a BCryptKeyDerivation call with the SP800-108 counter-mode HMAC algorithm and three parameter buffers, and the disassembly (Figure 2) pins down the three things a cracker needs. The spec implies a KDF with "a label" and "a context." The bytes say: the PRF is HMAC-SHA512 (the hash-algorithm buffer is L"SHA512"), the label is the 8-byte "sntp-ms\0" with the null included (cbBuffer is 8 for a 7-character string), and the context is the 4-byte RID in little-endian, exactly as it arrived in the packet. Output is a fixed 64 bytes. Every size is constant, and nothing here is attacker-controlled.

radare2

Figure 2. radare2 disassembly of the buffer setup: the sntp-ms label and the L"SHA512" algorithm string being loaded into the BCryptKeyDerivation call that derives the signing key.

Step 4: NlComputeHMACMessageSignatureFromKey, the outer HMAC

The caller is NlComputeHMACMessageSignatureFromKey. It calls NlGetKDFKey, then HMACs the message under the derived key: the 64-byte derived key is the secret, the message is the fixed 48-byte NTP header, and the output is 64 bytes. Note the one place a caller-supplied length reaches anything: the input length to that hash call. It is used only as the number of bytes to hash, never as an allocation size or an index, and w32time hands Netlogon a fixed 48-byte NTP header for the message. Every other size is BCrypt-derived or the fixed 64. The function error-checks every allocation and every BCrypt call with its own labeled failure path.

The chain is now pinned: the NThash feeds a SHA-512 SP800-108 KDF keyed by the sntp-ms label and the RID, producing a 64-byte key, and that key HMACs the 48-byte NTP response. That is everything the detection needs to know about the crypto. The cracker also needs the exact byte layout, which I lay out next to the cracker below.

Proving it against a live DC

Reading bytes gives you a hypothesis; I wanted the DC to confirm it. First, reachability, because the extended form being in the spec does not mean a patched DC answers it. I probed a live computer-account RID with both forms and both key selectors. The result was reproducible five times out of five:

                  current key (flags=0)   old key (flags=0x01)
legacy (68B)      68-byte reply           68-byte reply
extended (120B)   silent timeout          120-byte reply (real HMAC-SHA512)

So the extended form is live on a fully patched DC, and it returns a genuine nonzero 64-byte checksum that changes every request, because the salt is the NTP response, which moves. The collector emits each old-key response as a single $sntp-ms-sha512$<RID>$<checksum>$<salt> line, the format laid out in full in the cracking section below. Because the salt is the live NTP response, no two captures are byte-identical, so the hash line in Figure 3 is one instance of that shape rather than a fixed value worth reprinting here.

The collector's three-way probe against the DC

Figure 3: The collector's three-way probe against the DC: a 68-byte legacy reply, an extended current-key request that times out, and an extended old-key 120-byte reply, with one sntp-ms-sha512 hash line produced.

Then the crypto proof: I wrote a small pure-Python reference (no dependencies) that implements the chain above, recovered the responding account's NT hash in the lab (the NT hash is just MD4 of the password, the long-term key every Windows account carries, and what both the MD5 and SHA-512 MACs are ultimately keyed on), and asked one question: does my code reproduce the DC's checksum from that hash? It does, exactly. The verifier reported the match and told me which parameters won, the 8-byte null-inclusive label and the little-endian RID context, confirmed against live output rather than assumed.

reproducing the DC's checksum from the account NT hash

Figure 4. The reference implementation reproducing the DC's checksum from the account NT hash: the captured wire checksum equals the recomputed HMAC-SHA512, and the 8-byte label and little-endian RID context are confirmed, not assumed.

A reproducible known-answer test vector (synthetic, not a capture, so it corresponds to no figure) with a known password, safe to publish, so anyone reimplementing the KDF can check their work:

password : Summer2026! (example only, not a real account)
NThash   : 41aed72cec76816423703d8e545eea31
RID      : 1104 (arbitrary; the RID is just KDF context)
hash     : $sntp-ms-sha512$1104$a24990178f8f309a190f08c9a8c5000ce126eef19b236b50cc680d592057cd1ec872d3de6b7fdc47d8a865cae2c5c277d8842f3d1a8b7b6bb0c06bbffebb6307$1c0400e90000000800000291564d5450000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

That current-key timeout deserves a note, because my first explanation for it was wrong. I had assumed it was specific to the DC's own never-rotated machine account. It is not. I retested across nine machine accounts, member computers included, and every one behaves the same way: legacy answers, extended old-key answers, extended current-key times out. So it is a property of this DC, not an artifact of one account. I do not have a confident explanation, and since modern Windows clients clearly use the extended form successfully in the wild, this DC's current-key behavior may not be representative, and I cannot rule out the simpler possibility that my collector's current-key request is itself malformed. Either way, I am flagging it as an open observation rather than resting any conclusion on it.

Cracking it: the bonus from reversing the KDF

Detecting the extended form never needed the KDF internals. But with the binary already open, getting the key derivation exactly right is a small extra step that hands you a working cracker.

Here is the construction, straight from the two functions above:

NThash   = MD4(UTF-16LE(password))              # NTOWFv1, 16 bytes
K        = SP800-108-CounterMode(
             KI    = NThash,
             PRF   = HMAC-SHA512,
             Label = "sntp-ms\0" (8 bytes, includes the null),
             Context = RID (4 bytes, little-endian),
             L     = 512 bits)                   # 64 bytes, one block
checksum = HMAC-SHA512(K, NTP-response[0:48])    # 64 bytes

The SP800-108 fixed input, the way Microsoft's BCryptKeyDerivation assembles it (the same layout MS-GKDI uses, which is how I sanity-checked the counter and separator):

block(1) = HMAC-SHA512(NThash,
             BE32(1) || "sntp-ms\0" || 0x00 || LE32(RID) || BE32(512))

Four ways to get this wrong, every one of which silently breaks a cracker, and I would have shipped at least two if I had trusted the spec text alone:

  • The label is 8 bytes including the null, not the 7-byte sntp-ms you would type.

  • SP800-108 then inserts its own 0x00 separator after the label, so two null bytes land in the fixed input, not one.

  • The counter and length are big-endian 32-bit, but the RID context is little-endian 32-bit: mixed endianness inside one buffer.

  • It is a KDF and then an HMAC, two HMAC-SHA512 passes, not a single HMAC over the message.

Before the tooling, two questions I keep getting, because together they decide how much this should worry you.

Is the 120-byte form a different attack?

No. Same protocol and trigger (unauthenticated MS-SNTP, name an account by RID, collect a MAC, no auth), same targets (computer and trust accounts), same collection (sweep RIDs), same goal. Only the MAC construction changes. Legacy builds its MAC with MD5 over the NT hash and the response; extended builds it with an SP800-108 key derivation and then HMAC-SHA512. Same secret, same request, a different MAC on the wire.

Is it harder to crack?

Yes, in two senses, and only one of them is real cryptographically.

The first is per-guess cost, where it is genuinely harder. Legacy is one MD4 plus one MD5, and MD5 is about as GPU-friendly as a hash gets. Extended is one MD4 plus two HMAC-SHA512 passes (roughly eight SHA-512 compressions), nothing precomputable across guesses since the derived key depends on both the RID and the candidate, and SHA-512's 64-bit operations are deliberately GPU-unfriendly. So it is much slower per guess. I will not hand you a multiplier against Kerberoasting, because that depends on the ticket's encryption type (RC4, mode 13100, versus AES, mode 19700); benchmark it against hashcat's other SHA-512 HMAC modes on your own hardware.

The second is whether it protects a weak password, and there the answer is barely. Both forms key off the same NT hash, so a weak password falls to either and a random machine secret falls to neither; the MD5-versus-SHA-512 difference only changes the price per guess, not which accounts are roastable. Password entropy is the protection, exactly as it always was.

So why would an attacker reach for the extended form at all, when the 68-byte form is cheaper to crack and has a working hashcat mode? Two reasons, neither of which is that it is a better attack:

  • First, evasion: on a fleet where legitimate clients already send 120-byte requests, extended traffic blends into the baseline, while the 68-byte tools stick out.

  • Second, future-proofing, for a day when Microsoft disables the legacy MD5 path. The "your cracker silently fails" trap is real but narrow: it only catches a tool that requests the extended form and then formats the output as legacy. Whoever collects 120-byte responses can see they are 120 bytes.

Here is the current state of cracking:

  • What hashcat cracks today: the 68-byte legacy form, mode 31300, MD5.

  • What hashcat cracks for the extended form: nothing in a released build yet; there is no upstream module. Issue 3629, which produced 31300, is the MD5 one.

So if you collect the extended MAC today, your options are a custom kernel or a CPU reference implementation. I wrote the reference and used this hash format, matching the existing $sntp-ms$ convention:

$sntp-ms-sha512$<RID>$<checksum_hex>$<salt_hex>

...where the salt is the 48-byte NTP response. For comparison, the legacy form captured off the same DC (hashcat 31300):

1000:$sntp-ms$f3c43f1f39a61012e634983008213633$1c0400e90000000c000002a6564d5450ee667af63d863d9cee66797600000000ee667b146da6b866ee667b146da72a7b

Building the hashcat module

Since the reference proves the algorithm, the next step is a real hashcat module, so the extended form is as cheap to attack, and therefore as urgent to detect, as the legacy one. The module below is written and passes hashcat's own self-test on a GPU. The algorithm is DC-verified through the Python reference, and the module plus its OpenCL kernel clear tools/test.py -m 31350 cleanly across the single and multi vectors at vector widths 1 and 4, and crack a known-password vector end to end. On an Apple M3 Pro the mode benchmarks at 17.6 MH/s (hashcat -b -m 31350).

31350 is not a released hashcat mode number. It is a placeholder; the maintainers assign the real one when this goes upstream, so you build it from the source below. Getting the kernel to pass took fixing exactly the byte-level traps this post keeps warning about: the SP800-108 L value has to land as the big-endian bytes 00 00 02 00 at the right offset in the KDF message, not as a little-endian word, and the password has to be decoded as real UTF-16LE. Guess either wrong and the self-test fails the same way, the same lesson as the label and the context.

The self-test oracle that hashcat's tools/test.py uses to make a known hash (tools/test_modules/m31350.py) is the clearest statement of the whole algorithm in a few lines:

LABEL = b"sntp-ms\x00"  # 8 bytes, trailing null INCLUDED
def _nthash(word):
    return _md4(utf16le(word, "utf-8"))  # NTOWFv1 = MD4(UTF-16LE(pw))
def _kdf(nt_hash, rid):  # SP800-108 CTR, PRF HMAC-SHA512, single block (L=512)
    fixed = struct.pack(">I", 1) + LABEL + b"\x00" + struct.pack("<I", rid) + struct.pack(">I", 512)
    # BE32(counter=1) label 0x00 sep LE32(RID) BE32(L=512)  <- the byte trap
    return hmac.new(nt_hash, fixed, hashlib.sha512).digest()
def _hash(word, salt_bin, rid):  # checksum = HMAC-SHA512(K, 48-byte NTP response)
    k = _kdf(_nthash(word), rid)
    checksum = hmac.new(k, salt_bin, hashlib.sha512).digest()
    return "sntp-ms-sha512%d%s%s" % (rid, checksum.hex(), salt_bin.hex())

The full hashcat module (module_31350.c, the OpenCL kernel m31350-pure.cl, and the m31350.py self-test oracle) ships alongside this post. Drop the three into a hashcat source tree and build; the only thing that matters before any pull request is the self-test passing:

make -j && tools/test.py -m 31350

Watching it recover a password

A module is only interesting if it recovers something. Here it is against a collected extended MAC: the dependency-free reference cracker first, then the same recovery in hashcat.

weak password

Figure 5. Recovering a weak machine-account password from a collected extended (SHA-512) timeroast MAC with the pure-Python reference cracker. The crack is entirely offline, no DC contact and no lockout. A pre-created account still on its lowercase-name default falls instantly; a normal random machine secret would not fall to any wordlist.

The same recovery in hashcat with the new mode 31350

Figure 6. The same recovery in hashcat with the new mode 31350.

The extended form now cracks with the same tooling as the legacy one, built from the module in this post. This run is on a Kali box against a six-word list, so it finishes before hashcat can measure a representative rate; that box benchmarks at about 339 kH/s (hashcat -b), while the 17.6 MH/s above is the M3 Pro GPU.

The extended form stops being a research curiosity and becomes exactly as cheap to crack as the legacy one, which only matters for accounts whose password is guessable in the first place. So the next question is who that actually is.

Who is actually at risk

All of that, the reference implementation, the hash format, the module, is about turning a collected MAC into a password. But it assumes you have something worth cracking, and that set is narrower than a sweep's raw length suggests. Run one and look at what actually answers:

A NetExec timeroast sweep

Figure 7. A NetExec timeroast sweep against the lab DC. RID 1000 and the 1166-1195 cluster answer; the 1001-1165 gaps stay silent. Every line is the 68-byte legacy form, because NetExec emits only legacy.

The gaps are the finding. In that sweep, RID 1000 answers, then nothing until 1166, then a cluster through 1195. The missing RIDs, 1001-1165, and the holes inside the 11xx block, are not users the sweep skipped. They are users the DC refused to sign for. You are not looking at a filtered list of the domain; you are looking at the complete set of accounts the DC was willing to answer for, and that set is computer and trust accounts only.

Why? the DC produces a MAC only when the named RID resolves to an account that carries a machine secret, meaning a computer or trust account. A normal user account returns an error and w32time simply does not reply. No reply, no MAC, nothing for the tool to print. RID 1000 answered, so it is a machine or trust account; fire a request straight at user RID 1110 (tony.soprano) in that gap and the DC stays silent.

Concretely: timeroasting reaches computer and trust accounts, full stop. That is why the crackable population is the narrow set worth naming: image-built or never-rotated machines, hand-set trusts, non-Windows joins. It is also why targeted timeroasting has to exist: to roast a real user, an attacker with domain admin first flips that user into a machine-looking account, appending a $ to its name and setting its userAccountControl to a workstation trust so the DC will sign for it, then reverts. Without that rename, a user's RID in this sweep returns nothing. The gaps are your users. The rename needs domain admin and is loud, so it is a different risk class from the unauthenticated sweep this post is about.

Can defenders even see this?

The targeted accounts never authenticate, so this never reaches identity analytics. But the request is still a packet on the wire and a connection on a host, and both are collectable. Three sources see it:

  • The DC's own Windows Filtering Platform audit (event 5156) logs w32time accepting the UDP/123 connection, when that subcategory is enabled. 

  • Host EDR sees the network connection, and there is already a public Sentinel detection that counts UDP/123 connections per source over DeviceNetworkEvents. 

  • On the attacker's own machine, any process that is not the time service sending UDP/123 to a DC is a high-signal EDR hit. 

So the problem is not that nobody can see it; it is that nobody is looking at the right telemetry, because everyone reaches for authentication logs first.

One product acknowledges timeroasting at all, Microsoft Defender for Identity, and it only catches the loud privileged variant: the sAMAccountName rename of the targeted attack, not the unauthenticated sweep this post is about. I take that alert apart in detail later; the point here is that naming a technique is not detecting it.

The harder question is what the good signal is, and here the extended form changes the answer.

Do not build on packet size. On an older fleet a 120-byte authenticated request looked rare. On a modern one it is the reverse: Windows clients send the extended form as normal time sync, and it is the 68-byte request that stands out, because both public timeroast tools emit only 68 bytes. Either way, size is a baseline question, not an attack signal, and which size is the odd one out depends on your Windows versions.

The signal that holds, for both sizes and even for a single packet, is simple: a legitimate member only ever asks the DC to sign for its own machine account. Resolve the source IP to a computer account (via DHCP or DNS) and then to its RID, and a request for any other RID is anomalous on its face. That catches a slow, one-RID-at-a-time sweep that no volume threshold would, and it does not care whether the packet is 68 or 120 bytes.

Volume is the fallback. A single source asking a DC to sign for many different RIDs in a short window is a sweep. It is weaker than the own-RID check, because a patient attacker can pace under the threshold, but it needs no IP-to-RID mapping, so it is the easy first rule.

Writing the detection, and the bug that ate all four of my rules

I wrote four Suricata rules and then did the thing I have learned to always do: I ran them through the actual engine instead of trusting that they looked right. Suricata 8.0.7, against a real capture of a sweep: 41 legacy requests and 41 extended requests from one host to a DC.

The engine immediately caught a mistake I would have shipped. I had left C-style /* ... */ comments inside the rule bodies to annotate them. Suricata has no inline comment syntax, so every rule that contained one failed to load, and the engine told me plainly that zero rules were loaded. Strip the comments.

With that fixed, all four loaded clean and fired. The extended-request rule matched all 41 extended packets and, because it is rate-limited to one alert per source per five minutes, logged a single alert, which is working as designed. The old-key rule matched and logged all 41 old-key requests. The legacy sweep rule fired once, at the 25th distinct RID, exactly where its threshold says it should. The extended sweep rule did the same on the extended packets. The fast.log evidence:

[1:5200003:1] MS-SNTP authenticated-NTP RID sweep (Timeroast) {UDP} 10.x.x.x:42198 -> 10.x.x.x:123
[1:5200001:1] MS-SNTP ExtendedAuthenticator request (possible extended Timeroast) {UDP} ...
[1:5200002:1] MS-SNTP ExtendedAuthenticator USE_OLDKEY_VERSION (extended Timeroast, old key) {UDP} ... (x41)
[1:5200004:1] MS-SNTP extended RID sweep (Timeroast) {UDP} ...

That first pass validated the mechanics and taught me the /* */ lesson, but all four rules were pinned to packet size, and the evidence that modern Windows sends the extended form means most of them do not survive a real fleet. Here is what I would actually ship. Set your own $DC_SERVERS.

Start with the volumetric sweep, deliberately size-agnostic so it catches both forms. An authenticated MS-SNTP request to a DC is 68 or 120 bytes; a plain NTP client request is 48, so dsize above 56 selects the authenticated ones, and the byte_test on the low three bits of byte 0 keeps it to client-mode (mode 3) requests, not a mode-4 server reply that happens to be large:

alert udp any any -> $DC_SERVERS 123 (msg:"MS-SNTP authenticated-NTP sweep to DC (Timeroast, either form)"; dsize:>56; byte_test:1,=,3,0,bitmask 0x07; threshold:type threshold, track by_src, count 25, seconds 60; classtype:attempted-recon; sid:5200010; rev:1;)

Keep the old-key flag, but as a hypothesis to test rather than a verdict:

alert udp any any -> $DC_SERVERS 123 (msg:"MS-SNTP ExtendedAuthenticator USE_OLDKEY_VERSION"; dsize:120; content:"|01|"; offset:53; depth:1; classtype:attempted-recon; sid:5200002; rev:1;)

The spec ties that flag to a client-side Key Selector, and clients validate responses against both the current and the previous password, so a legitimate client around a machine-password rotation could plausibly set it. I have not seen a real member do it, but I have not watched enough real extended traffic to rule it out, so capture your own fleet's requests and look. If none of your members ever set the flag, this is your best size-based signal; if some do, demote it. 

Both rules load clean and fire in Suricata 8.0.7 on a captured sweep (the volumetric one three times as the threshold rolls, the old-key one once per matching packet) and stay silent on a plain client.

Suricata 8.0.7 rules

Figure 8. The two rules I would ship, in Suricata 8.0.7 against a captured sweep: both load clean, the old-key rule (5200002) fires on all 41 old-key requests, and the volumetric rule (5200010) fires 3 times as its threshold rolls.

Do not ship a rule that simply alerts on a 120-byte request. On a modern fleet that fires on every Windows member doing normal time sync. It is a baseline measurement, not an attack signal.

The durable detector is not a Suricata rule at all, because the question that separates attacker from member (is this RID the sender's own?) needs an IP-to-account mapping Suricata does not have. Do it in Zeek or your SIEM: for each authenticated NTP request to a DC, pull the RID from offset 48, resolve the source IP to a computer account (DHCP or DNS, then LDAP to its objectSid and RID), and alert when the requested RID is not the source's own. That catches a single packet, a slow sweep, and both forms, and it does not depend on which size your fleet treats as normal.

Here is that check as a skeleton. The comparison is trivial; the work is the enrichment, a source-IP-to-own-RID table refreshed out of band from DHCP or DNS plus an LDAP lookup of each host's objectSid.

# For each authenticated MS-SNTP request to a DC:
on UDP packet to DC:123 where len(payload) in {68, 120}   # 48 = plain NTP, ignore
  and (payload[0] & 0x07) == 3:                            # client mode 3, not a server reply
    requested_rid = le32(payload[48:52])                   # KeyIdentifier, little-endian
    own_rid       = ip_to_rid[src_ip]                      # enrichment: DHCP/DNS -> LDAP objectSid -> RID
    if own_rid is None:
        alert("authenticated MS-SNTP from a host with no RID mapping")   # triage, not a verdict
    elif requested_rid != own_rid:
        alert("host asked the DC to sign for a RID that is not its own") # the durable signal

One honest caveat on wiring this to Zeek: the stock ntp_message event parses standard NTP and never surfaces the MS-SNTP KeyIdentifier, so you reach offset 48 with a small Spicy analyzer or raw-payload access, not three lines of script. Getting the RID off the wire and keeping the IP-to-RID table fresh is the real work; the mismatch test is the easy part.

Where these rules will lie to you

Measure your own 68-versus-120 baseline before you alert on either size, treat the volumetric rule as the weak first pass that a paced attacker or a NAT'd source can fool and the own-RID check as the one that holds, and baseline the old-key flag before you trust it.

Fingerprinting the tools, and the rule not to write

I ran the two public timeroast tools against a DC in the lab, SecuraBV's timeroast.py and timeroast-ng, and diffed their packets against a real NTP client byte for byte, to see whether there is a tool fingerprint worth keying on. There is, with one trap.

The trap first, because it is the tempting rule and it is wrong. Do not alert on a zero 16-byte MAC in the request. By the MS-SNTP design, the client sends its request with the crypto-checksum zeroed and the DC computes the MAC in the response. That is the whole point of the protocol: the client is asking the DC to prove it knows the password. A legitimate authenticated domain member sends exactly the same 68-byte request with a zero MAC, so a rule on that fires across your whole fleet. The attack is not in the shape of a single request; it is in the sweep and in cracking the response.

What holds up is tool-independent: both tools walk RIDs sequentially from a single source, reusing one ephemeral port, for RIDs that are not the sending host's own machine account. That is exactly the behavior the own-RID and volumetric rules already catch.

A supporting field tell is the transmit timestamp: both tools send a constant or all-zero value on every packet, because they do not care about time, while a real client's changes every request. The same timestamp repeated across many authenticated NTP requests from one source is a reasonable anomaly if your tooling can hold cross-packet state.

There are also byte-exact header signatures per tool, which ship in the rule file with this post. I validated that they fire on the tool captures and stay silent on a real chrony client, but a one-line edit to either tool breaks them, so keep them for telling which tool, not for coverage.

timeroast.py request vs a genuine chrony request

Figure 9. tshark comparison of a timeroast.py request and a genuine chrony request, with the transmit-timestamp bytes and byte 0 highlighted.

One point flips the usual intuition: the common tools emit only the 68-byte legacy form. The two I captured, SecuraBV's timeroast.py and timeroast-ng, and NetExec's timeroast module all produce legacy hashes, and timeroast-ng even ships an extended class that is not wired into its CLI. KerbWolf is the exception, claiming 120-byte extended support, though I did not capture it.

On an older fleet that legacy skew is unremarkable. On a modern fleet, where real members send 120-byte requests, it means the tools are the ones sending the odd-sized packet, so a 68-byte authenticated request from a host whose Windows version should be speaking extended is itself worth a look. That is the baseline flip from the detection section made concrete; on a modern fleet, hunt the legacy request, not the extended one.

Timeroasting is not a DCSync

People reach for this comparison constantly, and it treats the two as points on one scale when they are not even the same technique. The appeal is understandable, since both pull password-derived material out of a domain controller, but that is the only thing they share.

DCSync is something you do once you are already a domain admin: it asks the DC for secrets directly over the replication right, returns the actual hashes for any account including KRBTGT, and trips replication auditing (event 4662) and MDI's Suspected DCSync alert. Timeroasting is something you do when you are nobody: unauthenticated UDP/123, a password-derived MAC for computer and trust accounts only, still to be cracked offline, and only a weak or non-rotating secret ever falls.

Different privilege, different output, different phase. DCSync is mass credential theft; timeroasting is pre-auth recon that at best hands you one weak machine password. It is not a quieter DCSync, it is a different tool for a different moment: a lockpick is not a stealthier version of already holding the key.

The claim is loudest about pulling user hashes, and that is where it collapses. Reaching a user account means the targeted variant, where a domain admin renames the account into a machine-looking one. That takes the domain-admin access DCSync already assumes, and it fires a sAMAccountName-change event that DCSync does not. The real neighbors for timeroasting are the other roasts, Kerberoasting and AS-REP roasting.

Timeroasting and Microsoft Defender for Identity

Microsoft Defender for Identity ships a catalog of directory and Kerberos detections (Defender for Identity alerts reference). During this testing, none of them fired on timeroasting. Across eleven runs over five hours (with the sensor's detection pipeline confirmed live by a control DCSync that MDI flagged as a high-severity replication alert within roughly an hour), the MS-SNTP traffic produced no Defender for Identity alert.

Microsoft documents an alert named "Suspicious SAM Account Name Change" (xdr_SuspiciousChangeOfSamName). Its published description reads: "Detected a suspicious change of the SAM account name, which may indicate an attempt to exploit Kerberos authentication via NTP time manipulation (Timeroasting)..." (Defender for Identity XDR alerts). The description and the trigger describe different things. The alert fires on a change to a sAMAccountName, a directory modification recorded in Windows event 5136. 

Timeroasting is a separate technique that abuses the authenticated MS-SNTP reply, where a domain controller signs an NTP response with a machine account password hash keyed by RID, so a client can collect those hashes and crack them offline. Timeroasting changes no account name, manipulates no time, and reads no directory object. The same description then adds "brute-force or replay Kerberos tickets" and maps to Kerberoasting (T1558.003), a third technique again. A reader who takes the text at face value would expect this alert to cover timeroasting, while the trigger covers a SAM account name change.

The takeaway is narrow: The alert that names timeroasting fires on a directory change, and the technique it names leaves no directory footprint, so the two do not line up. For visibility into timeroasting itself, log the NTP requests as shown earlier rather than treating this alert as coverage for the technique.

In summary

MS-SNTP has two authenticator formats. Only the legacy MD5 one has public cracking support, and your modern DCs already speak the other, the SP800-108 and HMAC-SHA512 form, as normal time sync.

I read netlogon.dll and w32time.dll to get the key derivation exactly right, down to the null byte in the label, the little-endian RID context, and which function in which DLL does what, and I proved it against live DC output instead of trusting the spec text. I established that hashcat cracks only the legacy form, and shipped a verified reference implementation and a hash format for the extended one, plus a hashcat module that passes the tool's own self-test on a GPU and now only needs its real mode number assigned upstream.

 And I worked out what actually detects this, which turned out not to be packet size, because modern members send the extended form, but whether a host is asking the DC to sign for an account other than its own, with a size-agnostic volumetric rule as the easy fallback, both engine-validated where they could be.

The real value is not any single rule. It is the habit of reading the target's own code when the attacker's tool and the vendor's doc both leave a gap, then validating every claim against a live system and a real engine before you believe it. The extended form is live on patched domain controllers today, and your modern members already send it, so baseline which size is normal in your environment and detect on the one thing that does not move: a host has no business asking a DC to sign for anyone's machine account but its own.

Appendix: adjacent techniques

These two techniques sit next to timeroasting rather than inside it. Neither is the unauthenticated sweep the post is about, but both reuse the same Netlogon signing path, and the detection mirror for each is the own-RID logic from the detection section.

DigestRoast: the same digest over a different pipe

While reversing the signing path, one detail stood out. The function that builds the legacy MD5 MAC, NetrLogonComputeServerDigest, is a documented MS-NRPC method (opnum 24), callable directly over the \PIPE\netlogon named pipe. Feed it a RID and a message, and the domain controller returns MD5(NThash, message) keyed by that account: the same construction timeroast collects over UDP. I call this "DigestRoast," and the framing matters up front: DigestRoast is a sister to timeroast, not a new attack.

The construction is byte for byte the legacy timeroast MAC. Reading NlComputeMd5Digest in netlogon.dll, the DC hashes the 16-byte NT hash first, then the caller-supplied message, so the result is MD5(NThash, message). The MS-NRPC prose reads as if the message comes first, but the binary settles the order. Because the layout matches, a captured DigestRoast digest cracks with the existing hashcat mode 31300, with the chosen message sitting in the salt slot, with one constraint I confirmed the hard way. Mode 31300's salt is the 48-byte NTP response, so it only loads a 48-byte message; a shorter one (the tool's default is 11 bytes) is rejected at load with a token-length error. Sign a 48-byte message and the digest drops into mode 31300 unchanged. No new module, no new crypto.

digestroast.py calling opnum 24 for the domain controller machine account.

Figure 10. digestroast.py calling opnum 24 for the domain controller machine account. The DC returns the New and Old message digests, and the tool prints a ready-to-crack $sntp-ms$ line for hashcat mode 31300.

Two things separate DigestRoast from timeroast:

  • The transport is MS-NRPC over TCP 445 rather than MS-SNTP over UDP 123. 

  • The access requirement, the part that keeps DigestRoast from being an attack, is privileged: opnum 24 is gated by NetpAccessCheck2 for a desired access of 0x10, which requires Builtin\Administrators on the domain controller. 

Three live calls confirm the gate: a null session and a low-privileged user each return 0x5, and a domain administrator returns 0x0. If you can already call opnum 24, you already hold the domain, and you would pull the hash with DCSync rather than crack a MAC. So DigestRoast earns a footnote, not a section of its own.

DigestRoast's one defensive wrinkle is the pipe it uses. It pulls password-derived material down \PIPE\netlogon, not the DRSUAPI replication interface a DCSync detection watches, so the 4662 signatures never fire. The same is true of its netsync relatives NetrServerPasswordGet, NetrServerTrustPasswordsGet, and NetrServerGetTrustInfo. The event that does see it is a 5145 named-pipe access for \PIPE\netlogon (Figure 13), which is off by default. Enable Detailed File Share auditing and watch the Netlogon pipe.

DCSync construction

Figure 11. The construction proven end to end. DCSync recovers the machine account NT hash, and MD5 of that NT hash followed by the chosen message reproduces the exact digest opnum 24 returned, confirming MD5(NThash followed by message) and the hashcat 31300 format against live output rather than the spec text.

Sweeping a RID range collects the roastable set directly: machine and trust accounts answer and users return an error. Pass the DC NetBIOS name to the server-name argument, since an IP returns ERROR_INVALID_COMPUTERNAME, and pad the signed message to 48 bytes so each digest is written as a hashcat 31300 line (mode 31300's salt is the 48-byte NTP response, so a shorter message will not load).

DigestRoast sweeping RIDs 1000-2000 over MS-NRPC opnum 24

Figure 12. DigestRoast sweeping RIDs 1000-2000 over MS-NRPC opnum 24. Nine machine and trust accounts answer and users do not, so the output is already the roastable set, the same machine/trust-only population timeroast sees over UDP/123, here over the Netlogon pipe. The --pad48 flag signs a 48-byte message so each returned digest is written straight out as a hashcat -m 31300 line, with that 48-byte message sitting in the salt slot.

5145 \PIPE\netlogon access

Figure 13. The event that does see DigestRoast: a 5145 \PIPE\netlogon access (Share \\*\IPC$, Relative Target Name netlogon) from labadmin at 10.0.1.100. The credential egress rides the Netlogon pipe, and 5145 for named pipes is off by default, so Detailed File Share auditing has to be enabled before this event appears at all.

Trustroasting: roasting the trust, and the targets that do not rotate

A trust account is a machine-shaped account. An interdomain trust stores its secret in a user object whose userAccountControl carries UF_INTERDOMAIN_TRUST_ACCOUNT, and the domain controller signs an MS-SNTP reply for its RID exactly as it signs for a workstation. So a trust answers a timeroast sweep, and it answers DigestRoast over opnum 24, with the same MD5 construction and the same hashcat mode 31300. A cracked trust account hands you not one computer but the inter-realm trust key, which forges referral tickets across the trust. 

The catch is that the secret has to be crackable: a random rotating trust password is as uncrackable as any machine secret, so this pays off only against the weak or non-rotating cases named below. Tom Tervoort named this "Trustroasting" in his original work, so the technique is not new. What is missing is the tooling: NetExec sweeps a RID range and never identifies which RIDs are trusts, and nothing public does it over RPC or pairs it with the triage below.

There is a second path to the same trust key, and it is pure Kerberos. Adam Chester described "inter-realm key roasting" in 2019. Any authenticated user requests a cross-realm referral ticket for the trusted realm, and the ticket comes back encrypted under the inter-realm trust key. Capture that referral, format it as a krb5tgs record, and crack it with hashcat mode 13100 when the trust key is RC4. So a trust secret is reachable three ways, over MS-SNTP, over MS-NRPC opnum 24, and through the Kerberos referral, and all three crack to the same key.

The reason most of this does not pay off is rotation. Machine and trust passwords roll on roughly a thirty-day cycle, so a cracked MAC is valid for at most 30 days, and a random machine secret never falls in that window anyway. The accounts that matter are the ones that break that defense. The Seamless SSO account AZUREADSSOACC does not rotate on its own, so a crack of it stays valid, and its key forges SSO tickets into Entra. A pre-created, or pre-Windows 2000, computer account carries PASSWD_NOTREQD and a password equal to the lowercase account name, so it is a guess rather than a crack. And any machine whose pwdLastSet is far past the rotation window has stopped rotating for some reason worth investigating. trustroast enumerates trusts, trust accounts, and machines, triages every one by pwdLastSet age, flags AZUREADSSOACC, pre2k, and non-rotating accounts, and roasts the set.

NEWYORK$ as the interdomain trust account

Figure 14. trustroast.py identifies NEWYORK$ as the interdomain trust account (RID 1187), not a machine account, and collects it over MS-SNTP as a hashcat 31300 line. This is collection, not recovery: DCSync or lsadump::trust /patch read the trust key directly but need domain admin, while timeroasting is unauthenticated and yields only a password-derived MAC you must crack. A random rotating trust secret like this one (pwdAge 14d) will not fall, so the value is the unauthenticated identification plus the password-age triage shown here, which marks the non-rotating trusts and machines where a crack would actually survive.

References

Research and background

Tooling

Protocol specifications

Cracking

Detection

Evidence that the extended form is long-standing and sent by modern Windows

  • chrony, ntp: detect MS-SNTP packets (adds the extended AUTH_MSSNTP_EXT case, 2016)

  • Samba bug #14757 (ntp_signd and the extended authenticator)

  • Samba AD DC time-sync breakage from Windows sending the extended authenticator by default, and the SignatureAuthAllowed=0 client workaround (independently reported by Univention, Zentyal, and Red Hat)

Mitigation

Core guidance from Microsoft Windows Time Service Tools and Settings: restrict UDP/123 to DCs and segment it off from untrusted hosts, keep machine-account password rotation enabled with AES etypes, and monitor UDP/123 for anomalous sources.

Thanks

To Tom Tervoort for the original timeroasting research this builds on, and to the KerbWolf, timeroast-ng, and NetExec maintainers, whose tooling surfaced the extended form in the first place and gave me something to reverse against.

Special thanks to Susannah Matt for her help reviewing, formatting, and publishing this post.

You might also like