-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump misp version to 2.5 along dependencies (24.04 only, PHP8.2…
…+), add variables and config settings, clean old stuff, misp-modules systemd
- Loading branch information
Showing
13 changed files
with
377 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,12 @@ install_archives: /var/_install | |
|
||
## branch or tags to use | ||
# misp_version: 'HEAD' | ||
misp_version: '2.4' | ||
misp_version: '2.5' | ||
misp_rootdir: /var/www/_MISP/MISP | ||
misp_virtualenv: /var/www/_MISP/venv | ||
misp_modules_enable: true | ||
mispmodules_rootdir: /opt | ||
mispmodules_version: '03165ad2cd7bae5f3fcfa1b5ba396b8031cc92a0' # 2.4.199 | ||
misp_webserver: 'apache2' | ||
# misp_webserver: 'nginx' | ||
misp_webserver_harden: true | ||
|
@@ -21,12 +22,12 @@ misp_lief_rootdir: /var/lief | |
misp_config_php_template: config.php.j2 | ||
misp_git_update_force: false | ||
|
||
misp_pip_cybox_version: '2.1.0.20' | ||
misp_pip_stix_version: '1.2.0.7' | ||
misp_pip_cybox_version: '2.1.0.21' | ||
misp_pip_stix_version: '1.2.0.11' | ||
# v2.4.167/dec 2022 is the last one supporting python <3.10 | ||
# overridden by misp-modules REQUIREMENTS | ||
# https://github.com/MISP/misp-modules/blob/main/REQUIREMENTS | ||
misp_pymisp_version: 'v2.4.162' | ||
misp_pymisp_version: 'v2.5.2' | ||
# HEAD in misp-modules REQUIREMENTS | ||
misp_latest_pymisp: false | ||
|
||
|
@@ -79,6 +80,7 @@ misp_webusers_list: [] | |
# misp_web_apikey: | ||
|
||
misp_email_contact: [email protected] | ||
misp_email_reply_to: misp-no-reply@localhost | ||
|
||
## default provided feeds. you need to know their id | ||
misp_enable_feeds: | ||
|
@@ -111,8 +113,7 @@ misp_php_snuffleupagus_enable: false | |
|
||
# if adding ::1, ensure IPv6 is functional. https://github.com/antirez/redis/issues/3241 | ||
misp_redis_bind: '127.0.0.1' | ||
# FIXME! https://github.com/MISP/MISP/issues/3452 | ||
# misp_redis_password: redis_password_to_change | ||
misp_redis_password: redis_password_to_change | ||
misp_redis_securecommands: | ||
- { re: '^rename-command FLUSHDB .*', l: 'rename-command FLUSHDB ""' } | ||
- { re: '^rename-command FLUSHALL .*', l: 'rename-command FLUSHALL ""' } | ||
|
@@ -124,3 +125,7 @@ misp_redis_securecommands: | |
# Update Galaxies, ObjectTemplates, Warninglists, Noticelists and Templates before first login | ||
misp_run_updates: false | ||
misp_run_updates_lock: "{{ misp_rootdir }}/.run_updates_lock" | ||
|
||
misp_cgroups_restriction_enable: true | ||
|
||
is_container: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,30 +29,55 @@ | |
(ansible_os_family == "RedHat" and ansible_distribution_major_version | int >= 8) | ||
- name: 22.04 | Set fact | ||
ansible.builtin.set_fact: | ||
misp_version: '2.4' | ||
misp_pymisp_version: 'v2.4.200' | ||
misp_modules_enable: false | ||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 22) | ||
harden_apache_php74_debian_enable: true | ||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int <= 22) | ||
- name: 24.04 | Set fact | ||
ansible.builtin.set_fact: | ||
misp_version: '2.5' | ||
misp_php_snuffleupagus_enable: false | ||
harden_php7_snuffleupagus: false | ||
misp_modules_enable: false | ||
when: (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int >= 24) | ||
vars: | ||
misp_local_base_url: "https://localhost" | ||
misp_pymisp_base_url: "https://localhost" | ||
misp_pymisp_verifycert: false | ||
misp_pymisp_validation_fatal: false | ||
# need pymisp | ||
misp_enable_feeds: [] | ||
misp_webusers_list: [] | ||
misp_testing: false | ||
misp_testing: true | ||
misp_testing_user: _misp | ||
misp_testing_user_home: "/home/{{ misp_testing_user }}" | ||
misp_testing_key_file: "{{ misp_key_file }}" | ||
misp_base_url: "https://{{ ansible_default_ipv4.address | default(ansible_all_ipv4_addresses[0]) }}" | ||
misp_base_ip: 127.0.0.1 | ||
misp_base_port: 443 | ||
misp_no_log: false | ||
misp_webusers_list: | ||
- { u: [email protected], p: 'dupont_passphrase.', email: dupont@localhost, org: 1, role: 2 } | ||
- { u: [email protected], p: 'dupond_passphrase.', email: dupond@localhost, org: 1, role: 4 } | ||
hardenwebserver_enable_defaultssl: false | ||
harden_php_memory_limit: 2048M | ||
harden_php_allow_url_fopen: On | ||
harden_php_disable_functions: 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,chown,diskfreespace,disk_free_space,disk_total_space,dl,exec,escapeshellarg,escapeshellcmd,fileinode,highlight_file,max_execution_time,passthru,pclose,phpinfo,popen,proc_nice,proc_terminate,show_source,system,__construct, __destruct, __call,__wakeup' | ||
harden_php_disable_functions: 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,chown,diskfreespace,disk_free_space,disk_total_space,dl,exec,escapeshellcmd,fileinode,highlight_file,max_execution_time,passthru,pclose,phpinfo,popen,proc_nice,proc_terminate,show_source,system,__construct, __destruct, __call,__wakeup' | ||
hardenwebserver_header_csp: '' # done by MISP directly | ||
harden_apache_stapling_enable: false | ||
harden_apache_systemd_inaccessiblepaths: '' | ||
harden_apache_modsecurity_lines: | ||
## https://isc.sans.edu/diary/Tracking+HTTP+POST+data+with+ELK/20345 | ||
- { re: '^SecRule REQUEST_METHOD POST id:1000,', l: 'SecRule REQUEST_METHOD POST id:1000,phase:2,ctl:auditEngine=On,nolog,pass' } | ||
## https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#sanitiseArg | ||
- { re: '^SecAction nolog,phase:2,id:131,', l: 'SecAction nolog,phase:2,id:131,sanitiseArg:password,sanitiseArg:newPassword,sanitiseArg:oldPassword' } | ||
- { re: '^SecTmpDir .*', l: 'SecTmpDir /tmp/modsectmp' } | ||
- { re: '^SecDataDir .*', l: 'SecDataDir /tmp/modsecdata' } | ||
# `grep ModSecurity /var/log/apache2/misp.local_error.log | sed 's/.*id "\([0-9]*\)".*/\1/' | sort | uniq -c` | ||
# Host header is a numeric IP address | ||
- { re: '^SecRuleRemoveById 920350', l: 'SecRuleRemoveById 920350' } | ||
misp_php_snuffleupagus_enable: true | ||
harden_php7_snuffleupagus: true | ||
harden_php7_snuffleupagus_rules_template: 'misp-snuffleupagus-rules.ini.j2' | ||
harden_apache_php_variants: ['apache2'] | ||
harden_apache_php74_debian_enable: true | ||
harden_apache_php_variants: ['apache2', 'cli'] | ||
harden_apache_php74_rhel9_enable: true | ||
misp_no_log: false | ||
roles: | ||
- { role: juju4.redhat_epel, when: ansible_os_family == 'RedHat' } | ||
- juju4.harden_apache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.