// question

An analyst reviewing Windows process logs wants to spot instances where a native time tool was repurposed to introduce a delay. Which full W32tm invocation, including the stripchart and period flags, appears in the logs?

Reference KQL answer and model-by-model comparison.

d5d5a6b0-0f92-42d8-985d-47aafa2dd4db
question id
18/23
models correct
1
valid answer
78%
success rate
// reference answer

Human-validated correct answer for this question.

W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
// model comparison
ModelAnswerKQL queryStatusTriesTimeCost
gemini-2.5-flash-preview-04-17
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where FileName == "w32tm.exe"
| where ProcessCommandLine has "stripchart" and ProcessCommandLine has "period"
| project Timestamp, DeviceName, InitiatingProcessCommandLine, ProcessCommandLine, AccountName, AccountDomain
pass17.76s0.0024
gpt-35-turbo
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where ProcessCommandLine contains 'w32tm' and ProcessCommandLine contains '/stripchart' and ProcessCommandLine contains '/period'
pass38.86s0.0084
gpt-4-turbo-2024-04-09
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where ProcessCommandLine has 'w32tm' and ProcessCommandLine has 'stripchart' and ProcessCommandLine has 'period'
| project DeviceName, ProcessCommandLine, ProcessCreationTime, FileName, FolderPath
| distinct ProcessCommandLine
pass19.82s0.0513
gpt-4.1
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where FileName =~ "w32tm.exe"
| where ProcessCommandLine has "stripchart" and ProcessCommandLine has "period"
| project TimeGenerated, DeviceName, AccountName, ProcessCommandLine
pass14.14s0.0109
gpt-4.1-finetuned
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
// Use case-insensitive regex to match W32tm invocations with stripchart and period flags in any order
| where ProcessCommandLine matches regex @"(?i)w32tm[\s\S]*stripchart[\s\S]*period"
| extend FullW32tmInvocation = tostring(ProcessCommandLine)
| project-reorder TimeGenerated, DeviceName, AccountName, FullW32tmInvocation
| distinct TimeGenerated, DeviceName, AccountName, FullW32tmInvocation
| sort by TimeGenerated desc
pass318.32s0.0221
gpt-4.1-mini
no answer
no query generatedfail50.00s0.0073
gpt-4.1-nano
w32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where ProcessCommandLine contains 'w32tm'
| where ProcessCommandLine contains 'stripchart'
| where ProcessCommandLine contains 'period'
pass12.44s0.0009
gpt-4o
no answer
no query generatedfail50.00s0.0572
gpt-5-high
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where tolower(FileName) in ("w32tm.exe","w32tm") or tolower(ProcessCommandLine) contains "w32tm"
| extend cmd = tostring(ProcessCommandLine)
| where tolower(cmd) contains "/stripchart" and (tolower(cmd) contains "/period" or tolower(cmd) contains "-period")
| extend Period = toint(extract(@"(?i)(?:/|-)period[:=\s]+(\d+)", 1, cmd))
| summarize Count = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), Devices = dcount(DeviceName) by FullInvocation = cmd, Period
| order by Count desc, LastSeen desc
pass177.52s0.0430
gpt-5-mini-high
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
let stripchart_flags = dynamic(["-stripchart","/stripchart","--stripchart"]);
let period_flags = dynamic(["-period","/period","--period"]);
let contains_any = (s:string, arr:dynamic){ array_length(set_intersection(split(tolower(s), ' '), arr)) > 0 };

union isfuzzy=true
    (DeviceProcessEvents
        | extend Cmd = tostring(ProcessCommandLine), Time=TimeGenerated
        | where isnotempty(Cmd)
        | where tolower(FileName) contains "w32tm" or tolower(Cmd) contains "w32tm"
        | where (Cmd has_any ("-stripchart","/stripchart","--stripchart","stripchart")) and (Cmd has_any ("-period","/period","--period","period"))
        | project Time, DeviceName, FileName, ProcessId, Cmd, InitiatingProcessFileName, InitiatingProcessCommandLine, ReportId, TenantId
    ),
    (DeviceEvents
        | extend Cmd = coalesce(tostring(ProcessCommandLine), tostring(InitiatingProcessCommandLine)), Time=TimeGenerated
        | where isnotempty(Cmd)
        | where tolower(FileName) contains "w32tm" or tolower(Cmd) contains "w32tm"
        | where (Cmd has_any ("-stripchart","/stripchart","--stripchart","stripchart")) and (Cmd has_any ("-period","/period","--period","period"))
        | project Time, DeviceName, FileName, ProcessId, Cmd, InitiatingProcessFileName, InitiatingProcessCommandLine, ReportId, TenantId
    )
| distinct Cmd, DeviceName, FileName, ProcessId, InitiatingProcessFileName, InitiatingProcessCommandLine, ReportId, TenantId, Time
| order by Time desc
| limit 100
pass110.88s0.0030
gpt-5-mini-low
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
let w32tm_re = @"(?i)\bw32tm(?:\.exe)?\b";
let strip_re = @"(?i)(?:/|-){1,2}stripchart\b";
let period_re = @"(?i)(?:/|-){1,2}period(?:[:\s]*\d+)?\b";
union DeviceProcessEvents, DeviceEvents, DeviceFileEvents, DeviceImageLoadEvents, DeviceRegistryEvents
| extend FullCommandLine = coalesce(ProcessCommandLine, InitiatingProcessCommandLine)
| where isnotempty(FullCommandLine)
| where FullCommandLine matches regex w32tm_re
  and FullCommandLine matches regex strip_re
  and FullCommandLine matches regex period_re
