-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Winlogbeat to v8.x #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed the same bug in the agent installer from activecm/BeaKer#75 where we need to pass through the BeatsVersion. Other than that, all of the code looks good to me.
I plan on testing the following agents with the new version of the Espy server code:
-7.5 (from a previous install)
-7.17
-8.7
agent/install-sysmon-beats.ps1
Outdated
|
||
Start-Process -FilePath powershell -Verb runAs -ArgumentList $arguments | ||
Break | ||
Start-Process -FilePath powershell -Verb runAs -ArgumentList $arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add BeatsVersion to the argument list here.
I started by installing winlogbeat 7.5, the current version of espy, and the current version of beaker. (7.5 agent -> current espy -> 7.5 es). Then, I upgraded the Espy server to the version here in this PR. This update worked well and continued to send data from the agent to elastic. (7.5 agent -> espy pr -> 7.5 es). I upgraded beaker to ES 7.17 using the PR at activecm/BeaKer#75 next. Data continued to flow correctly. (7.5 agent -> espy pr -> 7.17 es). Afterwards, I upgraded the winlogbeat agent to 7.17 using the new agent installer in this PR. Everything went well. I double checked that both the zeek logs and elastic were being updated. (7.17 agent -> espy pr -> 7.17 es). Next, I upgraded beaker to ES 8.7. Things continued to work well. (7.17 agent -> espy pr -> 8.7 es). Finally, I upgraded the winlogbeat agent to 8.7 using the installer in this PR, and everything continued to work corretly. (8.7 agent -> espy pr -> 8.7 es). Once we fix the BeatsVersion bug above, this PR should be good to go. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great work!
Closes #67
Somewhat depends on activecm/BeaKer#75
Agent Changes:
C:\Program Files\winlogbeat-*
toC:\Program Files\Winlogbeat-Espy
in order to be able to install newer versions of winlogbeat and more easily detect the currently installed versionBeatsVersion
, that allows the desired version of winlogbeat to be installed to be overriddenwinlogbeat.yml
config as needed for 7.17 and 8.x- script
entry withinprocessors
that refers towinlogbeat-sysmon.js
is removed because it will cause winlogbeat to not run if it still existsServer Changes:
json.Number
, as newer versions of Winlogbeat use strings to represent numbers. This data type makes it easy to parse both integers and strings using the same struct field and not requiring a custom unmarshallerECSRecord
type.