Installing WinSuricata Core
Windows 10 / 11 / Server 2016 / 2019 / 2022 / 2025 (64-bit)
Written by: Michael E. Steele
Introduction
This tutorial describes how to manually install the WinSuricata Core components on a Windows x64 system. It follows the same installation sequence and performs the same Core installation tasks as the Core portion of the WinSuricata AIO Installer. The procedure is performed manually, one step at a time.The Core installation provides the Suricata intrusion detection engine and the supporting Windows components required to run it as a Windows service. This tutorial covers Suricata, Npcap, Python, Portable Git, NSSM, the Suricata configuration, the initial rules file, and the Windows integration required to start Suricata.
This is a Core-only installation. It does not install or configure the Console, Node, or Host components.
Important: This is a manual installation. Follow the steps below in order and use the exact versions and filenames listed.
Core components installed by this tutorial
- Suricata 8.0.8: The network intrusion detection engine.
- Npcap 1.90: The packet capture driver used by Suricata to access network traffic.
- Python 3.15.2: The Python runtime used by Suricata support utilities.
- Portable Git 2.56.1: A portable Git installation used by WinSuricata support functions.
- NSSM 2.24: The Non-Sucking Service Manager used to run Suricata as a Windows service.
- suricata-update: The Python utility installed for managing Suricata rules.
How this system should be prepared
- Use a supported 64-bit version of Windows.
- Install all available Windows updates before continuing.
- Use an account with local Administrator privileges.
- Make sure the computer has a working Internet connection.
- For this tutorial, the examples use 'D:\WinSuricata' as the WinSuricata installation directory and 'D:\Temp' as the download directory.
The installation paths can be changed, but the paths entered in the configuration and used in the commands throughout this tutorial must agree. This tutorial uses D:\WinSuricata and D:\Temp. If different locations are selected, substitute those paths consistently.
Preparing Windows and Downloading the Required Files
Step 1 - Create the installation and temporary directories
Open File Explorer and create the following two folders:D:\WinSuricata D:\TempThe 'D:\WinSuricata' folder will contain the installed Core components, configuration files, logs, rules, and utilities. The 'D:\Temp' folder will hold the downloaded installation files and temporary installation files.
Step 2 - Download the required Core installation files
Download and save all five files below into 'D:\Temp'. Do not rename the files. The filenames must match the names shown because the following installation instructions use those exact filenames.
Step 3 - Open an elevated PowerShell session
Right-click the Windows Start button and select 'Terminal (Admin)' or 'Windows PowerShell (Admin)'. If User Account Control opens, select 'Yes'.All commands in this tutorial must be run from an elevated PowerShell session unless otherwise noted. Keep this window open while completing the installation.
Step 4 - Set and verify the installation paths
At the PowerShell prompt, enter the following commands. These commands set the paths used throughout the tutorial. Only the first two lines ('$WinIDSRoot' and '$TempDir') need to be changed to use different locations; every other path is built from them. Run all of the tutorial commands in this same PowerShell window. If the window is closed, run this step again before continuing.$WinIDSRoot = 'D:\WinSuricata' $TempDir = 'D:\Temp' $SuricataPath = Join-Path $WinIDSRoot 'Suricata' $LogsPath = Join-Path $WinIDSRoot 'Logs' $GitDir = Join-Path $WinIDSRoot 'Git' $PythonDir = Join-Path $WinIDSRoot 'Python' $ToolsDir = Join-Path $WinIDSRoot 'Tools' $NssmDir = Join-Path $ToolsDir 'nssm' $UtilitiesDir = Join-Path $WinIDSRoot 'Utilities' $PythonExe = Join-Path $PythonDir 'python.exe' $SuricataExe = Join-Path $SuricataPath 'suricata.exe' $NssmExe = Join-Path $NssmDir 'nssm.exe' Test-Path $WinIDSRoot Test-Path $TempDir
Both commands should return 'True'. If either returns 'False', create the missing directory before continuing.
Step 5 - Verify Internet connectivity
The Core installation downloads Python support files and the installation components from their respective project websites. Verify that the computer can reach the Internet.Test-NetConnection 1.1.1.1 -Port 53
The 'TcpTestSucceeded' result should be 'True'. Do not continue until Internet connectivity is available.
Step 6 - Identify the local IPv4 address
Suricata will be configured to monitor the local network interface using the computer's IPv4 address. Display the active network connection profiles:Get-NetConnectionProfile
Identify the active interface and display its IPv4 address:
Get-NetIPAddress -AddressFamily IPv4 |
Where-Object {
$_.IPAddress -notlike '127.*' -and
$_.IPAddress -notlike '169.254.*' -and
$_.InterfaceAlias -notmatch 'Loopback|vEthernet|WSL|Hyper-V|WireGuard'
} |
Format-Table InterfaceAlias, IPAddress, PrefixLength
Record the IPv4 address belonging to the physical network adapter that Suricata should monitor. Do not use a loopback address (127.x.x.x), an automatic private address (169.254.x.x), or a virtual adapter address unless that is intentionally the network being monitored.
The IP address selected here is used later when registering the Suricata Windows service. Make sure it belongs to the correct active network adapter.
Step 7 - Configure the WinSuricata registry settings
Create the WinSuricata registry key and write the installation paths and restore-point setting. The commands below use the example paths in this tutorial.
$RegPath = 'HKLM:\SOFTWARE\Suricata'
New-Item -Path $RegPath -Force | Out-Null
New-ItemProperty -Path $RegPath -Name 'WinIDSRoot' `
-Value $WinIDSRoot -PropertyType String -Force | Out-Null
New-ItemProperty -Path $RegPath -Name 'TempDir' `
-Value $TempDir -PropertyType String -Force | Out-Null
Step 8 - Create the WinSuricata directory structure
Create the directories required by the Core installation:
$Directories = @(
"$WinIDSRoot\Conf",
"$WinIDSRoot\Tools",
"$WinIDSRoot\Tools\nssm",
"$WinIDSRoot\Logs",
"$WinIDSRoot\Git",
"$WinIDSRoot\Python",
"$WinIDSRoot\Suricata",
"$WinIDSRoot\Suricata\rules",
"$WinIDSRoot\Suricata\etc",
"$WinIDSRoot\Suricata\temp",
$TempDir
)
foreach ($Directory in $Directories) {
New-Item -ItemType Directory -Path $Directory -Force | Out-Null
}
The primary directory structure is now in place. The downloaded installation files remain in 'D:\Temp'.
Installing the WinSuricata Core Components
Step 9 - Install Npcap
Open File Explorer and navigate to 'D:\Temp'. Double-click 'npcap-1.90.exe' to start the Npcap installation.Follow the Npcap Setup prompts. Review the license agreement and accept it. Review the installation options and retain the defaults appropriate for the Npcap 1.90 installation, then complete the installation.
After the installer closes, return to the elevated PowerShell window and verify that the Npcap driver service is running:
Get-Service -Name npcap
The service status should be 'Running'. Npcap is required for Suricata packet capture. Do not continue until the Npcap installation is verified.
Step 10 - Add Microsoft Defender exclusions
The Core installer attempts to add exclusions for the WinSuricata installation root, temporary download directory, Suricata directory, and log directory. In elevated PowerShell, run:
foreach ($Path in @($WinIDSRoot, $TempDir, $SuricataPath, $LogsPath)) {
Add-MpPreference -ExclusionPath $Path
}
If the Microsoft Defender PowerShell cmdlet is unavailable on the installed Windows edition, this operation may be skipped. If an exclusion command reports an error, review the Defender configuration rather than assuming the exclusion was added.
Step 11 - Install Portable Git
The Portable Git installer is a self-extracting archive. Extract it into the WinSuricata Git directory:
Start-Process -FilePath (Join-Path $TempDir 'PortableGit-2.56.1-64-bit.7z.exe') `
-ArgumentList "-y -o`"$GitDir`"" -Wait
Verify that the Git executable exists:
Test-Path (Join-Path $GitDir 'cmd\git.exe')
The result must be 'True'. Add the Git command directory to the current machine PATH:
$GitCmd = Join-Path $GitDir 'cmd'
$MachinePath = [Environment]::GetEnvironmentVariable('Path','Machine')
if (($MachinePath -split ';') -notcontains $GitCmd) {
[Environment]::SetEnvironmentVariable('Path', (($MachinePath.TrimEnd(';') + ';' + $GitCmd).Trim(';')), 'Machine')
}
Step 12 - Install Python
The Core installation uses Python 3.15.2 and installs it under the WinSuricata directory. Run the following command from elevated PowerShell:
$PythonInstaller = Join-Path $TempDir 'python-3.15.2-amd64.exe'
$PythonArgs = "/quiet /norestart InstallAllUsers=0 PrependPath=0 Include_test=0 TargetDir=`"$PythonDir`""
$Process = Start-Process -FilePath $PythonInstaller `
-ArgumentList $PythonArgs -Wait -PassThru
$Process.ExitCode
A successful installation returns exit code 0. Verify that Python was installed in the correct directory:
Test-Path $PythonExe & $PythonExe --version
The Python executable should be present and report version 3.15.2.
Add the Python installation and Scripts directories to the machine PATH:
$PythonPaths = @(
$PythonDir,
(Join-Path $PythonDir 'Scripts')
)
$MachinePath = [Environment]::GetEnvironmentVariable('Path','Machine')
foreach ($PathEntry in $PythonPaths) {
if (($MachinePath -split ';') -notcontains $PathEntry) {
$MachinePath = $MachinePath.TrimEnd(';') + ';' + $PathEntry
}
}
[Environment]::SetEnvironmentVariable('Path', $MachinePath, 'Machine')
Step 13 - Install pip and suricata-update
Verify that pip is available:& $PythonExe -m pip --version
If pip is not installed, download the official bootstrap script and use the WinSuricata Python installation to install it:
$GetPip = Join-Path $TempDir 'get-pip.py'
curl.exe -L --fail --silent --show-error `
-o $GetPip `
'https://bootstrap.pypa.io/get-pip.py'
& $PythonExe $GetPip --quiet
Remove-Item $GetPip -Force -ErrorAction SilentlyContinue
Upgrade pip and install or upgrade suricata-update:
& $PythonExe -m pip install --upgrade pip & $PythonExe -m pip install --upgrade suricata-update
Verify the installation:
& $PythonExe -m pip show suricata-update
Step 14 - Install the Suricata engine
Suricata is installed using the Windows x64 MSI package downloaded earlier. Run the following command from elevated PowerShell:
$SuricataInstaller = Join-Path $TempDir 'Suricata-8.0.8-1-64bit.msi'
$MsiArgs = "/i `"$SuricataInstaller`" /qn INSTALLDIR=`"$SuricataPath`" /norestart"
$Process = Start-Process -FilePath 'msiexec.exe' `
-ArgumentList $MsiArgs -Wait -PassThru
$Process.ExitCode
A successful MSI installation returns exit code 0. Verify that the Suricata executable exists:
Test-Path $SuricataExe
The result must be 'True'.
Step 15 - Install NSSM
NSSM is used to register Suricata as a Windows service. Extract the downloaded archive and copy the 64-bit executable into the WinSuricata Tools directory:
$ExtractPath = Join-Path $TempDir 'nssm_extracted'
New-Item -ItemType Directory -Path $ExtractPath -Force | Out-Null
tar.exe -xf (Join-Path $TempDir 'nssm-2.24.zip') -C $ExtractPath
$NssmSource = Join-Path $ExtractPath 'nssm-2.24\win64\nssm.exe'
if (-not (Test-Path $NssmSource)) {
throw 'The 64-bit nssm.exe was not found in the NSSM archive.'
}
New-Item -ItemType Directory -Path $NssmDir -Force | Out-Null
Copy-Item $NssmSource $NssmExe -Force
Remove-Item $ExtractPath -Recurse -Force
Verify the executable:
Test-Path $NssmExe
The result must be 'True'.
Configuring Suricata and Preparing the Rules
Step 16 - Configure the Suricata directories and configuration files
Create the required configuration and log directories:$RulesDir = Join-Path $SuricataPath 'rules' $EtcDir = Join-Path $SuricataPath 'etc' New-Item -ItemType Directory -Path $RulesDir,$EtcDir,$LogsPath -Force | Out-Null
Move 'classification.config' and 'reference.config' into the Suricata 'etc' directory if they are present in the main Suricata directory:
foreach ($File in 'classification.config','reference.config') {
$Source = Join-Path $SuricataPath $File
if (Test-Path $Source) {
Move-Item -Path $Source -Destination $EtcDir -Force
}
}
Create 'threshold.config' if it does not already exist:
if (-not (Test-Path "$EtcDir\threshold.config")) {
New-Item -ItemType File -Path "$EtcDir\threshold.config" -Force | Out-Null
}
The Suricata configuration uses the local IPv4 address recorded in Step 6. Replace '192.168.1.100' in the command below with the actual address of the network adapter selected for monitoring:
$SuricataIP = '192.168.1.100'
if ($SuricataIP -match '^(\d{1,3}\.\d{1,3}\.\d{1,3})\.\d{1,3}$') {
$Octets = $Matches[1]
$DynamicHomeNet = "[$Octets.0/24]"
} else {
throw 'A valid local IPv4 address is required.'
}
$DynamicHomeNet
The installer derives HOME_NET by taking the first three octets of the selected IPv4 address and appending '.0/24'. For example, an address of 192.168.1.100 produces 192.168.1.0/24.
Important: This calculation assumes a /24 network. It does not inspect the actual subnet mask or prefix length of the selected network adapter. If the network uses a different subnet, correct the HOME_NET value in the configuration below to match the actual network.
Create the Suricata configuration file:
$YamlConfigPath = Join-Path $SuricataPath 'suricata.yaml'
@"
%YAML 1.1
---
sensor-name: HomeBase
vars:
address-groups:
HOME_NET: "$DynamicHomeNet"
EXTERNAL_NET: "!`$HOME_NET"
HTTP_SERVERS: "`$HOME_NET"
SMTP_SERVERS: "`$HOME_NET"
SQL_SERVERS: "`$HOME_NET"
DNS_SERVERS: "`$HOME_NET"
TELNET_SERVERS: "`$HOME_NET"
AIM_SERVERS: "any"
DC_SERVERS: "`$HOME_NET"
DNP3_SERVER: "`$HOME_NET"
DNP3_CLIENT: "`$HOME_NET"
MODBUS_SERVER: "`$HOME_NET"
MODBUS_CLIENT: "`$HOME_NET"
ENIP_SERVER: "`$HOME_NET"
ENIP_CLIENT: "`$HOME_NET"
port-groups:
HTTP_PORTS: "80"
HTTPS_PORTS: "443"
SHELLCODE_PORTS: "!80"
ORACLE_PORTS: 1521
SSH_PORTS: 22
default-rule-path: $RulesDir
classification-file: $EtcDir\classification.config
reference-config-file: $EtcDir\reference.config
threshold-file: $EtcDir\threshold.config
rule-files:
- suricata.rules
default-log-dir: $LogsPath
logging:
default-log-level: notice
outputs:
- console:
enabled: yes
outputs:
- fast:
enabled: no
filename: fast.log
append: yes
- eve-log:
enabled: yes
filetype: regular
filename: eve.json
community-id: yes
xff:
enabled: no
types:
- alert
- flow
- dns
- http
- tls
- ssh
- files
- stats
pcap:
- interface: default
checksum-checks: auto
detect:
profile: medium
stream:
memcap: 256mb
checksum-validation: yes
inline: auto
defrag:
memcap: 64mb
flow:
memcap: 128mb
hash-size: 65536
prealloc: 10000
host:
hash-size: 4096
prealloc: 1000
threading:
set-cpu-affinity: no
max-pending-packets: 4096
app-layer:
protocols:
http:
enabled: yes
tls:
enabled: yes
dns:
enabled: yes
ssh:
enabled: yes
dnp3:
enabled: no
detection-enabled: no
modbus:
enabled: no
detection-enabled: no
host-mode: auto
"@ | Set-Content -Path $YamlConfigPath -Encoding UTF8
This creates the baseline 'suricata.yaml' configuration used by the Core installation. The sensor name is set to 'HomeBase'. The configuration enables EVE JSON logging and sets the log directory to 'D:\WinSuricata\Logs'.
Step 17 - Download and install the initial Suricata ruleset
Create the Windows launcher for 'suricata-update'.
$ShimPath = Join-Path $UtilitiesDir 'suricata-update-win.py'
New-Item -ItemType Directory -Force -Path (Split-Path $ShimPath) | Out-Null
@'
import atexit
import os
import runpy
import sys
import tempfile
_original = tempfile.NamedTemporaryFile
class _WinTemp(object):
def __init__(self, handle):
self.__dict__["_handle"] = handle
def write(self, data):
written = self._handle.write(data)
self._handle.flush()
return written
def __getattr__(self, name):
return getattr(self._handle, name)
def __iter__(self):
return iter(self._handle)
def __enter__(self):
return self
def __exit__(self, *exc):
self._handle.close()
return False
def _cleanup(handle):
try:
handle.close()
os.remove(handle.name)
except OSError:
pass
def _named_temporary_file(*args, **kwargs):
kwargs["delete"] = False
handle = _original(*args, **kwargs)
atexit.register(_cleanup, handle)
return _WinTemp(handle)
tempfile.NamedTemporaryFile = _named_temporary_file
script = sys.argv[1]
sys.argv = [script] + sys.argv[2:]
runpy.run_path(script, run_name="__main__")
'@ | Set-Content -Path $ShimPath -Encoding ASCII
Get-Item $ShimPath | Select-Object FullName, Length, LastWriteTime
Download and compile the ruleset:
$SuricataUpdate = Join-Path $PythonDir 'Scripts\suricata-update'
$Launcher = Join-Path $UtilitiesDir 'suricata-update-win.py'
$RulesDir = Join-Path $SuricataPath 'rules'
$DataDir = Join-Path $SuricataPath 'suricata-update-data'
$DisableFile = Join-Path $SuricataPath 'etc\disable.conf'
foreach ($f in @($PythonExe, $SuricataUpdate, $Launcher, $SuricataExe)) {
if (-not (Test-Path $f)) { throw "Not found: $f" }
}
& $PythonExe -m pip install --quiet --upgrade certifi pyyaml
$env:SSL_CERT_FILE = (& $PythonExe -c "import certifi; print(certifi.where())")
$env:PYTHONUTF8 = '1'
New-Item -ItemType Directory -Force -Path $DataDir, (Split-Path $DisableFile) | Out-Null
Set-Content -Path $DisableFile -Value @('re:file\.magic') -Encoding ASCII
$Common = @('--suricata', $SuricataExe, '--data-dir', $DataDir)
& $PythonExe $Launcher $SuricataUpdate update-sources @Common
if ($LASTEXITCODE -ne 0) { throw 'Unable to update the Suricata rule-source list.' }
& $PythonExe $Launcher $SuricataUpdate enable-source et/open @Common
if ($LASTEXITCODE -ne 0) { throw 'Unable to enable the Emerging Threats Open ruleset.' }
Remove-Item (Join-Path $RulesDir 'suricata.rules') -Force -ErrorAction SilentlyContinue
& $PythonExe $Launcher $SuricataUpdate @Common -o $RulesDir --no-test --disable-conf $DisableFile
if ($LASTEXITCODE -ne 0) { throw 'The initial Suricata ruleset could not be downloaded and compiled.' }
Confirm that the rules file was created and contains data:
$RulesDir = Join-Path $SuricataPath 'rules'
$RulesFile = Join-Path $RulesDir 'suricata.rules'
if (-not (Test-Path $RulesFile) -or (Get-Item $RulesFile).Length -eq 0) {
throw 'The initial suricata.rules file is missing or empty.'
}
Get-Item $RulesFile | Select-Object FullName, Length, LastWriteTime
Remove everything else from the rules folder. Suricata loads only 'suricata.rules' (see 'rule-files' in 'suricata.yaml'), so any other files in this folder, including the individual '*-events.rules' files and any 'suricata.rules.tmp', are not used and must be removed. Only 'suricata.rules' should remain:
Get-ChildItem $RulesDir -Force |
Where-Object { $_.Name -ne 'suricata.rules' } |
Remove-Item -Recurse -Force
Get-ChildItem $RulesDir -Force | Format-Table Name, Length, LastWriteTime
The listing must show only 'suricata.rules'.
Test the Suricata configuration and the newly installed rules:
& $SuricataExe `
-T -c $YamlConfigPath -v 2>&1 |
Tee-Object -FilePath (Join-Path $LogsPath 'Suricata-Test.log')
$LASTEXITCODE
The test must complete successfully and return an exit code of 0 before continuing. Review 'D:\WinSuricata\Logs\Suricata-Test.log' if errors are reported. Do not proceed to register the Windows service until the rules and configuration pass validation.
Step 18 - Create the initial Suricata rules baseline
The Core installation creates a SHA-256 hash and baseline metadata for the combined 'suricata.rules' file. First verify that the file exists and is not empty:
$RulesFile = Join-Path $SuricataPath 'rules\suricata.rules'
if (-not (Test-Path $RulesFile) -or (Get-Item $RulesFile).Length -eq 0) {
throw 'suricata.rules is missing or empty. A valid rules file is required.'
}
Create the Suricata temporary directory and calculate the baseline values:
$SuricataTemp = Join-Path $SuricataPath 'temp'
New-Item -ItemType Directory -Path $SuricataTemp -Force | Out-Null
$RulesHash = (Get-FileHash $RulesFile -Algorithm SHA256).Hash
$RulesInfo = Get-Item $RulesFile
$RuleCount = @(
Get-Content -Path $RulesFile |
Where-Object {
$_ -and $_.Trim() -ne '' -and $_.Trim() -notmatch '^#'
}
).Count
$SuricataVersion = (& $SuricataExe -V 2>&1) -replace '[^0-9.]', ''
Set-Content -Path "$SuricataTemp\suricata.rules.sha256" `
-Value $RulesHash.ToUpperInvariant() -Encoding ASCII
@(
"RuleFile=$RulesFile"
"SHA256=$($RulesHash.ToUpperInvariant())"
"RuleCount=$RuleCount"
"FileSize=$($RulesInfo.Length)"
"Created=$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')"
"SuricataVersion=$SuricataVersion"
) | Set-Content -Path "$SuricataTemp\suricata.rules.baseline" -Encoding UTF8
Verify that both baseline files were created:
Get-ChildItem (Join-Path $SuricataPath 'temp\suricata.rules*') |
Format-Table Name, Length, LastWriteTime
The rules baseline records the SHA-256 hash and basic metadata for the initial rules file. The one-time rules download and compilation were completed in Step 17. Future rule updates are covered separately in the WinSuricata Rules Updater addendum.
Registering Suricata with Windows
Step 19 - Register and start the Suricata Windows service
Use NSSM to register Suricata as a Windows service. Replace the example IP address below with the actual monitoring IPv4 address recorded in Step 6.$SuricataIP = '192.168.1.100' $YamlConfigPath = Join-Path $SuricataPath 'suricata.yaml' $SuricataArgs = "-c `"$YamlConfigPath`" -i `"$SuricataIP`"" & $NssmExe install Suricata $SuricataExe $SuricataArgs & $NssmExe set Suricata AppDirectory $SuricataPath & $NssmExe set Suricata Description 'Suricata Intrusion Detection Engine' & $NssmExe set Suricata Start SERVICE_AUTO_START & $NssmExe set Suricata DisplayName 'Suricata IDS' sc.exe start Suricata
Verify the service status:
Get-Service -Name Suricata
The service status must be 'Running'. The service is configured for automatic startup. If it does not start, review the Suricata configuration test log and Windows service information before continuing.
Step 20 - Add the remaining WinSuricata directories to the system PATH
Add NSSM, Git, Python, Python Scripts, and the Tools directory to the machine PATH:
$AdditionalPaths = @(
$NssmDir,
(Join-Path $GitDir 'cmd'),
$PythonDir,
(Join-Path $PythonDir 'Scripts'),
$ToolsDir
)
$MachinePath = [Environment]::GetEnvironmentVariable('Path','Machine')
foreach ($PathEntry in $AdditionalPaths) {
if (($MachinePath -split ';') -notcontains $PathEntry) {
$MachinePath = $MachinePath.TrimEnd(';') + ';' + $PathEntry
}
}
[Environment]::SetEnvironmentVariable('Path', $MachinePath, 'Machine')
Close and reopen command windows for the updated PATH to be available to new processes.
Step 21 - Create the Windows Firewall rule
The Core installer creates an inbound allow rule for the Suricata executable. Run:
New-NetFirewallRule -DisplayName 'Suricata IDS' `
-Direction Inbound `
-Program $SuricataExe `
-Action Allow `
-Profile Any
If a rule named 'Suricata IDS' already exists, do not create a duplicate. Verify the rule:
Get-NetFirewallRule -DisplayName 'Suricata IDS' |
Format-List DisplayName, Enabled, Direction, Action, Profile
Step 22 - Review the active network adapters
List the active network adapters and their IPv4 addresses:
$ActiveAdapters = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' }
$AdapterResults = foreach ($Adapter in $ActiveAdapters) {
$Addresses = Get-NetIPAddress -InterfaceIndex $Adapter.InterfaceIndex `
-AddressFamily IPv4 -ErrorAction SilentlyContinue |
Where-Object { $_.IPAddress -notmatch '^(169\.254|127\.)' } |
Select-Object -ExpandProperty IPAddress
[PSCustomObject]@{
Adapter = $Adapter.Name
LinkSpeed = $Adapter.LinkSpeed
IPv4 = ($Addresses -join ', ')
}
}
$AdapterResults | Format-Table -AutoSize
Confirm that the IPv4 address used in the Suricata service command belongs to the intended network adapter.
Step 23 - Perform the final Core installation checks
Get-Service -Name npcap Get-Service -Name Suricata Test-Path $SuricataExe Test-Path (Join-Path $SuricataPath 'suricata.yaml') Test-Path (Join-Path $SuricataPath 'rules\suricata.rules') Test-Path $NssmExe Test-Path $PythonExe Test-Path (Join-Path $GitDir 'cmd\git.exe') Get-ChildItem $LogsPath Get-ChildItem (Join-Path $SuricataPath 'rules')
Confirm the following before considering the Core installation complete:
- The Npcap service is running.
- The Suricata service is running and configured for automatic startup.
- The Suricata executable and 'suricata.yaml' configuration file exist.
- The 'suricata.rules' file exists and is not empty.
- The 'rules' folder contains only 'suricata.rules'.
- The initial rules baseline files exist in 'D:\WinSuricata\Suricata\temp'.
- The Suricata configuration test completed successfully.
- The selected monitoring IPv4 address belongs to the intended network adapter.
Installation is not complete if the Suricata service is not running. A successful installation of the files alone does not confirm that Suricata is capturing network traffic. Resolve any service startup or configuration errors before treating the Core installation as operational.
Step 24 - Verify Suricata EVE JSON logging
After starting the Suricata service, verify that Suricata is writing to its EVE JSON log file.
$EveFile = Join-Path $LogsPath 'eve.json'
$Timeout = (Get-Date).AddSeconds(60)
while ((Get-Date) -lt $Timeout) {
if ((Test-Path $EveFile) -and (Get-Item $EveFile).Length -gt 0) {
break
}
Start-Sleep -Seconds 5
}
if (-not (Test-Path $EveFile) -or (Get-Item $EveFile).Length -eq 0) {
throw 'Suricata is not writing to eve.json. Check the service and EVE logging configuration.'
}
Get-Item $EveFile | Select-Object FullName, Length, LastWriteTime
A successful result confirms that:
- The 'eve.json' file was created.
- The file is no longer empty.
- Suricata has started writing EVE JSON log data.
Successful verification: Suricata is running and generating EVE JSON log data.
Verification failed: If the file remains empty after 60 seconds, check the Suricata service and EVE logging configuration before considering the installation complete.
Important notes about the Core installation
- This tutorial installs the WinSuricata Core only. It does not install EveBox, OpenSearch, OpenSSL, or the Console, Node, or Host components.
- The Core tutorial uses suricata-update once to download and compile the initial Emerging Threats Open ruleset.
- Subsequent rule updates are not part of this one-time installation tutorial; they are covered in the separate WinSuricata Rules Updater addendum.
- The generated HOME_NET value assumes a /24 network unless manually corrected.
- The Suricata Windows service uses the IPv4 address specified during service registration. If the monitored adapter or its IP address changes, the service configuration may need to be updated.
Copyright Notice
This document is Copyright © 2026 Michael Steele. All rights reserved. Permission to distribute this document is hereby granted providing that distribution is electronic, in its original form, no money is involved, and this copyright notice is maintained. Other requests for distribution will be considered.Use the information in this document at your own risk. Michael Steele disavows any potential liability of this document. This tutorial is provided without warranty, including any implied warranty of merchantability or fitness for a particular purpose.
All copyrights are owned by their respective owners, unless specifically noted otherwise. Third-party trademarks or brand names are the property of their owners. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.
