Skip to content

[System] extend system integraation to ingest auth and security events#335

Merged
alexreal1314 merged 3 commits intomainfrom
16356-update-systme-integration
Mar 16, 2026
Merged

[System] extend system integraation to ingest auth and security events#335
alexreal1314 merged 3 commits intomainfrom
16356-update-systme-integration

Conversation

@alexreal1314
Copy link
Copy Markdown
Contributor

@alexreal1314 alexreal1314 commented Mar 16, 2026

closes https://github.com/elastic/security-team/issues/16356

What Changed

New data stream: logs-system.security-default — Windows Security event log events generated for every employee with a Windows laptop device.

Existing data streams (logs-system.auth-default, logs-system.syslog-default) are unchanged and continue to generate Linux SSH authentication and syslog events for org hosts.


Windows Security events (logs-system.security-default)

All successful login attempts (excluding service accounts):

FROM logs-system.security-default
| WHERE event.action IN ("logged-in", "logged-in-explicit")
  AND event.outcome == "success"
  AND user.name NOT IN ("SYSTEM", "NETWORK SERVICE", "LOCAL SERVICE")
| KEEP @timestamp, event.action, event.code, user.name, host.name, host.id, source.ip, winlog.logon.type
| SORT @timestamp DESC

Failed brute-force attempts with source IP breakdown:

FROM logs-system.security-default
| WHERE event.action == "logon-failed"
| STATS attempts = COUNT(*) BY source.ip, user.name
| SORT attempts DESC

Distribution of all Windows authentication event types:

FROM logs-system.security-default
| WHERE event.category == "authentication"
| STATS count = COUNT(*) BY event.action, event.code, event.outcome
| SORT count DESC

NTLM credential validation failures:

FROM logs-system.security-default
| WHERE event.action == "credential-validated" AND event.outcome == "failure"
| KEEP @timestamp, user.name, host.name, winlog.event_data.Status
| SORT @timestamp DESC

Linux SSH events (logs-system.auth-default)

Successful SSH logins by employee:

FROM logs-system.auth-default
| WHERE message LIKE "*Accepted*"
| KEEP @timestamp, message
| SORT @timestamp DESC

Failed SSH brute-force attempts:

FROM logs-system.auth-default
| WHERE message LIKE "*Invalid user*"
| KEEP @timestamp, message
| SORT @timestamp DESC

Querying both indexes together:

FROM logs-system.auth-default, logs-system.security-default
| KEEP @timestamp, message, data_stream.dataset
| SORT @timestamp DESC
| LIMIT 50

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Extends the existing System org-data integration to also generate Windows Security Event Log–style documents and ingest them into the system.security data stream, in addition to the existing Linux system.auth and system.syslog streams.

Changes:

  • Adds a new security data stream (logs-system.security-default) to the System integration.
  • Generates Windows security/authentication-related events (e.g., 4624/4625/4634/4648/4776) from employees’ Windows laptop devices.
  • Refactors timestamp sorting into a shared comparator applied to all three document arrays.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +286 to +292
// Generate Windows security events from employee Windows devices
const windowsDevices: Array<{ employee: Employee; device: Device }> = [];
for (const employee of org.employees) {
for (const device of employee.devices) {
if (device.type === 'laptop' && device.platform === 'windows') {
windowsDevices.push({ employee, device });
}
@alexreal1314 alexreal1314 merged commit a198918 into main Mar 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants