Activate Windows Event Collector - Administrator Guide - Cortex XDR - Cortex - Security Operations

Cortex XDR Documentation

Product
Cortex XDR
Creation date
2024-03-06
Last date published
2024-10-01
Category
Administrator Guide
Abstract

Set up your Windows Event Collector to connect with the Cortex XDR Broker VM and collect events.

Notice

Ingesting logs and data from external sources requires a Cortex XDR Pro per GB license.

After you have configured and registered your Broker VM, activate your Windows Event Collector application.

The Windows Event Collector (WEC) runs on the Broker VM collecting event logs from Windows Servers, including Domain Controllers (DCs). The Windows Event Collector can be deployed in multiple setups, and can be connected directly to multiple event generators (DCs or Windows Servers) or routed using one or more Windows Event Collectors. Behind each Windows event collector there may be multiple generating sources.

To enable the collection of the event logs, you need to configure and establish trust between the Windows Event Forwarding (WEF) collectors and the WEC. Establishing trust between the WEFs and the WEC is achieved by mutual authentication over TLS using server and client certificates. The WEF, a WinRM plugin, runs under the Network Service account. Therefore, you need to provide the WEFs with the relevant certificates and grant the account access permissions to the private key used for client authentication, for example, authenticate with WEC.

Note

You can also activate the Windows Event Collector on Windows Core. For more information, see Activate Windows Event Collector on Windows Core.

Danger

Ensure you meet the following prerequisites before activating the Windows Event Collector applet:

  • Set up and configure Broker VM

  • Broker VM version 8.0 and later

  • You have knowledge of Windows Active Directory and Domain Controllers.

  • You must configure different settings related to the FQDN where the instructions differ depending on whether you are configuring a standalone Broker VM or High Availability (HA) cluster.

  • Windows Server 2012 r2 or later.

After ingestion, Cortex XDR normalizes and saves the Windows event logs in the dataset xdr_data. The normalized logs are also saved in a unified format in microsoft_windows_raw. This enables you to search the data using Cortex Query Language (XQL) queries, build correlation rules, and generate dashboards based on the data.

Perform the following procedures in the order listed below.

  1. Select Settings → Configurations → Data Broker → Broker VMs.

  2. Do one of the following:

    • On the Brokers tab, find the Broker VM, and in the APPS column, left-click Add → Windows Event Collector.

    • On the Clusters tab, find the Broker VM, and in the APPS column, left-click Add → Windows Event Collector.

  3. In the Activate Windows Event Collector window, define the Collected Events to configure the events collected by the applet. This lists event sources from which you want to collect events.

    Field

    Description

    Source

    Select from the pre-populated list with the most common event sources on Windows Servers. The event source is the name of the software that logs the events.

    A source provider can only appear once in your list. When selecting event sources, depending on the type event you want to forward, ensure the event source is enabled, for example auditing security events. If the source is not enabled, the source configuration in the given row will fail.

    Min. Event Level

    Minimum severity level of events that are collected.

    Event IDs Group

    Whether to Include, Exclude, or collect All event ID groups.

    Minimal TLS Version

    Select either 1.0 or 1.2 (default) as the minimum TLS version allowed. Ensure that you verify that all Windows event forwarders are supporting the minimal defined TLS version.

    Example 29. 

    To forward all the Windows Event Collector events to the Broker VM, define as follows:

    • Source: ForwardedEvents

    • Min. Event Level: Verbose

    • Event IDs Group: All


    Note

    By default, Cortex XDR collects Palo Alto Networks predefined Security events that are used by the Cortex XDR detectors. Removing the Security collector interferes with the Cortex XDR detection functionality. Restore to Default to reinstate the Security event collection.

  4. Click Activate. After a successful activation, the APPS field displays WEC with a green dot indicating a successful connection.

  1. In the APPS column, left-click the WEC connection to display the Windows Event Collector settings, and select Configure.

  2. In the Windows Event Forwarder Configuration window, perform the following tasks:

    1. In the Subscription Manager URL field, click copy-icon.png (copy) . This will be used when you configure the subscription manager in the GPO (Global Policy Object) on your domain controller.

    2. Enter a password in the Define Client Certificate Export Password field to be used to secure the downloaded WEF certificate that establishes the connection between your DC/WEF and the WEC. You will need this password when the certificate is imported to the events forwarder.

    3. Download the WEF certificate in a PFX format to your local machine.

      To view your Windows Event Forwarding configuration details at any time, select your Broker VM, right-click and navigate to Windows Event Collector → Configure.

    Cortex XDR monitors the certificate and triggers a Certificate Expiration notification 30 days prior to the expiration date. The notification is sent daily specifying the number of days left on the certificate, or if the certificate has already expired.

Note

You must install the WEF certificate on every Windows Server, whether DC or not, for the WEFs that are supposed to forward logs to the Windows Event Collector applet on the Broker VM.

  1. Locate the PFX file you downloaded from the Cortex XDR console and double-click to open the Certificate Import Wizard.

  2. In the Certificate Import Wizard:

    1. Select Local Machine, and then click Next.

    2. Verify the File name field displays the PFX certificate file you downloaded and click Next.

    3. In the Passwords field, specify the Client Certificate Export Password you defined in the Cortex XDR console followed by Next.

    4. Select Automatically select the certificate store based on the type of certificate, and then click Next and Finish.

  3. From a command prompt, run certlm.msc.

  4. In the file explorer, navigate to Certificates and verify the following for each of the folders:

    • In the Personal → Certificates folder, ensure the certificate forwarder.wec.paloaltonetworks.com is displayed.

    • In the Trusted Root Certification Authorities → Certificates folder, ensure the CA ca.wec.paloaltonetworks.com is displayed.

  5. Navigate to Certificates Personal Certificates.

  6. Right-click the certificate and navigate to All tasks → Manage Private Keys.

  7. In the Permissions window, select Add and in the Enter the object name section, enter NETWORK SERVICE, and then click Check Names to verify the object name. The object name is displayed with an underline when valid. and then click OK.

    certificate-permission.png
  8. Click OK, verify the Group or user names that are displayed, and then click Apply Permissions for private keys.

    verify-permissions.png

Note

You must install the WEF certificate on every Windows Server, whether DC or not, for the WEFs that are supposed to forward logs to the Windows Event Collector applet on the Broker VM.

  1. To enable events forwarders to forward events, the Network Service account must be a member of the Active Directory Event Log Readers group. In PowerShell, execute the following command on the domain controller that is acting as the event forwarder:

    PS C:\> net localgroup "Event Log Readers" "NT Authority\Network Service" /add

    Make sure you see The command completed successfully message.

  2. Grant access to view the security event logs.

    1. Run wevtutil gl security and take note of your channelAccess value.

      Example 30. 
      `PS C:\Users\Administrator> wevtutil gl security
      name: security
      enabled: true
      type: Admin
      owningPublisher:
      isolation: Custom
      channelAccess: O:BAG:SYD:(A;;0xf0005;;;SY)(A;;0x5;;;BA)(A;;0x1;;;S-1-5-32-573)
      logging:
        logFileName: %SystemRoot%\System32\Winevt\Logs\security.evtx
        retention: false
        autoBackup: false
        maxSize: 134217728
      publishing:
        fileMax: 1
      

      Take note of value: channelAccess: O:BAG:SYD:(A;;0xf0005;;;SY)(A;;0x5;;;BA)(A;;0x1;;;S-1-5-32-573)


    2. Run wevtutil sl security "/ca:<channelAccess value>(A;;0x1;;;S-1-5-20)"

      Example 31. 
      PS C:\Users\Administrator> wevtutil sl security "/ca:O:BAG:SYD:(A;;0xf0005;;;SY)(A;;0x5;;;BA)(A;;0x1;;;S-1-5-32-573)(A;;0x1;;;S-1-5-20)"

    Make sure you grant access on each of your domain controller hosts.

  1. In a command prompt, open gpmc.msc.

  2. In the Group Policy Management window, navigate to Domains → your domain name → Group Policy Object, right-click and select New.

  3. In the New GPO window, enter your group policy Name: as Windows Event Forwarding, and click OK.

  4. Navigate to Domains → your domain name → Group Policy Objects → Windows Event Forwarding, right-click and select Edit.