Skip to content
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

Merged
merged 2 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
codecov:
disable_default_path_fixes: false
ignore:
- "securedrop/loaddata.py"
- "securedrop/upload-screenshots.py"
- "securedrop/qa_loader.py"
- "securedrop/create-dev-data.py"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
<frequency>90000</frequency>
</localfile>

<localfile>
<log_format>command</log_format>
<command>grep "HiddenServiceVersion 2" /etc/tor/torrc | head -1</command>
<alias>v2_service_check</alias>
<frequency>86400</frequency>
</localfile>

<localfile>
<log_format>syslog</log_format>
<location>/var/log/kern.log</location>
Expand Down
15 changes: 15 additions & 0 deletions install_files/securedrop-ossec-server/var/ossec/etc/ossec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
<frequency>90000</frequency>
</localfile>

<localfile>
<log_format>command</log_format>
<command>grep "HiddenServiceVersion 2" /etc/tor/torrc | head -1</command>
<alias>v2_service_check</alias>
<frequency>86400</frequency>
</localfile>

<reports>
<group>authentication_success</group>
<user type="relation">srcip</user>
Expand Down Expand Up @@ -160,6 +167,14 @@
<do_not_group />
</email_alerts>

<email_alerts>
<email_to>root@localhost</email_to>
<group>system_configuration</group>
<rule_id>400901</rule_id>
<do_not_delay />
<do_not_group />
</email_alerts>

<!-- rules global entry -->
<rules>
<include>rules_config.xml</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,11 @@
<regex>System configuration error:</regex>
<description>Indicates a problem with the configuration of the SecureDrop servers.</description>
</rule>
<rule id="400901" level="12" >
<if_sid>530</if_sid>
<options>alert_by_email</options> <!-- force email to be sent -->
<match>ossec: output: 'v2_service_check'</match>
<regex>HiddenServiceVersion 2</regex>
<description>v2 onion services are still enabled. Support for v2 onion services is deprecated and will be removed starting in February 2021. To preserve access to SecureDrop, you must migrate to v3 onion services: https://securedrop.org/v2-onion-eol</description>
</rule>
</group>