JustAnotherAdmin

Logo

This is my site for sharing back with the IT world.

View the Project on GitHub soccershoe/JustAnotherAdmin

28 October 2019

Windows Event Logging ...Part 1

by This Guy

Let’s start Logging All The Things! …Part 1

This is a long one. I’ll eventually break this article into several posts and better organize it.

Let’s set up a WEF environment!

What has a free log centralization platform built into it’s operating system? Windows. Using Windows Event Forwarding (WEF) and some Active Directory GPO’s, we can create a system where you can centralize all your logging to do what you like with. You can then send your logs on forward to Splunk or ELK or some other searching platform. Or just keep it on the centralized WEF server.

Let’s implement Windows Event Forwarding for the whole of your Windows environment.

Let’s start off with some Definitions:

What are the Requirements

alt text

How’s this work really? Don’t worry so much about details, just that this is kind of how it goes down on the client side.

The following actions occur upon first receiving appropriate GPOs on a workstation:

  1. The workstation configures security auditing GPO settings and starts writing to the local event log.
  2. As configured via GPO, the workstation connects to the subscription manager(s) using WinRM, authenticated either via Kerberos or TLS. In both cases, transport-layer encryption is applied.
  3. The workstation registers itself (writing an entry in the registry) with the Event Log Collector (WEC server), and downloads a list of all relevant WEF Subscriptions.
  4. The workstation periodically sends events to the Event Log Collector(s) as defined in the subscription files. Additionally, the workstation connects on a periodic heartbeat as scheduled via the GPO.
  5. As new devices are added to the domain and receive the appropriate security logging and WEF subscription GPOs. So they will automatically begin forwarding events, and we are now hands off and reducing the administration of making sure there is log coverage for everyone.
  6. In my environment we have lots of users in remote offices. A WEC server is deployed for an AD site, or group of AD sites (depending on load), as configured via Site-Linked GPO’s. A group policy object instructs all clients in the site to communicate with the WEF server, which provides a copy of the subscriptions that the workstation should use.

A few limits on things

While WEF provides immense value, it is not without limitations. These limitations should be considered when evaluating a WEF deployment for your organization.

Defining what’s in your WEF Subscriptions

The meat of a WEF subscription ruleset is defined by a collection of XML documents. The XML files can be imported and exported into the configuration of the WEF server Subscriptions using the command line tool, wecutil.exe. The XML schema is explained in the Microsoft MSDN documentation (links below). You can also use the GUI to define what events you are collecting. I’ve supplied some example .XML files if you prefer that route.

Custom Windows Event Channels

More details here that we don’t have to worry about quite yet. This can be a bit of a technical task and not quite a requirement for this to be successful. This is great for organizing your collected events. My example here is set up with multiple channels. Maybe I’ll provide a post or section to making this work. There are some separate requirements if you want to create your own or go beyond the example provided here.

WEF can be extended with additional custom event channels. Extending the number of event channels available provides a few primary benefits:

Here’s a link to all the files used in my deployment:

Please see tomorrow’s post for the next steps.

-Laters

tags:

comments powered by Disqus