| extend PeriodValue = extract(@"(?i)(?:/|-){1,2}period(?:[:\s]*(\d+))", 1, FullCommandLine)
| extend ComputerTarget = extract(@"(?i)(?:/|-){1,2}computer(?:[:\s]*)([^\s]+)", 1, FullCommandLine)
| project TimeGenerated, DeviceName, FileName, ProcessId = coalesce(ProcessId, InitiatingProcessId), InitiatingProcessFileName, InitiatingProcessId, Account = coalesce(AccountName, InitiatingProcessAccountName), FullCommandLine, PeriodValue, ComputerTarget
| summarize FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), Count = count(), Devices = make_set(DeviceName), Accounts = make_set(Account) by FullCommandLine, PeriodValue, ComputerTarget
| top 50 by Count desc
| project FullCommandLine, PeriodValue, ComputerTarget, Count, FirstSeen, LastSeen, Devices, Accounts
pass590.55s0.0197
gpt-5-mini-medium
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
// Find full w32tm invocations that include stripchart and period flags
DeviceProcessEvents
| where isnotempty(ProcessCommandLine) or isnotempty(InitiatingProcessCommandLine)
| extend cmd = coalesce(ProcessCommandLine, InitiatingProcessCommandLine)
// Normalize to lowercase for searching
| where tolower(cmd) has "w32tm" and (tolower(cmd) has "stripchart" or tolower(cmd) has "/stripchart" or tolower(cmd) has "-stripchart") and (tolower(cmd) has "period" or tolower(cmd) has "/period" or tolower(cmd) has "-period")
| project TimeGenerated, DeviceName, FileName, ProcessId, cmd
| distinct cmd, DeviceName, FileName, ProcessId, TimeGenerated
| order by TimeGenerated desc
| take 100
pass114.80s0.0038
gpt-5-nano-high
no answer
no query generatedfail50.00s0.0066
gpt-5-nano-medium
no answer
no query generatedfail50.00s0.0070
grok-3-beta
no answer
no query generatedfail50.00s0.0875
grok-3-mini-beta
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where ProcessCommandLine contains "w32tm" and ProcessCommandLine contains "/stripchart" and ProcessCommandLine contains "/period"
| project TimeGenerated, DeviceName, AccountName, ProcessCommandLine
| order by TimeGenerated desc
pass113.72s0.0016
o1-high
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where FileName == "w32tm.exe"
| where ProcessCommandLine has_all ("/stripchart", "/period")
| project TimeGenerated, DeviceName, AccountName, ProcessCommandLine
pass126.51s0.2096
o1-low
W32tm_/stripchart_/computer:localhost_/period:5_/dataonly_/samples:2
DeviceProcessEvents
| where FileName =~ "w32tm.exe"
| where ProcessCommandLine has "/stripchart" and ProcessCommandLine has "/period"
| project TimeGenerated, DeviceName, ProcessCommandLine
| order by TimeGenerated desc
pass135.82s0.2666
o3-high
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
// Detect use of "w32tm.exe" with the stripchart sub-command and an explicit polling period
DeviceProcessEvents
// 1. Quickly zero-in on the Windows Time utility
| where FileName =~ "w32tm.exe" or ProcessCommandLine has "w32tm"
// 2. Look for the behaviour of interest: stripchart + period flag
| where ProcessCommandLine has "stripchart"
| where ProcessCommandLine has_any ("/period", "-period")
// 3. Return the full command as it appeared together with basic context
| summarize firstSeen = min(TimeGenerated),
            lastSeen  = max(TimeGenerated),
            executions = count()
            by DeviceName,
               AccountName,
               ProcessCommandLine
// 4. Most recent/high-volume occurrences first
| order by executions desc, lastSeen desc
pass255.59s0.0357
o3-mini-high
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where ProcessCommandLine has "w32tm" and ProcessCommandLine has "stripchart" and ProcessCommandLine has "/period:"
| project TimeGenerated, DeviceName, ProcessCommandLine
| sort by TimeGenerated desc
pass166.21s0.0113
o3-mini-low
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where isnotempty(ProcessCommandLine)
| where tolower(ProcessCommandLine) contains "w32tm"
  and tolower(ProcessCommandLine) contains "stripchart"
  and tolower(ProcessCommandLine) contains "/period:"
| project TimeGenerated, DeviceName, ProcessCommandLine
| distinct ProcessCommandLine, TimeGenerated, DeviceName
pass112.87s0.0121
o4-mini-high
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where FileName == "w32tm.exe"
| where ProcessCommandLine has "stripchart" and ProcessCommandLine has "period"
| project TimeGenerated, DeviceName, InitiatingProcessAccountName, ProcessCommandLine
| order by TimeGenerated desc
pass255.89s0.0177
o4-mini-low
W32tm /stripchart /computer:localhost /period:5 /dataonly /samples:2
DeviceProcessEvents
| where FileName =~ "w32tm.exe" or FileName =~ "w32tm"
| where (ProcessCommandLine has "-stripchart" or ProcessCommandLine has "/stripchart")
    and (ProcessCommandLine has "-period" or ProcessCommandLine has "/period")
| project TimeGenerated, DeviceName, ProcessId, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| order by TimeGenerated desc
pass256.55s0.0149