You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ After Sysmon starts sending data to ElasticSearch, Kibana will be ready to go. F
23
23
## Installation
24
24
25
25
### BeaKer Server System Requirements
26
-
* Operating System: The preferred platform is x86 64-bit Ubuntu 16.04 LTS. The system should be patched and up to date using apt-get.
26
+
* Operating System: The preferred platform is x86 64-bit Ubuntu 20.04 LTS. The system should be patched and up to date using apt-get.
27
27
* The automated installer will also support CentOS 7.
28
28
* Processor: Two or more cores. Elasticsearch uses parallel processing and benefits from more CPU cores.
29
29
* Memory: 8-64GB. Monitoring more hosts requires more RAM.
@@ -32,18 +32,23 @@ After Sysmon starts sending data to ElasticSearch, Kibana will be ready to go. F
32
32
### BeaKer Agent System Requirements
33
33
* Operating System: Windows x86-64 bit OS
34
34
* Powershell Version: 3+
35
+
* Installed WinLogBeats version must be <= the Elasticsearch version installed on the BeaKer server, but at least the minimum supported wire version for the Elasticsearch version
36
+
* Elasticsearch v8.6.2 supports WinLogBeats 7.17.0 through 8.6.2
37
+
* Elasticsearch v7.17.9 supports WinLogBeats 6.8.0 through 7.17.9
35
38
36
39
### Automated Install: BeaKer Server
37
40
38
41
Download the [latest release](https://github.com/activecm/BeaKer/releases/latest) tar file, extract it, and inside the `BeaKer` directory,
39
42
run `./install_beaker.sh` on the Linux machine that will aggregate your Sysmon data and host Kibana.
40
43
44
+
** Note that existing BeaKer installations must be upgraded to v7.17 before they can be upgraded to v8.x.
41
45
The automated installer will:
42
46
- Install Docker and Docker-Compose
43
47
- Create a configuration directory in `/etc/BeaKer`
44
48
- Install Elasticsearch, Kibana, and load the dashboards
45
49
- Set the Elasticsearch superuser password for the `elastic` account
46
50
- Set the `sysmon-ingest` user password for connecting WinLogBeats
51
+
- Set up index templates, ILM policy, data streams and ingest pipelines
47
52
48
53
The `beaker` script installed to `/usr/local/bin/beaker` is a wrapper around `docker-compose` and can be used to manage BeaKer.
49
54
- To stop BeaKer, run `beaker down`
@@ -55,7 +60,11 @@ After running `./install_beaker.sh` you should be able to access Kibana at `loca
55
60
56
61
Use the `elastic` account to perform your initial login to Kibana. Additional user accounts can be created using the Kibana interface. The `sysmon-ingest` user account is not allowed to access Kibana.
57
62
58
-
The Elasticsearch server will begin listening for connections on port 9200 using HTTPS. It expects Sysmon ID 3 Network Events to be published to the ES index `sysmon-%{+YYYY.MM.dd}` using the WinLogBeat schema. See the embedded `winlogbeat.yml` file in `./agent/install-sysmon-beats.ps1` for more info.
63
+
The Elasticsearch server will begin listening for connections on port 9200 using HTTPS. It expects Sysmon ID 3 Network Events to be published to:
64
+
- WinLogBeats less than v7.17.9: ES index `sysmon-%{+YYYY.MM.dd}`
65
+
- WinLogBeats v7.17.9: ES index `winlogbeat-%{[agent.version]}` via data stream
The Elasticsearch credentials are stored locally using Elastic Winlogbeat's secure
41
48
storage facilities. The ESUsername and ESPassword parameters should not be passed
@@ -44,38 +51,67 @@ enter the credentials during the installation process, or edit the parameters' d
44
51
#>
45
52
46
53
param (
47
-
[Parameter(Mandatory=$true)][string]$ESHost,
48
-
[string]$ESPort="9200",
49
-
[string]$ESUsername="",
50
-
[string]$ESPassword=""
54
+
[Parameter(Mandatory=$true)][string]$ESHost,
55
+
[string]$ESPort="9200",
56
+
[string]$ESUsername="",
57
+
[string]$ESPassword="",
58
+
[string]$BeatsVersion=""
51
59
)
52
60
53
-
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
54
-
{
61
+
$ELK_STACK_VERSION="8.7.0"
62
+
63
+
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
55
64
# Use param values instead of $args because $args doesn't appear to get populated if param values are specified
56
65
# Also set the ExecutionPolicy to Bypass otherwise this will likely fail as script
if ([string]::IsNullOrWhiteSpace("$BeatsVersion")) {
88
+
$BeatsVersion="$ELK_STACK_VERSION"
89
+
}
90
+
else {
91
+
if ($null-eq ("$BeatsVersion"-as [System.Version])) {
92
+
throw"Beats version $BeatsVersion is not a valid version, please provide a valid version number."
93
+
}
94
+
if ([System.Version]$BeatsVersion-lt [System.Version]"7.17.9") {
95
+
throw"Minimum supported Beats version is 7.17.9, exiting"
96
+
}
97
+
$OverrideBeatsVersion=$true
98
+
}
99
+
100
+
# Check for existing winlogbeat installation via Espy
101
+
if (Test-Path"$Env:programfiles\Winlogbeat-Espy"-PathType Container) {
102
+
Write-Output"Detected existing winlogbeat installation performed by Espy. Continuing the install may result in a partially working Sysmon/winlogbeat setup."
103
+
$installAnyway=Read-Host-Prompt "Are you sure you want to continue? [y/n]"
104
+
if (($installAnyway-eq'n') -or ($installAnyway-eq'N')) {
105
+
Exit
106
+
}
107
+
}
108
+
74
109
if (-not (Test-Path"$Env:programfiles\Sysmon"-PathType Container)) {
# Check if currently installed version is outdated
217
+
$InstalledBeatsVersion= (&"$Env:programfiles\Winlogbeat-BeaKer\winlogbeat.exe" version |Select-String-Pattern "(?<=winlogbeat version )(\d+\.\d+\.\d+)").Matches.Value
218
+
if ($null-eq ("$InstalledBeatsVersion"-as [System.Version])) {
219
+
220
+
if (!$OverrideBeatsVersion) {
221
+
throw"Unable to retrieve installed winlogbeat version"
222
+
}
223
+
else {
224
+
Write-Output"Unable to retrieve installed winlogbeat version, continuing anyway"
225
+
$DownloadWinlogbeat=$true
226
+
}
227
+
}
228
+
else {
229
+
if ([System.Version]"$InstalledBeatsVersion"-lt [System.Version]"$BeatsVersion") {
230
+
$DownloadWinlogbeat=$true
231
+
}
232
+
}
233
+
}
234
+
235
+
# Download winlogbeat and move it to install directory
236
+
if ($DownloadWinlogbeat) {
237
+
Write-Output"######## Downloading winlogbeat version $BeatsVersion ########"
0 commit comments