Getting Started
Wirespeed supports ingesting Windows logs & telemetry using a free, agentless architecture, which uses the following architectural components:- WEF (Windows Event Forwarding) on endpoints with logs you want
- WEC (Windows Event Collector) on a single server
- Winlogbeat: to read WEC logs (e.g., from the
ForwardedEvents
log) and send them to Logstash. - Logstash: to forward logs from Winlogbeat to Wirespeed over https.
For more information about WEF/WEC, read this Microsoft article.
WEF (Windows Event Forwarding)
WEF is Microsoft’s native (no agent required) method for collecting Windows logs and telemetry to send to a centralized location. Typically this is from on-premises or private cloud Windows servers, but this could include high value Windows endpoints as well. We call these systems source systems in the context of this documentation.WEC (Windows Event Collection)
WEC is Microsoft’s native (no agent required) method for centrally collecting logs from source systems. In a simple architecture, there will be a single WEC Server within an on-premises or private cloud environment that will serve as the WEC Server. This should not be a Domain Controller (those are WEF source systems instead).Winlogbeat
Winlogbeat is one of many Beats Elastic provides for shipping data. Winlogbeat ships Windows event logs to Elasticsearch or Logstash and can be installed as a Windows service.Logstash
Logstash is an open source server-side data processing pipeline that can ingest data from a multitude of sources, transforms it, and then sends it to a “stash.”Configure Windows Event Forwarder
There are several options for deploying WEF + WEC. Our recommendation uses Group Policy to instruct Windows hosts to push telemetry to the WEC server, rather than pull. You’re welcome to use the pull method, but that’s not in this documentation.- Open Group Policy Management
- On a domain controller or admin workstation, run gpmc.msc.
- Create a new GPO (Group Policy Object)
- Right-click the OU where your servers reside (e.g.,
Servers OU
) → Create a GPO in this domain, and Link it here. - Name:
Windows Event Forwarding
. - Right-click the GPO > Edit.
- Right-click the OU where your servers reside (e.g.,
- Enable WinRM Service (Without Remote Management)
- Computer Configuration > Policies > Windows Settings > Security Settings > System Services.
- Set Windows Remote Management (WS-Management) to Automatic.
- **[OPTIONAL] **Wirespeed recommends you block incoming WinRM network traffic on any Windows endpoints where it is not needed, as this enables an avenue for lateral movement by attackers. That said, the WEC Server must have this enabled, so if you do make this change, separate your WEC server into a different OU where this Group Policy setting does not affect it.
- Computer Configuration > Policies > Administrative Templates > Windows Components > Windows Remote Management (WinRM) > WinRM Service.
- Set to Disabled
- Computer Configuration > Policies > Windows Settings > Security Settings > System Services.
- Define the WEC Server Address
- Computer Configuration > Policies > Administrative Templates > Windows Components > Event Forwarding.
- Enable the setting and put the following into the Option field:
Server=http://WEC-Server01.domain.local:5985/wsman/SubscriptionManager/WEC,Refresh=60
- Replace
WEC-Server01.domain.local
with your WEC server’s FQDN. Port5985
is the standard for WinRM over HTTP. Port5986
is standard for WinRM over HTTPS, but this requires a proper internally-deployed TLS Certificate Authority in your Active Directory environment so that all endpoints can trust the HTTPS certificates. Without a proper PKI, leave this as5985
over HTTP.
- Enable PowerShell Logging and Transcription
- Computer Configuration > Policies > Administrative Templates > Windows Components > Windows PowerShell
- Enable Turn on PowerShell Script Block Logging
- Check
Log script block invocation start/stop events
(4105/4106)
- Check
- Enable Turn on Module Logging
- Set
Module Names
to*
- Set
- Enable Turn on PowerShell Transcription
- Transcription Output Directory: Leave blank (defaults to
%UserProfile%\Documents\PowerShell_transcripts
) - Check Include invocation headers.
- Transcription Output Directory: Leave blank (defaults to
- Enable Turn on PowerShell Remoting Transcription (if available)
- Transcription Output Directory: Leave blank (defaults to
%UserProfile%\Documents\PowerShell_transcripts
) - Check Include invocation headers.
- Transcription Output Directory: Leave blank (defaults to
- Enable Command Line Logging
- Computer Configuration > Policies > Administrative Templates > System > Audit Process Creation
- Enable “Include command line in process creation events”
- This populates the CommandLine field in Security Event ID 4688 for all process creations
- Define Minimum Logging
- Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Detailed Tracking
- Enable Audit Process Creation
- Set to Success (Event ID 4688 for PowerShell invocation)
- Enable Audit Process Creation
- Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Account Logon
- Enable Audit Kerberos Authentication Service
- Set to Success and Failure (Event IDs 4768, 4771)
- Enable Audit Kerberos Service Ticket Operations
- Set to Success and Failure (Event ID 4769)
- Enable Audit Other Account Logon Events
- Set to Success and Failure (Event ID 4776)
- Enable Audit Kerberos Authentication Service
- Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Logon/Logoff
- Enable Audit Logoff
- Set to Success (Event ID 4634 for session termination)
- Enable Audit Other Logon/Logoff Events
- Set to Success and Failure (Event IDs 4648, 4778, 4779, 4800, 4801)
- Enable Audit Logoff
- Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies
- Audit Logon: Enable Success and Failure to cover local, interactive, and remote logon types (e.g., RDP, network).
- Audit Account Lockout: Enable Success and Failure
- Audit Special Logon: Enable Success (privileged logons, e.g., admin rights)
- Audit User Account Management: Enable Success and Failure (user creation, changes)
- Audit Security Group Management: Enable Success and Failure (group creation, changes)
- Audit Audit Policy Change: Enable Success and Failure (audit policy modifications)
- Audit Security System Extension: Enable Success and Failure (log settings changes)
- Privilege Use: [Recommendation] Disabled or Failure only (Event IDs 4673, 4674)
- Process Creation: [Recommendation] Enabled Success (Step 6, Event ID 4688)
- **File and Registry Access (Object Access): [**Recommendation] Disabled or Failure only (Event IDs 4656, 4663)
- [Optional] If needed, enable selectively via SACLs on specific objects (out of scope)
- Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > System Audit Policies > Detailed Tracking
- Enable Task Scheduler Logging
- Computer Configuration > Policies > Administrative Templates > Windows Components > Task Scheduler
- Enable “Turn On logging for task registration”
- This generates events for scheduled task creation, modification, and execution (Event IDs 106, 200, 201)
Configure Windows Event Collector
- Identify a server (should match the server identified and set in group policy above), which must run a supported Windows Server release (Server 2016 or newer).
If you follow our recommendations above to disable WinRM incoming traffic on the monitored Windows hosts, make sure that setting does NOT apply to the WEC server, or WEC will not work.
- Download
WEC-Setup.ps1
from Wirespeed’s Github: https://github.com/WirespeedSecurity/utils/ - Create the directory
C:/Program Files/Wirespeed
and move the script there. Open a powershell terminal running as an administrator in this directory and execute the script with./WEC-Setup.ps1
. This script will:- Enable and configure the Windows Remote Management (WinRM) service: a dependency for WEC.
- Set the Windows Event Collector service (
wecsvc
) to start automatically and start it immediately usingwecutil qc
. - Add the
NT AUTHORITY\Network Service
account to the localEvent Log Readers
group to ensure the proper permissions for event collection. - Create firewall rules to allow inbound traffic on ports 5985 (WinRM over HTTP) and 5986 (WinRM over HTTPS) for WEF communication.
- Configure the WEC server to forward its own Windows events to itself (localhost) via HTTP on port 5985, enabling self-monitoring by setting the registry key
HKLM:\SOFTWARE\Policies\Microsoft\Windows\EventLog\EventForwarding\SubscriptionManager
. - Create a source-initiated WEC subscription named “Security and PowerShell Events” to collect events from the Security, Microsoft-Windows-PowerShell/Operational, Windows PowerShell, System, and Application logs, using HTTP and storing events in the ForwardedEvents log.
- To validate the configuration:
- Check the
ForwardedEvents
log in Event Viewer (eventvwr.msc
) on the WEC server to confirm that events from source systems (and the WEC server itself) are being collected. - Review the setup log at
C:\Program Files\Wirespeed\collector.log
for any errors or confirmation of successful configuration steps. - Generate a test event on a source system (e.g.,
eventcreate /Id 500 /D "Test event" /T ERROR /L System
) and verify it appears in the WEC server’sForwardedEvents
log.All of the script’s actions and errors are recorded in a log file atC:\Program Files\Wirespeed\collector.log
for any additional validation or debugging required.
- Check the
Configure Log Forwarding
For more information, reference the official documentation for Winlogbeat and Logstash.
Installing and Configuring Winlogbeat
Installation is based on Elastic’s official Winlogbeat installation guide.- Download and install Winlogbeat
- Download the zip file from the downloads page
- Extract the contents into
C:\Program Files
- Rename the
winlogbeat-<version>
directory toWinlogbeat
- Open a PowerShell prompt as an Administrator (right-click on the PowerShell icon and select Run As Administrator)
- From the PowerShell prompt, run the following commands to install the service
cd 'C:\Program Files\Winlogbeat'
.\install-service-winlogbeat.ps1
If script execution is disabled on your system, you need to set the execution policy for the current session to allow the script to run. For example:
PowerShell.exe -ExecutionPolicy UnRestricted -File .\install-service-winlogbeat.ps1
.- Configure Winlogbeat
- In
winlogbeat.yml
, replace the existing contents with the configurations below:
- In
This is a very basic configuration. It’s recommended to learn more about Winlogbeat configuration options and tailor the above to meet your specific needs. Please see Elastic’s official documentation for all available configuration options.
Installing and Configuring Logstash
Logstash requires one of the following:
- Java 17
- Java 21
-
Download and install Logstash
- Download the zip file from the downloads page
- Extract the contents into
C:\Program Files
- Rename the
logstash-<version>
directory toLogstash
- Navigate to the
C:\Program Files\Logstash\config\
directory
-
Configure Logstash
- Obtain a domain name from a Wirespeed engineer using the in-platform chat, or by emailing support@wirespeed.co
- Edit
logstash.conf
to gather events from Winlogbeat to ship to Wirespeed:- Replace the contents of the existing
logstash.conf
with the contents below (or create if none exists): - Replace
<WIRESPEED_DOMAIN_NAME>
with the domain provided by the Wirespeed engineer
- Replace the contents of the existing
- Edit
logstash.yml
to recognize the new configuration by default- Append the following lines to the file, then save it and close:
This is a very basic configuration. It’s recommended to learn more about Logstash configuration options and tailor the above to meet your specific needs. Please see Elastic’s official documentation for all available configuration options.
- Append the following lines to the file, then save it and close:
- Install Logstash as a Service
It’s recommended to run logstash manually to ensure the configuration is valid prior to running as a service. See more information here: Running Logstash ManuallyRecommended: Read more about this setup here: Running Logstash as a service with NSSM
- Download and install NSSM
- https://nssm.cc/download and extract
nssm.exe
fromnssm-<version.number>\win64\nssm.exe
toLogstash\bin\
- https://nssm.cc/download and extract
- Use NSSM to create Logstash service
- Open a PowerShell terminal as an administrator and run the following command to install Logstash as a service:
cd "C:\Program Files\Logstash\bin"
.\nssm.exe install logstash
- Once the
NSSM service installer
window appears, specify the following parameters in theApplication
tab:- Path:
C:\Program Files\Logstash\bin\logstash.bat
- Startup Directory:
C:\Program Files\Logstash\bin
- Path:
- Click Install Service and then Ok
- Open a PowerShell terminal as an administrator and run the following command to install Logstash as a service:
- Download and install NSSM
- Start Logstash and WinLogbeat:
Start-Service logstash
Start-Service winlogbeat
- Verify the services are running with
Get-Service Logstash
Get-Service winlogbeat
- Contact a Wirespeed engineer via in-platform chat or by emailing support@wirespeed.co to ensure logs are flowing as expected