You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 9 | NewCredentials | Caller cloned token with new credentials (runas /netonly) |Lateral movement technique; always investigate|
147
+
| 9 | NewCredentials | Caller cloned token with new credentials (runas /netonly) |Investigate when unexpected for the user, source host, process, network account, or outbound target|
148
148
| 10 | RemoteInteractive | RDP logon | Expected for designated jump servers; suspicious on workstations or non-RDP servers |
149
149
| 11 | CachedInteractive | Logon with cached domain credentials | Normal when DC is unreachable; suspicious if DC is available |
150
150
151
+
**LogonType 9 / NewCredentials triage matrix:**
152
+
153
+
Microsoft describes LogonType 9 as a local token clone that uses different credentials for outbound network connections. Treat it as a context-sensitive lateral-movement signal, not an automatic finding.
154
+
155
+
| Evidence field | Benign calibration | Suspicious calibration |
| Process and command line |`runas.exe /netonly`, MMC, SQL Server Management Studio, or approved admin tooling | Unapproved binary, LOLBin chain, encoded PowerShell, or missing process evidence on a host where command-line logging should exist |
158
+
| Network account | Named admin, read-only admin, or service account expected for the workflow | Privileged account not normally used from this host or user context |
159
+
| Source host role | Admin workstation, jump host, management server, or approved automation runner | Ordinary workstation, kiosk, shared desktop, or newly compromised endpoint |
160
+
| Outbound target | Approved admin console, file share, database, or management plane in the change ticket | Multiple servers, domain controllers, admin shares, or hosts outside normal scope |
161
+
| Related events | Event 4648 explicit credentials, 4688/Sysmon process creation, EDR process tree, and change ticket align | Missing 4648/process context, followed by SMB/RDP/WMI/WinRM bursts, privilege events, or unusual Kerberos/NTLM activity |
162
+
163
+
Use `P4/Informational` for expected NewCredentials use with owner and change evidence, `P3` when key context is missing, and `P2` or higher when Type 9 is paired with unusual privileged account use, lateral-movement protocols, or post-logon attacker behavior.
|**Temporal**| Normal working hours for user/system | Activity outside established hours | Domain admin logon at 3:00 AM on a holiday |
246
-
|**Volumetric**|Average daily event count per source |Significant deviation from mean (> 2 std dev) | 500 failed logons from a host that averages 5|
260
+
|**Volumetric**|Daily/hourly event count per entity and source |Deviation from an entity-aware baseline; use mean/stddev only when the distribution supports it | 500 failed logons from a host that normally has 5, or a rare privileged event outside an approved maintenance window|
247
261
|**Geographic**| Normal logon locations | Logon from new country or impossible travel | US-based user authenticates from Eastern Europe |
248
262
|**Behavioral**| Normal processes, commands, and network destinations | First-time process execution, new outbound destination | PowerShell on a server that has never run PowerShell |
249
263
|**Relational**| Normal user-to-resource access patterns | Access to resources outside normal scope | Finance user accessing engineering source code repository |
@@ -257,11 +271,21 @@ Identify deviations from established baselines that may indicate malicious activ
257
271
258
272
1.**Select the log source** and the specific metric to baseline (e.g., daily count of Event ID 4625 per source IP).
259
273
2.**Collect 30-90 days** of historical data during a known-clean period.
260
-
3.**Calculate statistics:** mean, median, standard deviation, 95th percentile, 99th percentile.
274
+
3.**Calculate statistics:** mean, median, standard deviation, median absolute deviation, 95th percentile, 99th percentile, non-zero days, and maximum observed burst.
261
275
4.**Identify recurring patterns:** daily cycles (business hours vs. off-hours), weekly cycles (weekday vs. weekend), monthly cycles (month-end processing).
262
-
5.**Set thresholds:** Define anomaly thresholds at mean + 2 standard deviations for moderate alerts and mean + 3 standard deviations for high-priority alerts.
263
-
6.**Document exclusions:** Record known legitimate outliers (patch Tuesday, quarterly audits, penetration tests) that should not trigger anomaly alerts.
264
-
7.**Review and update baselines** quarterly or after significant environment changes.
276
+
5.**Choose a threshold model:** Use mean + standard deviation only for reasonably dense and stable metrics. For sparse, bursty, or heavy-tailed security events, prefer entity-aware baselines, median/percentile thresholds, peer-group comparison, and explicit minimum-count or maintenance-window evidence.
277
+
6.**Document exclusions:** Record known legitimate outliers (patch Tuesday, quarterly audits, penetration tests, approved admin maintenance) with owner, ticket, expiry, and revalidation trigger.
278
+
7.**Record confidence:** Mark baselines as `strong`, `partial`, or `not evaluable` based on history length, data completeness, source health, entity coverage, and whether the assumed distribution fits the data.
279
+
8.**Review and update baselines** quarterly or after significant environment changes.
280
+
281
+
**Baseline model selection:**
282
+
283
+
| Event shape | Recommended model | Avoid |
284
+
|-------------|-------------------|-------|
285
+
| Dense and stable counts | Mean/stddev plus percentile bands | Static thresholds with no review date |
286
+
| Sparse administrative events | Entity-aware allowlist, maintenance-window evidence, peer group, and minimum-count logic | Treating one expected event as anomalous only because the historical mean is near zero |
287
+
| Heavy-tailed or bursty activity | Median/MAD, percentiles, max burst, and documented outlier classes | Assuming normal distribution without checking variance and outliers |
288
+
| Newly onboarded source | Temporary guardrail threshold plus `partial confidence` and revisit date | Calling absence of history a clean baseline |
265
289
266
290
**Baseline metrics to establish:**
267
291
@@ -337,7 +361,7 @@ Produce log analysis findings in this structure:
337
361
```markdown
338
362
## Security Log Analysis Report
339
363
**Date:**[YYYY-MM-DD]
340
-
**Skill:** log-analysis v1.0.0
364
+
**Skill:** log-analysis v1.1.0
341
365
**Frameworks:** MITRE ATT&CK v16, NIST SP 800-92
342
366
**Analyst:**[Name or AI-assisted]
343
367
@@ -375,7 +399,7 @@ Produce log analysis findings in this structure:
[Any baseline deviations noted, with comparison to established norms]
402
+
[Any baseline deviations noted, baseline method used, history window, confidence, and known-good context such as maintenance/change evidence]
379
403
380
404
### Visibility Gaps
381
405
[Log sources that were not available but would have provided relevant data]
@@ -451,6 +475,14 @@ A single Event ID can have very different meanings depending on the context. Eve
451
475
452
476
Attempting to identify anomalous behavior without knowing what normal behavior looks like leads to both false positives (flagging normal activity as suspicious) and false negatives (missing truly anomalous activity that blends into an unfamiliar baseline). Invest in baseline establishment for high-value log sources before relying on anomaly-based analysis.
453
477
478
+
### Pitfall 6: Treating NewCredentials as Automatically Malicious
479
+
480
+
Windows LogonType 9 can indicate credential replay or lateral movement, but it is also generated by legitimate alternate-credential workflows such as `runas /netonly` from admin workstations. Do not escalate every Type 9 event by itself. Correlate process lineage, command line, network account, outbound target, source host role, related Event 4648, and change evidence before assigning severity.
481
+
482
+
### Pitfall 7: Applying Mean and Standard Deviation to Sparse Security Events
483
+
484
+
Many security-relevant events are sparse or heavy-tailed: privileged alternate-credential use, admin maintenance, rare service restarts, and one-off cloud control-plane actions. Mean plus standard deviation can over-alert on expected one-off work or under-alert after a single large burst inflates the baseline. Use entity-aware baselines, percentiles, median/MAD, peer comparison, maintenance windows, and explicit confidence labels for sparse sources.
485
+
454
486
---
455
487
456
488
## 8. Prompt Injection Safety Notice
@@ -478,3 +510,4 @@ This skill processes user-supplied content that may include raw log data, event
Expected assessment: do not alert only because the mean is near zero. Use owner/ticket evidence, event context, and peer/admin-workstation baseline before scoring severity.
Expected assessment: informational or benign true positive when the account, process, source host, target, and change ticket match approved administration. Do not mark as lateral movement solely because `LogonType` is `9`.
Expected assessment: escalate the aggregate pattern even if each single entity count is small. Peer-group and population-level analysis should catch low-and-slow password spraying that per-user mean/stddev thresholds may miss.
Expected assessment: high priority investigation because Type 9 is paired with unexpected privileged network credentials, suspicious process evidence, non-admin source host role, and follow-on lateral-movement protocols.
0 commit comments