-
Notifications
You must be signed in to change notification settings - Fork 689
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 OSSEC to v3.6.0 #5196
Upgrade OSSEC to v3.6.0 #5196
Conversation
I understand this is not ready for final review, but took a pass through it (clean install and upgrade install using prod VMs (to ensure email works). The upgrade on prod VMs worked as expected (though more testing will be performed as part of the final review): emails were flowing and log files didn't show any errors. A couple of things i've observed during the staging clean install: re-registrationThe registration seems to no longer be idempotent, based on my local testing. Can you reproduce the following error output by running
Upon closer inspection on the
pax flags and decoder errorsThis one is a bit confusing to me, because it only happens on clean install and was not observed on the upgrade install Based on my local testing, it's unclear if the paxflags are required on app and mon. I removed the functions in the postinst that applied the paxflags (however as a result, mon did have paxctld installed with default configuration). I did not observe any grsec errors in kern.log or syslog, but did observe some ossec errors on mon while starting the service:
|
Yup, it's confusing to me that without pax flags set (via either method), the binaries error out when they try to parse their first regex, but that there isn't a grsec error thrown in the logs. Will try to repro the registration issue above first, but after that it may be worth trying doing the ossec build with a local source build libpcre2 with JIT disabled, to try narrow things down. |
I didn't replicate the re-registration error above. On second run of
and then the other tasks don't run. |
ffb02ab
to
aa54304
Compare
Pushed an update to this with PCRE2 JIT disabled in the ossec build - this will apparently be slower but also removes the need for pax flags to be set. |
aa54304
to
058188b
Compare
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.
Thanks @zenmonkeykstop, changes look good, great find on the JIT option. All the errors observed in my previous review are no longer found in logs. I didn't observe any significant load on the system, but we should keep an eye out for that during 1.3.0 QA, especially on hardware.
See inline for two typos which I think we should fix, prior to merge.
Not immediately approving to do a bit more research about the new rules introduced in the past few versions of ossec, and observe the alerts as they flow into my inbox, to ensure there are no new noisy alerts that are being introduced. Will update this ticket later today.
Tested as follows:
staging environment
-
make staging
completes successfully - log into the app server with
molecule login -s libvirt-staging-xenial -h app-staging
-
sudo systemctl status ossec.service
shows that the ossec agent and daemons are running - the log at
/var/ossec/logs/ossec.log
shows no unexpected errors
getting the following entry:
ERROR: /queue/alerts/execq' not accessible: 'Queue not found'
This is because we don't use active response - there are no grsec denies logged in
/var/log/kern.log
related to ossec binaries
-
- log into the monitor server with
molecule login -s libvirt-staging-xenial -h mon-staging
-
sudo systemctl status ossec.service
shows that the ossec agent and daemons are running - the log at
/var/ossec/logs/ossec.log
shows no unexpected errors
NOTE: I am getting sendmail errors and DNS errors for SMTP server, but expected because email does not work out of the box in staging. Not observing any unexpected errors. These errors are not present in prod tests. - the log at
/var/ossec/logs/alerts/alerts.log
shows alerts being generated for bothmon-staging
andapp-staging
. - there are no grsec denies logged in
/var/log/kern.log
related to ossec binaries
-
-
/var/ossec/bin/agent_control -l
listsapp-staging
andmon-staging
as active agents
production (Prod VMs, using 1.2.2 VMs)
- The OSSEC server and agent services start successfully on the monitor and application server respectively.
- OSSEC emails start to flow as expected, encrypted with the key specified during installation.
- The test OSSEC email feature in the Journalist Interface works as expected.
- no unexpected errors in ossec.log
install_files/securedrop-ossec-server/usr/share/doc/securedrop-ossec-server/changelog.Debian
Outdated
Show resolved
Hide resolved
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.
Tested changes with the upgrade scenario (and observed same results as previous staging tests), changes look good to merge when CI passes.
Inspected the rules, there are a couple of new rulesets, none of which have resulted in any additional notifications :
- cimserver
- dnsmasq
- esl
- last_rootlogin * (looks like it uses last, and since we dont have root user, just admin+sudo, this should not trigger)
- linux_usbdetect * (didn't get alerts by connecting usb devices to VM)
- mhn_cowrie, dionea
- ms1016
- ms_ipsec
- ms_powershell
- topleveldomain
After reviewing alert changes on the prod install, other than a large amount of syscheck changes related to the rules and delayed notification due to #5201, I think the alerts should not significantly change from an end user perspective.
I clicked the merge button a couple of hours ago , but due to GitHub issues/outage, it seems like this PR was merged into develop in ab8d4a0 . However this PR is not displaying as |
Confirmed that the merge commit and pr commits are present on |
Lol and now it shows as merged 🙄 |
…sec-3.6.0 Upgrade OSSEC to v3.6.0
Status
Ready for review
Description of Changes
Upgrades OSSEC to version 3.6.0.
Testing
staging environment
(assuming the use of libvirt VMs)
make staging
completes successfullymolecule login -s libvirt-staging-xenial -h app-staging
sudo systemctl status ossec.service
shows that the ossec agent and daemons are running/var/ossec/logs/ossec.log
shows no unexpected errors/var/log/kern.log
related to ossec binariesmolecule login -s libvirt-staging-xenial -h mon-staging
sudo systemctl status ossec.service
shows that the ossec agent and daemons are running/var/ossec/logs/ossec.log
shows no unexpected errors/var/ossec/logs/alerts/alerts.log
shows alerts being generated for bothmon-staging
andapp-staging
./var/log/kern.log
related to ossec binariesproduction (HW or VMs)
make build-debs
.build/xenial
to the monitor server (securedrop-ossec-server*.deb
andossec-server*.deb
) and application server (securedrop-ossec-agent*.deb
andossec-agent*.deb
) and install them.Deployment
Checklist
If you made changes to the system configuration:
If you made non-trivial code changes: