-
Notifications
You must be signed in to change notification settings - Fork 687
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
adds daily OSSEC check/alert for v2 onion service config #5682
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.
Looks good:
-
install latest prod version with only v2 onion services enabled
-
build debs from this branch
-
install built
securedrop-ossec-agent
.deb on app,securedrop-ossec-server
.deb on mon and restart OSSEC on both servers with the commandsudo systemctl restart ossec
-
observe the
/var/ossec/logs/alerts/alerts.log
file on mon and confirm there arev2_service_check
alerts generated for both app and mon -
if configured, the OSSEC alert email address receives both the alerts above
-
install latest prod version with both v2 and v3 onion services enabled
-
build debs from this branch
-
install built
securedrop-ossec-agent
.deb on app,securedrop-ossec-server
.deb on mon and restart OSSEC on both servers with the commandsudo systemctl restart ossec
-
observe the
/var/ossec/logs/alerts/alerts.log
file on mon and confirm there arev2_service_check
alerts generated for both app and mon -
if configured, the OSSEC alert email address receives both the alerts above
-
update the last prod install to use v3 onion services only via
./securedrop-admin sdconfig && ./securedrop-admin install
-
reinstall the built debs if overwritten and restart OSSEC as above
-
observe the
/var/ossec/logs/alerts/alerts.log
file on mon and confirm there are nov2_service_check
alerts generated for both app and mon -
confirm no
v2_service_check
alert emails are sent.
aa7930b
to
7955ceb
Compare
What does the email look like that's generated by these alerts - I don't see a subject line or message body in the PR itself, so I'm guessing it's fairly cryptic? If so, can we customize it to be much more explicit and human-friendly? |
Currently the subject is
Pretty typical for an OSSEC alert, with the exception of the misspelling of "favor". 😉 I'd be all for making these more readable, but how to do that isn't obvious from a glance at the OSSEC docs. |
Thanks @rmol. A level 12 alert will hopefully stand out, but if there are other ways that we can customize the subject line, that might help the email to not get lost in the flood. Regarding the body, I would suggest more directive language, e.g.:
Whether this goes into the description or the command output (assuming that's fully included in the email) doesn't matter as much, I think, as long as it's clearly visible in the email body. |
Updating language in the description field - I don't see any easy way to update the subject line either. |
7955ceb
to
d29cc32
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5682 +/- ##
===========================================
+ Coverage 85.54% 85.68% +0.13%
===========================================
Files 52 52
Lines 3771 3771
Branches 474 474
===========================================
+ Hits 3226 3231 +5
+ Misses 440 436 -4
+ Partials 105 104 -1
Continue to review full report at Codecov.
|
Updated description LGTM, thanks! |
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.
New alert text looks good to me.
Status
Ready for review
Description of Changes
Fixes #5673.
Adds a daily OSSEC check for "HiddenServiceVersion 2" matches in the
/etc/tor/torrc
files on the app and mon servers.Testing:
Prod:
install latest prod version with only v2 onion services enabled
build debs from this branch
install built
securedrop-ossec-agent
.deb on app,securedrop-ossec-server
.deb on mon and restart OSSEC on both servers with the commandsudo systemctl restart ossec
observe the
/var/ossec/logs/alerts/alerts.log
file on mon and confirm there arev2_service_check
alerts generated for both app and monif configured, the OSSEC alert email address receives both the alerts above
install latest prod version with both v2 and v3 onion services enabled
build debs from this branch
install built
securedrop-ossec-agent
.deb on app,securedrop-ossec-server
.deb on mon and restart OSSEC on both servers with the commandsudo systemctl restart ossec
observe the
/var/ossec/logs/alerts/alerts.log
file on mon and confirm there arev2_service_check
alerts generated for both app and monif configured, the OSSEC alert email address receives both the alerts above
update the last prod install to use v3 onion services only via
./securedrop-admin sdconfig && ./securedrop-admin install
reinstall the built debs if overwritten and restart OSSEC as above
observe the
/var/ossec/logs/alerts/alerts.log
file on mon and confirm there are nov2_service_check
alerts generated for both app and monconfirm no
v2_service_check
alert emails are sent.Checklist
If you made non-trivial code changes:
Choose one of the following: