Report generated on 29-Aug-2022 at 15:52:28 by pytest-html v3.1.1
Packages | {"pluggy": "0.13.1", "py": "1.10.0", "pytest": "6.2.2"} |
Platform | Linux-5.15.0-46-generic-x86_64-with-glibc2.35 |
Plugins | {"html": "3.1.1", "metadata": "2.0.1", "testinfra": "5.0.0"} |
Python | 3.8.10 |
29 tests ran in 3133.74 seconds.
(Un)check the boxes to filter the results.
24 passed, 0 skipped, 5 failed, 0 errors, 0 expected failures, 0 unexpected passesResult | Test | Duration | Links |
---|---|---|---|
No results found. Try to check the filters | |||
Failed | test_basic_cases/test_brute_force/test_brute_force_ssh/test_brute_force_ssh.py::test_brute_force_ssh[ssh_brute_force] | 17.37 | |
metadata = {'description': 'Execute brute force attacks using SSH and check generated alerts', 'extra': {'mitre_technique': 'Brut...'ssh_brute_force', 'rule.description': 'sshd: brute force trying to get access to the system. Non existent user.', ...} get_dashboard_credentials = {'password': 'admin', 'user': 'admin'}, get_manager_ip = '172.31.6.105', generate_events = None, clean_alerts_index = None @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_brute_force_ssh(metadata, get_dashboard_credentials, get_manager_ip, generate_events, clean_alerts_index): ''' description: Check that an alert is generated and indexed when a brute force attack is perfomed. test_phases: - Set a custom Wazuh configuration. - Run ssh command to attempt an invalid SSH connection and generate event. - Check in the alerts.json log that the expected alert has been triggered and get its timestamp. - Check that the obtained alert from alerts.json has been indexed. wazuh_min_version: 4.4.0 tier: 0 parameters: - metadata: type: dict brief: Wazuh configuration metadata. - get_dashboard_credentials: type: fixture brief: Get the wazuh dashboard credentials. - generate_events: type: fixture brief: Generate events that will trigger the alert according to the generate_events playbook. - clean_alerts_index: type: fixture brief: Delete obtained alerts.json and alerts index. assertions: - Verify that the alert has been triggered. - Verify that the same alert has been indexed. input_description: - The `generate_events.yaml`file provides the function configuration for this test. ''' rule_id = metadata['rule.id'] rule_level = metadata['rule.level'] rule_description = metadata['rule.description'] rule_mitre_technique = metadata['extra']['mitre_technique'] timestamp_regex = r'\d+-\d+-\d+T\d+:\d+:\d+\.\d+[+|-]\d+' expected_alert_json = fr'\{{"timestamp":"({timestamp_regex})","rule"\:{{"level"\:{rule_level},' \ fr'"description"\:"{rule_description}","id"\:"{rule_id}".*' expected_indexed_alert = fr'.*"rule":.*"level": {rule_level},.*"description": "{rule_description}"' \ fr'.*"mitre":.*"{rule_mitre_technique}".*"id": "{rule_id}".*' # Check that alert has been raised and save timestamp > raised_alert = evm.check_event(callback=expected_alert_json, file_to_monitor=alerts_json, timeout=fw.T_5, error_message='The alert has not occurred').result() test_basic_cases/test_brute_force/test_brute_force_ssh/test_brute_force_ssh.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/site-packages/wazuh_testing/event_monitor.py:36: in check_event result = file_monitor.start(timeout=timeout, update_position=update_position, accum_results=accum_results, /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:201: in start self._result = monitor.start(timeout=timeout, callback=callback, accum_results=accum_results, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <wazuh_testing.tools.monitoring.QueueMonitor object at 0x7f2c7fae3be0>, timeout = 5 callback = <function make_callback.<locals>.<lambda> at 0x7f2c7fadd550>, accum_results = 1, update_position = True, timeout_extra = 0 error_message = 'The alert has not occurred' def start(self, timeout=-1, callback=_callback_default, accum_results=1, update_position=True, timeout_extra=0, error_message=''): """Start the queue monitoring until the stop method is called.""" if not self._continue: self._continue = True self._abort = False result = None while self._continue: if self._abort: self.stop() if error_message: logger.error(error_message) logger.error(f"Results accumulated: " f"{len(result) if isinstance(result, list) else 0}") logger.error(f"Results expected: {accum_results}") > raise TimeoutError(error_message) E TimeoutError: The alert has not occurred /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:469: TimeoutError -----------------------------Captured stdout setup------------------------------ { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Attempt a SSH brute force attack] **************************************** fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_ssh_private_key_file'\n\nThe error appears to be in '/home/mauro/Documents/3114/tests/end_to_end/test_basic_cases/test_brute_force/test_brute_force_ssh/data/playbooks/generate_events.yaml': line 14, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Attempt a SSH brute force attack\n ^ here\n"} PLAY RECAP ********************************************************************* centos-manager : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ------------------------------Captured stderr call------------------------------ 2022-08-29 15:04:50,125 - wazuh_testing - ERROR - The alert has not occurred 2022-08-29 15:04:50,126 - wazuh_testing - ERROR - Results accumulated: 0 2022-08-29 15:04:50,126 - wazuh_testing - ERROR - Results expected: 1 -------------------------------Captured log call-------------------------------- ERROR wazuh_testing:monitoring.py:465 The alert has not occurred ERROR wazuh_testing:monitoring.py:466 Results accumulated: 0 ERROR wazuh_testing:monitoring.py:468 Results expected: 1 | |||
Failed | test_basic_cases/test_emotet/test_emotet.py::test_emotet[emotet_attack] | 166.29 | |
configure_environment = None metadata = {'description': 'Execute emotet attack and check generated alerts', 'name': 'emotet_attack', 'regsvr32': {'extra': {'g...pt C:\\\\\\\\\\\\\\\\Windows\\\\\\\\\\\\\\\\System32\\\\\\\\\\\\\\\\wscript.exe', 'rule.id': 255926, 'rule.level': 12}} get_dashboard_credentials = {'password': 'admin', 'user': 'admin'}, get_manager_ip = '172.31.6.105', generate_events = None, clean_alerts_index = None @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_emotet(configure_environment, metadata, get_dashboard_credentials, get_manager_ip, generate_events, clean_alerts_index): ''' description: Check that an alert is generated when Emotet malware is executed. test_phases: - Set a custom Wazuh configuration. - Execute Emotet malware to generate the event. - Check in the alerts.json log that the expected alert has been triggered and get its timestamp. - Check that the obtained alert from alerts.json has been indexed. wazuh_min_version: 4.4.0 tier: 0 parameters: - configurate_environment: type: fixture brief: Set the wazuh configuration according to the configuration playbook. - metadata: type: dict brief: Wazuh configuration metadata. - get_dashboard_credentials: type: fixture brief: Get the wazuh dashboard credentials. - generate_events: type: fixture brief: Generate events that will trigger the alert according to the generate_events playbook. - clean_alerts_index: type: fixture brief: Delete obtained alerts.json and alerts index. assertions: - Verify that the alert has been triggered. - Verify that the same alert has been indexed. input_description: - The `configuration.yaml` file provides the module configuration for this test. - The `generate_events.yaml`file provides the function configuration for this test. ''' regsvr32_alert = metadata['regsvr32'] word_executing_script_alert = metadata['word_executing_script'] expected_alerts = [regsvr32_alert, word_executing_script_alert] for alert in expected_alerts: rule_level = alert['rule.level'] rule_id = alert['rule.id'] rule_description = alert['rule.description'] rule_groups = alert['extra']['groups'] timestamp_regex = r'\d+-\d+-\d+T\d+:\d+:\d+\.\d+[+|-]\d+' expected_alert_json = fr'\{{"timestamp":"({timestamp_regex})",' \ fr'"rule"\:{{"level"\:{rule_level},' \ fr'"description"\:"{rule_description}","id"\:"{rule_id}".*' \ fr'"groups"\:\["{rule_groups}"\].*\}}' expected_indexed_alert = fr'.*"rule":.*"level": {rule_level}, "description": "{rule_description}".*'\ fr'"groups": \["{rule_groups}"\].*"id": "{rule_id}".*' \ fr'"timestamp": "({timestamp_regex})".*' # Check that alert has been raised and save timestamp > raised_alert = evm.check_event(callback=expected_alert_json, file_to_monitor=alerts_json, timeout=fw.T_5, error_message=f"The alert '{rule_description}'" ' has not occurred').result() test_basic_cases/test_emotet/test_emotet.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/site-packages/wazuh_testing/event_monitor.py:36: in check_event result = file_monitor.start(timeout=timeout, update_position=update_position, accum_results=accum_results, /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:201: in start self._result = monitor.start(timeout=timeout, callback=callback, accum_results=accum_results, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <wazuh_testing.tools.monitoring.QueueMonitor object at 0x7f2c7faf8820>, timeout = 5 callback = <function make_callback.<locals>.<lambda> at 0x7f2c7fad8c10>, accum_results = 1, update_position = True, timeout_extra = 0 error_message = "The alert 'Regsvr32: C:\\\\\\\\\\\\\\\\Windows\\\\\\\\\\\\\\\\System32\\\\\\\\\\\\\\\\wscript.exe' has not occurred" def start(self, timeout=-1, callback=_callback_default, accum_results=1, update_position=True, timeout_extra=0, error_message=''): """Start the queue monitoring until the stop method is called.""" if not self._continue: self._continue = True self._abort = False result = None while self._continue: if self._abort: self.stop() if error_message: logger.error(error_message) logger.error(f"Results accumulated: " f"{len(result) if isinstance(result, list) else 0}") logger.error(f"Results expected: {accum_results}") > raise TimeoutError(error_message) E TimeoutError: The alert 'Regsvr32: C:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wscript.exe' has not occurred /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:469: TimeoutError -----------------------------Captured stdout setup------------------------------ PLAY [Configure Windows agent environment] ************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Enable auto logon] ******************************************************* changed: [windows-agent] TASK [Reboot Windows] ********************************************************** changed: [windows-agent] TASK [Disable Windows Defender] ************************************************ changed: [windows-agent] TASK [Create temp folder] ****************************************************** changed: [windows-agent] TASK [Download PSTools] ******************************************************** changed: [windows-agent] TASK [Unzip PSTools] *********************************************************** changed: [windows-agent] TASK [Copy ossec.conf] ********************************************************* changed: [windows-agent] TASK [Download sysmon] ********************************************************* changed: [windows-agent] TASK [Unzip sysmon] ************************************************************ changed: [windows-agent] TASK [Download Sysmon configuration file] ************************************** changed: [windows-agent] TASK [Install sysmon] ********************************************************** changed: [windows-agent] TASK [Configure Wazuh to collect Sysmon events] ******************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** skipping: [windows-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** changed: [windows-agent] TASK [Download trigger_emotet.exe] ********************************************* changed: [windows-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure local rules] *************************************************** TASK [manage_wazuh_configurations : Configure local rules] ********************* changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 windows-agent : ok=15 changed=14 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Execute trigger-emotet.exe] ********************************************** changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert] ********************************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ------------------------------Captured stderr call------------------------------ 2022-08-29 15:12:20,019 - wazuh_testing - ERROR - The alert 'Regsvr32: C:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wscript.exe' has not occurred 2022-08-29 15:12:20,019 - wazuh_testing - ERROR - Results accumulated: 0 2022-08-29 15:12:20,020 - wazuh_testing - ERROR - Results expected: 1 -------------------------------Captured log call-------------------------------- ERROR wazuh_testing:monitoring.py:465 The alert 'Regsvr32: C:\\\\\\\\Windows\\\\\\\\System32\\\\\\\\wscript.exe' has not occurred ERROR wazuh_testing:monitoring.py:466 Results accumulated: 0 ERROR wazuh_testing:monitoring.py:468 Results expected: 1 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Windows agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Restore ossec.conf without changes] ************************************** changed: [windows-agent] TASK [Uninstall Sysmon] ******************************************************** changed: [windows-agent] TASK [Kill trigger-emotet.exe] ************************************************* changed: [windows-agent] TASK [Delete C:\temp folder] *************************************************** changed: [windows-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] TASK [Enable Windows Defender] ************************************************* changed: [windows-agent] PLAY RECAP ********************************************************************* windows-agent : ok=7 changed=6 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 | |||
Failed | test_basic_cases/test_virustotal_integration/test_virustotal_integration.py::test_virustotal_integration[remove_malicious_file] | 138.23 | |
configure_environment = None metadata = {'description': 'Detecting and removing malware', 'extra_vars': {'event_description': 'Download malicious file', 'shel...ious_file', 'rule.description': 'active-response/bin/remove-threat.sh removed threat located at /root/eicar.com ', ...} get_dashboard_credentials = {'password': 'admin', 'user': 'admin'}, get_manager_ip = '172.31.6.105', generate_events = None, clean_alerts_index = None @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_virustotal_integration(configure_environment, metadata, get_dashboard_credentials, get_manager_ip, generate_events, clean_alerts_index): ''' description: Check that an alert is generated and the active response executed if the file is malicious. test_phases: - Set a custom Wazuh configuration. - Add a file to generate the event. - Check in the alerts.json log that the expected alert has been triggered and get its timestamp. - Check that the obtained alert from alerts.json has been indexed. wazuh_min_version: 4.4.0 tier: 0 parameters: - configurate_environment: type: fixture brief: Set the wazuh configuration according to the configuration playbook. - metadata: type: dict brief: Wazuh configuration metadata. - get_dashboard_credentials: type: fixture brief: Get the wazuh dashboard credentials. - generate_events: type: fixture brief: Generate events that will trigger the alert according to the generate_events playbook. - clean_alerts_index: type: fixture brief: Delete obtained alerts.json and alerts index. assertions: - Verify that the alert has been triggered. - Verify that the same alert has been indexed. input_description: - The `configuration.yaml` file provides the module configuration for this test. - The `generate_events.yaml`file provides the function configuration for this test. ''' rule_id = metadata['rule.id'] rule_level = metadata['rule.level'] rule_description = metadata['rule.description'] timestamp_regex = r'\d+-\d+-\d+T\d+:\d+:\d+\.\d+[+|-]\d+' expected_alert_json = fr'\{{"timestamp":"({timestamp_regex})","rule"\:{{"level"\:{rule_level},' \ fr'"description"\:"{rule_description}","id"\:"{rule_id}".*\}}' expected_indexed_alert = fr'.*"rule":.*"level": {rule_level},.*"description": "{rule_description}"' \ fr'.*"id": "{rule_id}".*"timestamp": "({timestamp_regex})".*' # Check that alert has been raised and save timestamp > raised_alert = evm.check_event(callback=expected_alert_json, file_to_monitor=alerts_json, error_message='The alert has not occurred').result() test_basic_cases/test_virustotal_integration/test_virustotal_integration.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/site-packages/wazuh_testing/event_monitor.py:36: in check_event result = file_monitor.start(timeout=timeout, update_position=update_position, accum_results=accum_results, /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:201: in start self._result = monitor.start(timeout=timeout, callback=callback, accum_results=accum_results, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <wazuh_testing.tools.monitoring.QueueMonitor object at 0x7f2c7facc100>, timeout = 20 callback = <function make_callback.<locals>.<lambda> at 0x7f2c7fb2b4c0>, accum_results = 1, update_position = True, timeout_extra = 0 error_message = 'The alert has not occurred' def start(self, timeout=-1, callback=_callback_default, accum_results=1, update_position=True, timeout_extra=0, error_message=''): """Start the queue monitoring until the stop method is called.""" if not self._continue: self._continue = True self._abort = False result = None while self._continue: if self._abort: self.stop() if error_message: logger.error(error_message) logger.error(f"Results accumulated: " f"{len(result) if isinstance(result, list) else 0}") logger.error(f"Results expected: {accum_results}") > raise TimeoutError(error_message) E TimeoutError: The alert has not occurred /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:469: TimeoutError -----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure Virustotal integration and active response] ******************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Configure local rules virustotal integration] **************************** TASK [manage_wazuh_configurations : Configure local rules] ********************* changed: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Restart manager] ********************************************************* TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY [Configure CentOS agent environment] ************************************** TASK [Gathering Facts] ********************************************************* ok: [centos-agent] TASK [Configure syscheck] ****************************************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-agent] TASK [Add active response script] ********************************************** changed: [centos-agent] TASK [Install jq] ************************************************************** changed: [centos-agent] TASK [Change remove-threat.sh owner and permissions] *************************** changed: [centos-agent] TASK [Restart agent] *********************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-agent] PLAY RECAP ********************************************************************* centos-agent : ok=7 changed=6 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 centos-manager : ok=6 changed=5 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-agent] TASK [Download malicious file] ************************************************* changed: [centos-agent] TASK [Wait for alert] ********************************************************** ok: [centos-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 centos-manager : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ------------------------------Captured stderr call------------------------------ 2022-08-29 15:38:44,617 - wazuh_testing - ERROR - The alert has not occurred 2022-08-29 15:38:44,618 - wazuh_testing - ERROR - Results accumulated: 0 2022-08-29 15:38:44,618 - wazuh_testing - ERROR - Results expected: 1 -------------------------------Captured log call-------------------------------- ERROR wazuh_testing:monitoring.py:465 The alert has not occurred ERROR wazuh_testing:monitoring.py:466 Results accumulated: 0 ERROR wazuh_testing:monitoring.py:468 Results expected: 1 | |||
Failed | test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/test_vulnerability_detector_linux.py::test_vulnerability_detector_linux[detect_vulnerability_ubuntu] | 269.94 | |
configure_environment = None metadata = {'description': 'Detect vim vulnerability', 'extra_vars': {'command': 'apt install -y vim=2:8.1.2269-1ubuntu5.7', 'eve... vulnerable vim package'}, 'name': 'detect_vulnerability_ubuntu', 'rule.description': 'CVE-2022-1621 affects vim', ...} get_dashboard_credentials = {'password': 'admin', 'user': 'admin'}, get_manager_ip = '172.31.6.105', generate_events = None, clean_alerts_index = None @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_vulnerability_detector_linux(configure_environment, metadata, get_dashboard_credentials, get_manager_ip, generate_events, clean_alerts_index): ''' description: Check that an alert is generated and indexed when a vulnerable package is present. test_phases: - Set a custom Wazuh configuration. - Install a vulnerable package to generate event. - Check in the alerts.json log that the expected alert has been triggered and get its timestamp. - Check that the obtained alert from alerts.json has been indexed. wazuh_min_version: 4.4.0 tier: 0 parameters: - configurate_environment: type: fixture brief: Set the wazuh configuration according to the configuration playbook. - metadata: type: dict brief: Wazuh configuration metadata. - get_dashboard_credentials: type: fixture brief: Get the wazuh dashboard credentials. - generate_events: type: fixture brief: Generate events that will trigger the alert according to the generate_events playbook. - clean_alerts_index: type: fixture brief: Delete obtained alerts.json and alerts index. assertions: - Verify that the alert has been triggered. - Verify that the same alert has been indexed. input_description: - The `configuration.yaml` file provides the module configuration for this test. - The `generate_events.yaml`file provides the function configuration for this test. ''' rule_level = metadata['rule.level'] rule_id = metadata['rule.id'] rule_description = metadata['rule.description'] timestamp_regex = r'\d+-\d+-\d+T\d+:\d+:\d+\.\d+[+|-]\d+' expected_alert_json = fr'\{{"timestamp":"({timestamp_regex})",' \ fr'"rule"\:{{"level"\:{rule_level},' \ fr'"description"\:"{rule_description}","id"\:"{rule_id}".*\}}' expected_indexed_alert = fr'.*"rule":.*"level": {rule_level},.*"description": "{rule_description}"' \ fr'.*"id": "{rule_id}".*' \ fr'"timestamp": "({timestamp_regex})".*' # Check that alert has been raised and save timestamp > raised_alert = evm.check_event(callback=expected_alert_json, file_to_monitor=alerts_json, error_message='The alert has not occurred').result() test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_linux/test_vulnerability_detector_linux.py:123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/site-packages/wazuh_testing/event_monitor.py:36: in check_event result = file_monitor.start(timeout=timeout, update_position=update_position, accum_results=accum_results, /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:201: in start self._result = monitor.start(timeout=timeout, callback=callback, accum_results=accum_results, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <wazuh_testing.tools.monitoring.QueueMonitor object at 0x7f2c7f20a8e0>, timeout = 20 callback = <function make_callback.<locals>.<lambda> at 0x7f2c7f2301f0>, accum_results = 1, update_position = True, timeout_extra = 0 error_message = 'The alert has not occurred' def start(self, timeout=-1, callback=_callback_default, accum_results=1, update_position=True, timeout_extra=0, error_message=''): """Start the queue monitoring until the stop method is called.""" if not self._continue: self._continue = True self._abort = False result = None while self._continue: if self._abort: self.stop() if error_message: logger.error(error_message) logger.error(f"Results accumulated: " f"{len(result) if isinstance(result, list) else 0}") logger.error(f"Results expected: {accum_results}") > raise TimeoutError(error_message) E TimeoutError: The alert has not occurred /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:469: TimeoutError -----------------------------Captured stdout setup------------------------------ PLAY [Configure Ubuntu agent environment] ************************************** TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] TASK [Enable the agent module to collect installed packages] ******************* TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [ubuntu-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [ubuntu-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate ossec.log] ****************************************************** changed: [centos-manager] TASK [Enabled vulnerability detector module] *********************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Wait until the feeds were downloaded and the first scan was completed] *** ok: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 ubuntu-agent : ok=4 changed=3 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] TASK [Install vulnerable vim package] ****************************************** fatal: [ubuntu-agent]: FAILED! => {"changed": true, "cmd": "apt install -y vim=2:8.1.2269-1ubuntu5.7", "delta": "0:00:01.514179", "end": "2022-08-29 18:43:13.617597", "msg": "non-zero return code", "rc": 100, "start": "2022-08-29 18:43:12.103418", "stderr": "\nWARNING: apt does not have a stable CLI interface. Use with caution in scripts.\n\nE: Version '2:8.1.2269-1ubuntu5.7' for 'vim' was not found", "stderr_lines": ["", "WARNING: apt does not have a stable CLI interface. Use with caution in scripts.", "", "E: Version '2:8.1.2269-1ubuntu5.7' for 'vim' was not found"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nPackage vim is a virtual package provided by:\n vim-nox 2:8.2.3995-1ubuntu2 (= 2:8.2.3995-1ubuntu2)\n vim-gtk3 2:8.2.3995-1ubuntu2 (= 2:8.2.3995-1ubuntu2)\n vim-athena 2:8.2.3995-1ubuntu2 (= 2:8.2.3995-1ubuntu2)", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Package vim is a virtual package provided by:", " vim-nox 2:8.2.3995-1ubuntu2 (= 2:8.2.3995-1ubuntu2)", " vim-gtk3 2:8.2.3995-1ubuntu2 (= 2:8.2.3995-1ubuntu2)", " vim-athena 2:8.2.3995-1ubuntu2 (= 2:8.2.3995-1ubuntu2)"]} PLAY RECAP ********************************************************************* centos-manager : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ubuntu-agent : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 ------------------------------Captured stderr call------------------------------ 2022-08-29 15:44:17,308 - wazuh_testing - ERROR - The alert has not occurred 2022-08-29 15:44:17,309 - wazuh_testing - ERROR - Results accumulated: 0 2022-08-29 15:44:17,309 - wazuh_testing - ERROR - Results expected: 1 -------------------------------Captured log call-------------------------------- ERROR wazuh_testing:monitoring.py:465 The alert has not occurred ERROR wazuh_testing:monitoring.py:466 Results accumulated: 0 ERROR wazuh_testing:monitoring.py:468 Results expected: 1 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Ubuntu agent environment] **************************************** TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] TASK [Uninstall vim vulnerable package] **************************************** changed: [ubuntu-agent] TASK [Delete agent configuration] ********************************************** changed: [ubuntu-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] PLAY RECAP ********************************************************************* ubuntu-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Failed | test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/test_vulnerability_detection_windows.py::test_vulnerability_detector_windows[detect_vulnerability_windows] | 200.52 | |
configure_environment = None metadata = {'description': 'Detect Mozilla Firefox vulnerability', 'extra_vars': {'command': 'Invoke-WebRequest -Uri "{{ s3_url }...me': 'detect_vulnerability_windows', 'rule.description': 'CVE-2021-30547 affects Mozilla Firefox \\(x64 en-US\\)', ...} get_dashboard_credentials = {'password': 'admin', 'user': 'admin'}, get_manager_ip = '172.31.6.105', generate_events = None, clean_alerts_index = None @pytest.mark.filterwarnings('ignore::urllib3.exceptions.InsecureRequestWarning') @pytest.mark.parametrize('metadata', configuration_metadata, ids=cases_ids) def test_vulnerability_detector_windows(configure_environment, metadata, get_dashboard_credentials, get_manager_ip, generate_events, clean_alerts_index): ''' description: Check that an alert is generated and indexed when a vulnerable package is present. test_phases: - Set a custom Wazuh configuration. - Install a vulnerable package to generate event. - Check in the alerts.json log that the expected alert has been triggered and get its timestamp. - Check that the obtained alert from alerts.json has been indexed. wazuh_min_version: 4.4.0 tier: 0 parameters: - configurate_environment: type: fixture brief: Set the wazuh configuration according to the configuration playbook. - metadata: type: dict brief: Wazuh configuration metadata. - get_dashboard_credentials: type: fixture brief: Get the wazuh dashboard credentials. - generate_events: type: fixture brief: Generate events that will trigger the alert according to the generate_events playbook. - clean_alerts_index: type: fixture brief: Delete obtained alerts.json and alerts index. assertions: - Verify that the alert has been triggered. - Verify that the same alert has been indexed. input_description: - The `configuration.yaml` file provides the module configuration for this test. - The `generate_events.yaml`file provides the function configuration for this test. ''' rule_level = metadata['rule.level'] rule_id = metadata['rule.id'] rule_description = metadata['rule.description'] timestamp_regex = r'\d+-\d+-\d+T\d+:\d+:\d+\.\d+[+|-]\d+' expected_alert_json = fr'\{{"timestamp":"({timestamp_regex})",' \ fr'"rule"\:{{"level"\:{rule_level},' \ fr'"description"\:"{rule_description}","id"\:"{rule_id}".*\}}' expected_indexed_alert = fr'.*"rule":.*"level": {rule_level},.*"description": "{rule_description}"' \ fr'.*"id": "{rule_id}".*' \ fr'"timestamp": "({timestamp_regex})".*' # Check that alert has been raised and save timestamp > raised_alert = evm.check_event(callback=expected_alert_json, file_to_monitor=alerts_json, error_message='The alert has not occurred').result() test_basic_cases/test_vulnerability_detector/test_vulnerability_detector_windows/test_vulnerability_detection_windows.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/site-packages/wazuh_testing/event_monitor.py:36: in check_event result = file_monitor.start(timeout=timeout, update_position=update_position, accum_results=accum_results, /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:201: in start self._result = monitor.start(timeout=timeout, callback=callback, accum_results=accum_results, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <wazuh_testing.tools.monitoring.QueueMonitor object at 0x7f2c7fac2130>, timeout = 20 callback = <function make_callback.<locals>.<lambda> at 0x7f2c7fad85e0>, accum_results = 1, update_position = True, timeout_extra = 0 error_message = 'The alert has not occurred' def start(self, timeout=-1, callback=_callback_default, accum_results=1, update_position=True, timeout_extra=0, error_message=''): """Start the queue monitoring until the stop method is called.""" if not self._continue: self._continue = True self._abort = False result = None while self._continue: if self._abort: self.stop() if error_message: logger.error(error_message) logger.error(f"Results accumulated: " f"{len(result) if isinstance(result, list) else 0}") logger.error(f"Results expected: {accum_results}") > raise TimeoutError(error_message) E TimeoutError: The alert has not occurred /usr/local/lib/python3.8/site-packages/wazuh_testing/tools/monitoring.py:469: TimeoutError -----------------------------Captured stdout setup------------------------------ PLAY [Configure Windows agent environment] ************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Create temp folder] ****************************************************** changed: [windows-agent] TASK [Copy ossec.conf] ********************************************************* changed: [windows-agent] TASK [Enable the agent module to collect installed packages (Windows)] ********* TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** skipping: [windows-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** changed: [windows-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate file ossec.log] ************************************************* changed: [centos-manager] TASK [Enable vulnerability detector module] ************************************ TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Wait until the feeds were downloaded and the first scan was completed] *** ok: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 windows-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Install vulnerable Mozilla package] ************************************** changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Waiting for vulnerability scan, alert reporting and indexing] ************ ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ------------------------------Captured stderr call------------------------------ 2022-08-29 15:48:02,156 - wazuh_testing - ERROR - The alert has not occurred 2022-08-29 15:48:02,157 - wazuh_testing - ERROR - Results accumulated: 0 2022-08-29 15:48:02,157 - wazuh_testing - ERROR - Results expected: 1 -------------------------------Captured log call-------------------------------- ERROR wazuh_testing:monitoring.py:465 The alert has not occurred ERROR wazuh_testing:monitoring.py:466 Results accumulated: 0 ERROR wazuh_testing:monitoring.py:468 Results expected: 1 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Windows agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Uninstall Mozilla Firefox vulnerable package] **************************** changed: [windows-agent] TASK [Restore ossec.conf without changes] ************************************** changed: [windows-agent] TASK [Delete C:\temp folder] *************************************************** changed: [windows-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] PLAY RECAP ********************************************************************* windows-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_audit/test_audit.py::test_audit[ping_google] | 107.46 | |
-----------------------------Captured stdout setup------------------------------ PLAY [localhost] *************************************************************** TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Generate a general validation playbook] ********************************** changed: [localhost] PLAY RECAP ********************************************************************* localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 PLAY [General validation phase] ************************************************ TASK [Gathering Facts] ********************************************************* ok: [windows-agent] ok: [centos-manager] ok: [centos-agent] ok: [ubuntu-agent] TASK [host_checker : Set flag and informative variable] ************************ ok: [windows-agent] ok: [centos-manager] ok: [centos-agent] ok: [ubuntu-agent] TASK [host_checker : Check default Python version (Linux)] ********************* skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [host_checker : Get Python version (Windows)] ***************************** skipping: [centos-manager] skipping: [centos-agent] skipping: [ubuntu-agent] changed: [windows-agent] TASK [host_checker : Check default Python version (Windows)] ******************* skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [host_checker : Check OS (Linux)] ***************************************** skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [host_checker : Check OS (Windows)] *************************************** skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [Get Wazuh installation] ************************************************** TASK [service_controller : Get installation type] ****************************** skipping: [windows-agent] changed: [centos-manager] changed: [ubuntu-agent] changed: [centos-agent] TASK [host_checker : Populate services facts] ********************************** skipping: [windows-agent] ok: [centos-manager] ok: [centos-agent] ok: [ubuntu-agent] TASK [host_checker : Check the status of Wazuh components (Manager)] *********** skipping: [centos-manager] => (item=wazuh-manager.service) skipping: [centos-manager] => (item=wazuh-indexer.service) skipping: [centos-manager] => (item=filebeat.service) skipping: [windows-agent] => (item=wazuh-manager.service) skipping: [windows-agent] => (item=wazuh-indexer.service) skipping: [windows-agent] => (item=filebeat.service) skipping: [centos-agent] => (item=wazuh-manager.service) skipping: [centos-agent] => (item=wazuh-indexer.service) skipping: [centos-agent] => (item=filebeat.service) skipping: [ubuntu-agent] => (item=wazuh-manager.service) skipping: [ubuntu-agent] => (item=wazuh-indexer.service) skipping: [ubuntu-agent] => (item=filebeat.service) TASK [host_checker : set_fact] ************************************************* skipping: [centos-manager] skipping: [windows-agent] ok: [centos-agent] ok: [ubuntu-agent] TASK [host_checker : Check the status of Wazuh Agent] ************************** skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [Get Wazuh installation] ************************************************** TASK [service_controller : Get installation type] ****************************** skipping: [windows-agent] changed: [centos-manager] changed: [ubuntu-agent] changed: [centos-agent] TASK [host_checker : Run filebeat test] **************************************** skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] changed: [centos-manager] TASK [host_checker : Check the connection between Filebeat and Wazuh Indexer] *** skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [Get Wazuh installation] ************************************************** TASK [service_controller : Get installation type] ****************************** skipping: [windows-agent] changed: [centos-manager] changed: [ubuntu-agent] changed: [centos-agent] TASK [host_checker : Test connection with Wazuh Indexer] *********************** skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] fatal: [centos-manager -> localhost]: FAILED! => {"changed": false, "msg": "The shell action failed to execute in the expected time frame (3) and was terminated"} ...ignoring TASK [host_checker : Check the connection between Controller node and Wazuh Indexer] *** skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] TASK [host_checker : set_fact] ************************************************* ok: [centos-manager] ok: [windows-agent] ok: [centos-agent] ok: [ubuntu-agent] TASK [host_checker : Verify if any check have failed] ************************** skipping: [centos-manager] skipping: [windows-agent] skipping: [centos-agent] skipping: [ubuntu-agent] PLAY RECAP ********************************************************************* centos-agent : ok=8 changed=3 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0 centos-manager : ok=9 changed=4 unreachable=0 failed=0 skipped=11 rescued=0 ignored=1 ubuntu-agent : ok=8 changed=3 unreachable=0 failed=0 skipped=12 rescued=0 ignored=0 windows-agent : ok=4 changed=1 unreachable=0 failed=0 skipped=16 rescued=0 ignored=0 PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Get euid] **************************************************************** changed: [centos-manager] TASK [Create wazuh audit rules file] ******************************************* changed: [centos-manager] TASK [Delete previous audit rules] ********************************************* changed: [centos-manager] TASK [Load audit rules] ******************************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Ping google] ************************************************************* changed: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Delete wazuh audit rules file] ******************************************* changed: [centos-manager] TASK [Delete audit rules] ****************************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_aws_infrastructure_monitoring/test_aws_infrastructure_monitoring.py::test_aws_infrastructure_monitoring[CloudTrail service] | 105.67 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure the aws-s3 wodle] ********************************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Install boto3 python package (script dependency)] ************************ changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Run the script using python3 (create S3 bucket)] ************************* changed: [centos-manager] TASK [Wait for the alert to be generated] ************************************** ok: [centos-manager] TASK [Wait for alerts to be indexed] ******************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Remove the aws-s3 wodle block] ******************************************* changed: [centos-manager] TASK [Delete the created bucket using the AWS API] ***************************** changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_brute_force/test_brute_force_rdp/test_brute_force_rdp.py::test_brute_force_rdp[rdp_brute_force] | 45.47 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure local environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Install hydra] *********************************************************** ok: [localhost] PLAY RECAP ********************************************************************* localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Attempt a RDP brute force attack] **************************************** changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) changed: [localhost] => (item=test_user) TASK [Wait for alert] ********************************************************** ok: [localhost] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=4 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 localhost : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_detecting_suspicious_binaries/test_detecting_suspicious_binaries.py::test_detecting_suspicious_binaries[detect_trojaned_file] | 72.92 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Create a copy of the system binary] ************************************** changed: [centos-manager] TASK [Replace the content of the system binary with the trojan script] ********* changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Restart manager] ********************************************************* TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Restore the system binary] *********************************************** changed: [centos-manager] TASK [Delete the system binary copy] ******************************************* changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_docker_monitoring/test_docker_monitoring.py::test_docker_monitoring[docker_pull] | 81.07 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure the docker-listener module] ************************************ TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Force systemd to reread configs] ***************************************** ok: [centos-manager] TASK [Check if Docker is installed or not on CentOS] *************************** changed: [centos-manager] TASK [Install Docker using the convenience script] ***************************** skipping: [centos-manager] TASK [Stop Docker to avoid errors and start it] ******************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=7 changed=5 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Run 'docker pull nginx'] ************************************************* changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_docker_monitoring/test_docker_monitoring.py::test_docker_monitoring[docker_run] | 42.13 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Run 'docker run -d -P --name nginx_container nginx'] ********************* changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_docker_monitoring/test_docker_monitoring.py::test_docker_monitoring[docker_exec] | 41.99 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Run 'docker exec -d nginx_container /bin/bash'] ************************** changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_docker_monitoring/test_docker_monitoring.py::test_docker_monitoring[docker_rm] | 69.84 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Run 'docker stop `docker ps -a -q` && docker rm `docker ps -a -q`'] ****** changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Delete the docker-listener module configuration] ************************* changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_fim/test_fim_linux/test_fim_linux.py::test_fim_linux[create_file_linux] | 81.24 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure Linux agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] ok: [centos-agent] TASK [Create directory to monitor] ********************************************* changed: [centos-agent] changed: [ubuntu-agent] TASK [Add directory to syscheck configuration] ********************************* TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-agent] changed: [ubuntu-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [ubuntu-agent] skipping: [centos-agent] TASK [Restart Wazuh] *********************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] skipping: [centos-agent] PLAY RECAP ********************************************************************* centos-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 ubuntu-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] ok: [centos-agent] TASK [Create a file into the monitored folder] ********************************* changed: [ubuntu-agent] changed: [centos-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ubuntu-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_fim/test_fim_linux/test_fim_linux.py::test_fim_linux[modify_file_linux] | 36.12 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-agent] ok: [ubuntu-agent] TASK [Modify a file from the monitored folder] ********************************* changed: [ubuntu-agent] changed: [centos-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ubuntu-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_fim/test_fim_linux/test_fim_linux.py::test_fim_linux[delete_file_linux] | 67.67 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] ok: [centos-agent] TASK [Delete a file from the monitored folder] ********************************* changed: [ubuntu-agent] changed: [centos-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ubuntu-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Linux agent environment] ***************************************** TASK [Gathering Facts] ********************************************************* ok: [centos-agent] ok: [ubuntu-agent] TASK [Delete syscheck configuration] ******************************************* changed: [ubuntu-agent] changed: [centos-agent] TASK [Delete folder] *********************************************************** changed: [ubuntu-agent] changed: [centos-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] skipping: [centos-agent] PLAY RECAP ********************************************************************* centos-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 ubuntu-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_fim/test_fim_windows/test_fim_windows.py::test_fim_windows[create_file_windows] | 65.51 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure Windows agent environment] ************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Create directory to monitor] ********************************************* changed: [windows-agent] TASK [Add directory to syscheck configuration] ********************************* TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** skipping: [windows-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** changed: [windows-agent] TASK [Truncate ossec.log] ****************************************************** changed: [windows-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] TASK [Wait for whodata start] ************************************************** ok: [windows-agent] PLAY RECAP ********************************************************************* windows-agent : ok=6 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Create a file into the monitored folder] ********************************* changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_fim/test_fim_windows/test_fim_windows.py::test_fim_windows[modify_file_windows] | 33.97 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Modify a file from the monitored folder] ********************************* changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_fim/test_fim_windows/test_fim_windows.py::test_fim_windows[delete_file_windows] | 48.23 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Delete a file from the monitored folder] ********************************* changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alert to be generated] ****************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Windows agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Delete syscheck configuration] ******************************************* changed: [windows-agent] TASK [Delete directory to monitor (Windows)] *********************************** changed: [windows-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] PLAY RECAP ********************************************************************* windows-agent : ok=4 changed=3 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_ip_reputation/test_ip_reputation.py::test_ip_reputation[ip_reputation_active_response] | 151.92 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Install apache] ********************************************************** changed: [centos-manager] TASK [Start apache] ************************************************************ changed: [centos-manager] TASK [Download Alienvault IP set] ********************************************** changed: [centos-manager] TASK [Download script to convert from ipset format to cdblist format] ********** changed: [centos-manager] TASK [Add the attacker IP to the list] ***************************************** changed: [centos-manager] TASK [Convert .ipset to .cdb using script] ************************************* changed: [centos-manager] TASK [Remove the .ipset file and the script] *********************************** changed: [centos-manager] TASK [Assign the right permissions and owner to the file] ********************** changed: [centos-manager] TASK [Configure ossec.conf] **************************************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Configure local rules] *************************************************** TASK [manage_wazuh_configurations : Configure local rules] ********************* changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY [Configure Windows agent environment] ************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Add hostname to hosts file] ********************************************** changed: [windows-agent] PLAY RECAP ********************************************************************* centos-manager : ok=13 changed=12 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Access Apache web server] ************************************************ changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Waiting for alert] ******************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Uninstall apache] ******************************************************** changed: [centos-manager] TASK [Delete added rules] ****************************************************** changed: [centos-manager] TASK [Delete the ossec.conf configuration] ************************************* changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY [Cleanup Windows agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Delete syscheck configuration] ******************************************* changed: [windows-agent] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=5 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_osquery_integration/test_osquery_integration.py::test_osquery_integration[low_free_memory] | 184.87 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Check if Osquery is installed or not on CentOS] ************************** fatal: [centos-manager]: FAILED! => {"changed": true, "cmd": ["systemctl", "status", "osqueryd", "--no-pager"], "delta": "0:00:00.008045", "end": "2022-08-29 18:20:16.341343", "msg": "non-zero return code", "rc": 4, "start": "2022-08-29 18:20:16.333298", "stderr": "Unit osqueryd.service could not be found.", "stderr_lines": ["Unit osqueryd.service could not be found."], "stdout": "", "stdout_lines": []} ...ignoring TASK [Install Osquery on CentOS] *********************************************** changed: [centos-manager] TASK [Configure Osquery] ******************************************************* changed: [centos-manager] TASK [Configure the Osquery module] ******************************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Start Osquery] *********************************************************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Check if stress is installed or not on CentOS] *************************** fatal: [centos-manager]: FAILED! => {"changed": true, "cmd": ["rpm", "-q", "stress"], "delta": "0:00:00.008067", "end": "2022-08-29 18:20:50.985534", "msg": "non-zero return code", "rc": 1, "start": "2022-08-29 18:20:50.977467", "stderr": "", "stderr_lines": [], "stdout": "package stress is not installed", "stdout_lines": ["package stress is not installed"]} ...ignoring TASK [Install stress] ********************************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=9 changed=8 unreachable=0 failed=0 skipped=4 rescued=0 ignored=2 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Truncate osquery results file] ******************************************* changed: [centos-manager] TASK [Stress system memory] **************************************************** changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Delete Osquery configuration file] *************************************** changed: [centos-manager] TASK [Delete the Osquery module configuration] ********************************* changed: [centos-manager] TASK [Stop Osquery] ************************************************************ ok: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Uninstall stress] ******************************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=7 changed=5 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_shellshock_attack_detection/test_shellshock_attack_detection.py::test_shellshock_attack_detection[shellshock_attack] | 106.31 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure a localfile instance to collect the logs from Apache] ********** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Check if Firewalld is installed on CentOS] ******************************* fatal: [centos-manager]: FAILED! => {"changed": true, "cmd": "systemctl status firewalld --no-pager", "delta": "0:00:00.009102", "end": "2022-08-29 18:23:42.586389", "msg": "non-zero return code", "rc": 4, "start": "2022-08-29 18:23:42.577287", "stderr": "Unit firewalld.service could not be found.", "stderr_lines": ["Unit firewalld.service could not be found."], "stdout": "", "stdout_lines": []} ...ignoring TASK [Stop Firewalld if it's installed and active] ***************************** skipping: [centos-manager] TASK [Check if Apache is installed or not on CentOS] *************************** fatal: [centos-manager]: FAILED! => {"changed": true, "cmd": "systemctl status httpd --no-pager", "delta": "0:00:00.007836", "end": "2022-08-29 18:23:46.110882", "msg": "non-zero return code", "rc": 4, "start": "2022-08-29 18:23:46.103046", "stderr": "Unit httpd.service could not be found.", "stderr_lines": ["Unit httpd.service could not be found."], "stdout": "", "stdout_lines": []} ...ignoring TASK [Install Apache Server on CentOS] ***************************************** changed: [centos-manager] TASK [Start Apache] ************************************************************ changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=8 changed=7 unreachable=0 failed=0 skipped=4 rescued=0 ignored=2 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Shellshock attack] ******************************************************* changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Delete localfile configuration] ****************************************** changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_slack_integration/test_slack_integration.py::test_slack_integration[slack_integration_brute_force_attack] | 125.33 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Set the Slack integration block] ***************************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate integrations log] *********************************************** changed: [centos-manager] TASK [Attempt a brute force SSH attack] **************************************** changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) changed: [centos-manager] => (item=not-a-user) TASK [Wait for the alert to be generated] ************************************** Pausing for 5 seconds (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort) ok: [centos-manager] TASK [Check if the alert has been sent to Slack] ******************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] TASK [Run the script using python3 (Get messages from Slack channel)] ********** changed: [centos-manager] TASK [Get Slack messages log] ************************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=8 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Clean added host] ******************************************************** changed: [centos-manager] TASK [Remove the Slack integration block] ************************************** ok: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_sql_injection/test_sql_injection.py::test_sql_injection[sql_injection] | 100.15 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure CentOS agent environment] ************************************** TASK [Gathering Facts] ********************************************************* ok: [centos-agent] TASK [Install apache] ********************************************************** changed: [centos-agent] TASK [Start apache] ************************************************************ changed: [centos-agent] TASK [Configure agent to monitor the Apache access logs] *********************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-agent] TASK [Restart agent] *********************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-agent] PLAY RECAP ********************************************************************* centos-agent : ok=6 changed=5 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [localhost] TASK [Run SQL injection] ******************************************************* changed: [localhost] TASK [Wait for alert] ********************************************************** ok: [localhost] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=4 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 localhost : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup CentOS agent environment] **************************************** TASK [Gathering Facts] ********************************************************* ok: [centos-agent] TASK [Delete localfile configuration] ****************************************** changed: [centos-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-agent] PLAY RECAP ********************************************************************* centos-agent : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_suricata_integration/test_suricata_integration.py::test_suricata_integration[trigger_emerging_policy_rule] | 224.34 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure Ubuntu agent environment] ************************************** TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] TASK [Configure Wazuh to read Suricata logs file] ****************************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [ubuntu-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [ubuntu-agent] TASK [Restart wazuh-agent to apply the change] ********************************* TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] TASK [Check if Suricata is installed] ****************************************** fatal: [ubuntu-agent]: FAILED! => {"changed": true, "cmd": "dpkg -l suricata | grep suricata", "delta": "0:00:00.030222", "end": "2022-08-29 18:29:15.099841", "msg": "non-zero return code", "rc": 1, "start": "2022-08-29 18:29:15.069619", "stderr": "dpkg-query: no packages found matching suricata", "stderr_lines": ["dpkg-query: no packages found matching suricata"], "stdout": "", "stdout_lines": []} ...ignoring TASK [Add the repo to install Suricata] **************************************** changed: [ubuntu-agent] TASK [Install Suricata] ******************************************************** changed: [ubuntu-agent] TASK [Enable and stop Suricata] ************************************************ changed: [ubuntu-agent] TASK [Change the default interface] ******************************************** ok: [ubuntu-agent] TASK [Configure external network in Suricata] ********************************** changed: [ubuntu-agent] TASK [Configure rules path in Suricata] **************************************** changed: [ubuntu-agent] TASK [Configure live rule reloading] ******************************************* changed: [ubuntu-agent] TASK [Clean Suricata logs] ***************************************************** changed: [ubuntu-agent] TASK [Updating Suricata rules] ************************************************* changed: [ubuntu-agent] TASK [Start Suricata] ********************************************************** changed: [ubuntu-agent] TASK [Wait for Suricata to start completely] *********************************** ok: [ubuntu-agent] PLAY RECAP ********************************************************************* ubuntu-agent : ok=16 changed=13 unreachable=0 failed=0 skipped=3 rescued=0 ignored=1 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] TASK [Run command to generate an alert] **************************************** changed: [ubuntu-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ubuntu-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Configure environment] *************************************************** TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] TASK [Remove Wazuh logs configuration] ***************************************** ok: [ubuntu-agent] TASK [Restart wazuh-agent to apply the change] ********************************* TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] PLAY RECAP ********************************************************************* ubuntu-agent : ok=4 changed=2 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_unauthorized_processes_detection/test_unauthorized_processes_detection.py::test_unauthorized_processes_detection[netcat] | 196.08 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure Linux agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [ubuntu-agent] ok: [centos-agent] TASK [Configure agent to get a list of running processes] ********************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-agent] changed: [ubuntu-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [ubuntu-agent] skipping: [centos-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-agent] changed: [ubuntu-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [centos-agent] changed: [ubuntu-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] skipping: [centos-agent] TASK [Install netcat (CentOS)] ************************************************* skipping: [ubuntu-agent] ok: [centos-agent] TASK [Install netcat (Ubuntu)] ************************************************* skipping: [centos-agent] ok: [ubuntu-agent] PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure local rules] *************************************************** TASK [manage_wazuh_configurations : Configure local rules] ********************* changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=5 changed=3 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 centos-manager : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 ubuntu-agent : ok=5 changed=3 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-agent] ok: [ubuntu-agent] TASK [Run netcat] ************************************************************** fatal: [ubuntu-agent]: FAILED! => {"changed": false, "msg": "The command action failed to execute in the expected time frame (30) and was terminated"} ...ignoring fatal: [centos-agent]: FAILED! => {"changed": false, "msg": "The command action failed to execute in the expected time frame (30) and was terminated"} ...ignoring TASK [Wait for alert] ********************************************************** ok: [centos-agent] ok: [ubuntu-agent] TASK [Kill netcat] ************************************************************* changed: [ubuntu-agent] changed: [centos-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 centos-manager : ok=4 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ubuntu-agent : ok=4 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=1 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Linux agent environment] ***************************************** TASK [Gathering Facts] ********************************************************* ok: [centos-agent] ok: [ubuntu-agent] TASK [Delete agent configuration] ********************************************** changed: [ubuntu-agent] changed: [centos-agent] TASK [Restart wazuh-agent] ***************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [ubuntu-agent] changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [ubuntu-agent] skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [ubuntu-agent] changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [ubuntu-agent] skipping: [centos-agent] PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Delete added rules] ****************************************************** changed: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 centos-manager : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 ubuntu-agent : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_virustotal_integration/test_virustotal_integration.py::test_virustotal_integration[harmless_file] | 102.30 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-agent] TASK [Create harmless file] **************************************************** changed: [centos-agent] TASK [Wait for alert] ********************************************************** ok: [centos-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-agent : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 centos-manager : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Delete Virustotal integration and active response configuration] ********* changed: [centos-manager] TASK [Delete local rules virus total integration] ****************************** changed: [centos-manager] TASK [Restart manager] ********************************************************* TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY [Cleanup agent environment] *********************************************** TASK [Gathering Facts] ********************************************************* ok: [centos-agent] TASK [Delete syscheck configuration] ******************************************* changed: [centos-agent] TASK [Delete active response script] ******************************************* ok: [centos-agent] TASK [Delete created file] ***************************************************** changed: [centos-agent] TASK [Restart agent] *********************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [centos-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** changed: [centos-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-agent] PLAY RECAP ********************************************************************* centos-agent : ok=6 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 centos-manager : ok=5 changed=4 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_windows_defender/test_windows_defender.py::test_windows_defender[detect_windows_defender_disable] | 97.63 | |
-----------------------------Captured stdout setup------------------------------ PLAY [TConfigure Windows agent environment] ************************************ TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Create temp folder] ****************************************************** changed: [windows-agent] TASK [Copy ossec.conf] ********************************************************* changed: [windows-agent] TASK [Enable the agent to collect Windows Defender logs] *********************** TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** skipping: [windows-agent] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** changed: [windows-agent] TASK [Restart agent] *********************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure local rules] *************************************************** TASK [manage_wazuh_configurations : Configure local rules] ********************* changed: [centos-manager] TASK [Restart manager] ********************************************************* TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0 windows-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Clean alerts file] ******************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Disable Windows Defender] ************************************************ changed: [windows-agent] PLAY [Get alerts file] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Waiting for alert] ******************************************************* ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=5 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 windows-agent : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup Windows agent environment] *************************************** TASK [Gathering Facts] ********************************************************* ok: [windows-agent] TASK [Restore ossec.conf without changes] ************************************** changed: [windows-agent] TASK [Delete C:\temp folder] *************************************************** changed: [windows-agent] TASK [Enable Windows Defender] ************************************************* changed: [windows-agent] TASK [Restart agent] *********************************************************** TASK [manage_wazuh : Get installation type] ************************************ skipping: [windows-agent] TASK [manage_wazuh : Restart manager service on linux] ************************* skipping: [windows-agent] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [windows-agent] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* changed: [windows-agent] PLAY RECAP ********************************************************************* windows-agent : ok=5 changed=4 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0 | |||
Passed | test_basic_cases/test_yara_integration/test_yara_integration.py::test_yara_integration[Run Yara scan to detect malware] | 152.44 | |
-----------------------------Captured stdout setup------------------------------ PLAY [Configure manager environment] ******************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Configure local rules for Yara] ****************************************** TASK [manage_wazuh_configurations : Configure local rules] ********************* changed: [centos-manager] TASK [Configure local decoders for Yara] *************************************** TASK [manage_wazuh_configurations : Configure local decoders] ****************** changed: [centos-manager] TASK [Configure an active response and syscheck] ******************************* TASK [manage_wazuh_configurations : Configure ossec.conf linux] **************** changed: [centos-manager] TASK [manage_wazuh_configurations : Configure ossec.conf windows] ************** skipping: [centos-manager] TASK [Restart wazuh-manager] *************************************************** TASK [manage_wazuh : Get installation type] ************************************ changed: [centos-manager] TASK [manage_wazuh : Restart manager service on linux] ************************* changed: [centos-manager] TASK [manage_wazuh : Restart agent service on linux] *************************** skipping: [centos-manager] TASK [manage_wazuh : Restart wazuh on Windows] ********************************* skipping: [centos-manager] TASK [Create a directory to store Yara rules] ********************************** changed: [centos-manager] TASK [Download Yara rules] ***************************************************** changed: [centos-manager] TASK [Check if epel-release is installed] ************************************** changed: [centos-manager] TASK [Install epel-release] **************************************************** skipping: [centos-manager] TASK [Check if yara is installed] ********************************************** changed: [centos-manager] TASK [Install Yara on CentOS] ************************************************** changed: [centos-manager] TASK [Create a directory to store malware] ************************************* changed: [centos-manager] TASK [Copy the Yara script] **************************************************** changed: [centos-manager] TASK [Check if jq is installed] ************************************************ changed: [centos-manager] TASK [Install jq (JSON Processor) on CentOS] *********************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=15 changed=14 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } { "ansible_connection": "ssh", "ansible_host": "172.31.6.105", "ansible_ssh_common_args": "-o StrictHostKeyChecking=no -i /home/mauro/ephemeral.pem", "ansible_user": "qa", "ansible_winrm_server_cert_validation": "ignore", "aws_access_key_id": "AKIA6B6B4XJHMKALDJGT", "aws_region": "us-east-1", "aws_secret_access_key": "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", "bucket_name": "aws-cloudtrail-logs-966237403726-09245154", "dashboard_password": "admin", "dashboard_user": "admin", "s3_url": "https://s3.amazonaws.com/ci.wazuh.com/qa/testing_files/end_to_end", "slack_channel": "C03EZKLR682", "slack_token": "xoxb-746532534132-3509688290194-ITgoGLhy542RzfE7p2FxVHVN", "virustotal_key": "3e4db70c621cd9dd9e3400254297eea03215987facca9931a42dcb86ffb8aa78", "web_hook_url": "https://hooks.slack.com/services/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" } PLAY [Generate events] ********************************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Truncate alert.json] ***************************************************** TASK [manage_alerts : Truncate file] ******************************************* changed: [centos-manager] TASK [Wait until the server is ready] ****************************************** ok: [centos-manager] TASK [Download malware] ******************************************************** changed: [centos-manager] TASK [Wait for alerts to be generated] ***************************************** ok: [centos-manager] TASK [Get alert json] ********************************************************** TASK [manage_alerts : Get alerts.json] ***************************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=6 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 ----------------------------Captured stdout teardown---------------------------- PLAY [Cleanup manager environment] ********************************************* TASK [Gathering Facts] ********************************************************* ok: [centos-manager] TASK [Remove local rules for Yara] ********************************************* changed: [centos-manager] TASK [Remove local decoders for Yara] ****************************************** changed: [centos-manager] TASK [Remove the Yara configuration] ******************************************* changed: [centos-manager] TASK [Remove the syscheck configuration] *************************************** ok: [centos-manager] TASK [Remove the directory with malware] *************************************** changed: [centos-manager] TASK [Remove the Yara active-response script] ********************************** changed: [centos-manager] PLAY RECAP ********************************************************************* centos-manager : ok=7 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |