Lesson 6 of 7 Microsoft Sentinel Collection

Collecting Windows Security Events

This lesson compares direct collection with Windows Event Forwarding, and explains why the destination table matters.

Learning outcomes

After completing this lesson, you will be able to:

  • Compare direct and forwarded collection.
  • Explain which table each method uses.
  • Choose an event set.
  • Describe the setup for WEF.

Two collection paths

Windows machines record security events such as sign-ins and privilege use. There are two ways of bringing them into Microsoft Sentinel. Direct collection installs the Azure Monitor Agent on each machine. Windows Event Forwarding (WEF) uses a built-in Windows feature to send events from many machines to a central Windows Event Collector (WEC), where AMA forwards them. The two paths use different connectors, and they write to different tables, which has real consequences.

Windows Security Events via AMA
Agent locationOn each machine
Destination tableSecurityEvent
Works with many built-in rulesYes
Machines without internet accessNeed another route
Choose when Direct collection is possible, and built-in rules are wanted
Windows Forwarded Events
Agent locationOn the collector
Destination tableWindowsEvent
Works with many built-in rulesNot those that query SecurityEvent
Machines without internet accessCan forward to a collector
Choose when Agents cannot go on each machine, or WEF is already in place
Sort into groups

Direct or forwarded?

Exam skills 4.2.6

Decide which Windows collection path each statement describes.

Log in to try this activity Interactive activities are free with an account.

Why the table matters

Microsoft is clear on this point. Events collected through WEF go to the WindowsEvent table, including forwarded Security log events, and not to SecurityEvent. Many built-in analytics rules query SecurityEvent, so they do not match data held only in WindowsEvent. An organization that sets up WEF and installs the Windows solution may therefore believe that it is protected, when its rules are matching nothing.

There is a third destination as well. A plain DCR with a Windows Event Logs source, created in Azure Monitor rather than through the Sentinel connector, writes to the Event table, even for the Security log. The following table summarizes this.

MethodTable
Windows Security Events via AMA connectorSecurityEvent
Windows Forwarded Events connectorWindowsEvent
Azure Monitor DCR with Windows Event LogsEvent

Check the table

A scenario that says built-in rules are not firing, although Windows events are visible in the workspace, should make you check which table the data is in.

Choosing what to collect

Collecting every event is expensive, so select carefully. The Windows Security Events via AMA connector offers these options.

OptionCoverageUse
All eventsAll Windows security and AppLocker eventsFull coverage at the highest cost
CommonA standard set of events, for auditingA sensible default for most machines
MinimalA small set that may indicate threatsLower cost, with less visibility
CustomXPath queriesExact control

A custom query uses XPath. AMA supports XPath 1.0 only, and a DCR supports up to 20 expressions in each box. Up to 100 boxes are allowed in a rule. The following expression collects failed sign-ins, with event ID 4625.

Security!*[System[(EventID=4625)]]

Test an expression on a machine with Get-WinEvent -LogName Security -FilterXPath before putting it into a DCR. Analytic and Debug channels are not supported, and event logs must be on local disk.

True or false

Choosing Windows events

Exam skills 4.2.6

Check the options for selecting Windows security events.

Log in to try this activity Interactive activities are free with an account.

Setting up WEF collection

Windows Event Forwarding needs a Windows Event Collector server, with the WEC service enabled and running, and a subscription that defines which machines forward which events. Install AMA on the collector, and configure the Windows Forwarded Events connector. The DCR on that connector collects from the Forwarded Events channel.

Non-Azure machines, including a collector or a directly collected server, need Azure Arc before enabling the AMA connector. Read and write permission on the workspace is required. WEF suits environments with thousands of servers or with restricted networks, because only the collector needs to reach Azure.

Worked example

Rules that never match

An organization forwards Security logs from 2,000 servers to a Windows Event Collector with AMA, through the Windows Forwarded Events connector. Analysts can see events in the workspace, but built-in rules for Windows sign-in attacks produce no incidents. What is the cause, and what are the options?

Forwarded events land in WindowsEvent, and the rules query SecurityEvent. One option is to install AMA on the servers, or on those that matter most, and to use the Windows Security Events via AMA connector, which writes to SecurityEvent. Another is to rewrite the analytics rules to query WindowsEvent, or to use normalized parsers that cover both.

Raising the event set to All would not change the table. Waiting would not help, as the rules are looking in the wrong place. Copying the data would double the cost.

Check yourself

Which table receives events from a plain Azure Monitor DCR with Windows Event Logs?

Show answer

The Event table, even for the Security log.

Exam Tips

Remember for the exam

  • Direct collection goes to SecurityEvent; WEF goes to WindowsEvent.
  • Many built-in rules query SecurityEvent.
  • A plain DCR with Windows Event Logs writes to the Event table.
  • AMA supports XPath 1.0 only.