Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.3.6 - Release Candidate 1 - E2E UX tests - Vulnerability Detector #3106

Closed
9 of 10 tasks
damarisg opened this issue Jul 15, 2022 · 4 comments
Closed
9 of 10 tasks

Comments

@damarisg
Copy link
Member

damarisg commented Jul 15, 2022

Description

The following issue aims to run the specified test for the current release candidate, report the results, and open new issues for any encountered errors.

Test information

Test name Vulnerability detection
Category Vulnerability detection
Deployment option Quickstart
Main release issue wazuh/wazuh#14260
Release candidate # RC1
Components Instalation OS
Wazuh Indexer Quickstart Amazon Linux 2
Wazuh Dashboard Quickstart Amazon Linux 2
Wazuh Server Quickstart Amazon Linux 2
Wazuh agent Installation from sources Amazon Linux, Arch Linux, CentOS, Ubuntu, Windows

Tasks

  • Use the new UI for vulnerabilities.
  • Install vulnerable package to force an alert.
  • Patch or uninstall vulnerable packe to force a "solved" alert.
  • Fresh Install: Patch the vulnerable package to force a "solved" alert.

    • CentOS
    • Ubuntu
    • Amazon Linux
    • Windows
    • Arch Linux
  • Upgrade 4.3.5 to 4.3.6: Patch the vulnerable package to force a "solved" alert.

    • CentOS

References

Color Status
🟢 All tests passed successfully
🟡 All tests passed but there are some warnings
🔴 Some tests have failures or errors
🔵 Test execution in progress
To Do
🟠 Jenkins provision fails
🟣 All skipped

Conclusions 🟢

Auditors' validation

The definition of done for this one is the validation of the conclusions and the test results from all auditors.

All checks from below must be accepted in order to close this issue.

@damarisg
Copy link
Member Author

damarisg commented Jul 19, 2022

General Setting in the manager

  1. Configure ossec.conf file required.

    Configuration to test Amazon Linux

    The <vulnerability-detector> must have:

    <enabled>yes</enabled>
    <interval>30s</interval>
    <min_full_scan_interval>1m</min_full_scan_interval>
    <run_on_start>yes</run_on_start>
    
    <!-- Amazon Linux OS vulnerabilities -->
    <provider name="alas">
      <enabled>yes</enabled>
      <os>amazon-linux</os>
      <os>amazon-linux-2</os>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Windows OS vulnerabilities -->
    <provider name="msu">
      <enabled>yes</enabled>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Aggregate vulnerabilities -->
    <provider name="nvd">
      <enabled>yes</enabled>
      <update_from_year>2017</update_from_year>
      <update_interval>1h</update_interval>
    </provider>
    
    Configuration to test CentOS

    The <vulnerability-detector> must have:

    <enabled>yes</enabled>
    <interval>30s</interval>
    <min_full_scan_interval>1m</min_full_scan_interval>
    <run_on_start>yes</run_on_start>
    
    <!-- RedHat OS vulnerabilities -->
    <provider name="redhat">
      <enabled>yes</enabled>
      <os>5</os>
      <os>6</os>
      <os>7</os>
      <os>8</os>
      <os>9</os>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Windows OS vulnerabilities -->
    <provider name="msu">
      <enabled>yes</enabled>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Aggregate vulnerabilities -->
    <provider name="nvd">
      <enabled>yes</enabled>
      <update_from_year>2017</update_from_year>
      <update_interval>1h</update_interval>
    </provider>
    
    Configuration to test Ubuntu

    The <vulnerability-detector> must have:

    <enabled>yes</enabled>
    <interval>30s</interval>
    <min_full_scan_interval>1m</min_full_scan_interval>
    <run_on_start>yes</run_on_start>
    
    <!-- Ubuntu OS vulnerabilities -->
    <provider name="canonical">
      <enabled>yes</enabled>
      <os>trusty</os>
      <os>xenial</os>
      <os>bionic</os>
      <os>focal</os>
      <os>jammy</os>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Windows OS vulnerabilities -->
    <provider name="msu">
      <enabled>yes</enabled>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Aggregate vulnerabilities -->
    <provider name="nvd">
      <enabled>yes</enabled>
      <update_from_year>2017</update_from_year>
      <update_interval>1h</update_interval>
    </provider>
    
    Configuration to test Windows

    The <vulnerability-detector> must have:

    <enabled>yes</enabled>
    <interval>30s</interval>
    <min_full_scan_interval>1m</min_full_scan_interval>
    <run_on_start>yes</run_on_start>
    
    <!-- Windows OS vulnerabilities -->
    <provider name="msu">
      <enabled>yes</enabled>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Aggregate vulnerabilities -->
    <provider name="nvd">
      <enabled>yes</enabled>
      <update_from_year>2017</update_from_year>
      <update_interval>1h</update_interval>
    </provider>
    
    Configuration to test Arch Linux

    The <vulnerability-detector> must have:

    <enabled>yes</enabled>
    <interval>30s</interval>
    <min_full_scan_interval>1m</min_full_scan_interval>
    <run_on_start>yes</run_on_start>
    
    <!-- Arch OS vulnerabilities -->
    <provider name="arch">
      <enabled>yes</enabled>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Windows OS vulnerabilities -->
    <provider name="msu">
      <enabled>yes</enabled>
      <update_interval>1h</update_interval>
    </provider>
    
    <!-- Aggregate vulnerabilities -->
    <provider name="nvd">
      <enabled>yes</enabled>
      <update_from_year>2017</update_from_year>
      <update_interval>1h</update_interval>
    </provider>
    
  2. Configure local_internal_option.conf file with:

    wazuh_modules.debug=2
    monitord.rotate_log=0

  3. Connect the agent with the manager.

  4. Start the Wazuh manager and agent.

  5. Verify that each module works successfully with /var/ossec/bin/wazuh-control status command:

    Manager

    wazuh-clusterd not running...
    wazuh-modulesd is running...
    wazuh-monitord is running...
    wazuh-logcollector is running...
    wazuh-remoted is running...
    wazuh-syscheckd is running...
    wazuh-analysisd is running...
    wazuh-maild not running...
    wazuh-execd is running...
    wazuh-db is running...
    wazuh-authd is running...
    wazuh-agentlessd not running...
    wazuh-integratord not running...
    wazuh-dbd not running...
    wazuh-csyslogd not running...
    wazuh-apid is running...

    Agent

    wazuh-modulesd is running...
    wazuh-logcollector is running...
    wazuh-syscheckd is running...
    wazuh-agentd is running...
    wazuh-execd is running...

@damarisg
Copy link
Member Author

damarisg commented Jul 19, 2022

Fresh Install: Patch the vulnerable package to force a "solved" alert. 🟢

Patch the vulnerable package to force a "solved" alert. 🟢

Amazon Linux
  1. The libcurl alert generated is shown on Dashboard.

    imagen

  2. Patch the vulnerable package to force a "solved" alert.

    yum install libcurl

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen
    imagen

Centos
  1. The python alert generated is shown on Dashboard.

    imagen

  2. Patch the vulnerable package to force a "solved" alert.

    yum install python

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

Ubuntu
  1. The curl alert generated is shown on Dashboard.

    imagen

  2. Patch the vulnerable package to force a "solved" alert.

    apt install curl

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

Windows
  1. The Mozilla Firefox alert generated is shown on Dashboard.

    imagen

  2. Update the vulnerable package to force a "solved" alert.

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

Uninstall the vulnerable package to force a "solved" alert. 🟢

Amazon Linux
  1. The python27-pip alert generated is shown on Dashboard.

    imagen

  2. Uninstall the vulnerable package to force a "solved" alert.

    yum remove python27-pip

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen
    imagen

CentOS
  1. The pyyaml alert generated is shown on Dashboard.

    imagen

  2. Uninstall the vulnerable package to force a "solved" alert.

    yum remove PyYAML

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

Windows
  1. The Mozilla Firefox alert generated is shown on Dashboard.

    imagen

  2. Remove the vulnerable package to force a "solved" alert.

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

Arch Linux
  1. The perl alert generated is shown on Dashboard.

    imagen

  2. Remove the vulnerable package to force a "solved" alert.

    pacman -Rdd perl

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

@damarisg
Copy link
Member Author

damarisg commented Jul 19, 2022

Upgrade 4.3.5 to 4.3.6: Patch the vulnerable package to force a "solved" alert. 🟢

Upgrade Section
  1. Check our manager with 4.3.6:

    [root@ip-172-31-16-71 ec2-user]# /var/ossec/bin/wazuh-control info -v
    v4.3.6

  2. Check our agent with 4.3.5:

    [root@ip-172-31-31-210 centos]# /var/ossec/bin/wazuh-control info -v
    v4.3.5

  3. Check status to agent and manager

    Manager:

    [root@ip-172-31-16-71 ec2-user]# /var/ossec/bin/wazuh-control status
    wazuh-clusterd not running...
    wazuh-modulesd is running...
    wazuh-monitord is running...
    wazuh-logcollector is running...
    wazuh-remoted is running...
    wazuh-syscheckd is running...
    wazuh-analysisd is running...
    wazuh-maild not running...
    wazuh-execd is running...
    wazuh-db is running...
    wazuh-authd is running...
    wazuh-agentlessd not running...
    wazuh-integratord not running...
    wazuh-dbd not running...
    wazuh-csyslogd not running...
    wazuh-apid is running...

    Agent:

    [root@ip-172-31-31-210 centos]# /var/ossec/bin/wazuh-control status
    wazuh-modulesd is running...
    wazuh-logcollector is running...
    wazuh-syscheckd is running...
    wazuh-agentd is running...
    wazuh-execd is running...

  4. Upgrade the agent to 4.3.6

  5. Verify the correct version was install:

    [root@ip-172-31-16-71 ec2-user]# /var/ossec/bin/wazuh-control info
    WAZUH_VERSION="v4.3.6"
    WAZUH_REVISION="40318"
    WAZUH_TYPE="server"

    [root@ip-172-31-31-210 centos]# /var/ossec/bin/wazuh-control info
    WAZUH_VERSION="v4.3.6"
    WAZUH_REVISION="40318"
    WAZUH_TYPE="agent"

  6. Restart manager and agent. Check status

    Manager:

    [root@ip-172-31-16-71 ec2-user]# /var/ossec/bin/wazuh-control status
    wazuh-clusterd not running...
    wazuh-modulesd is running...
    wazuh-monitord is running...
    wazuh-logcollector is running...
    wazuh-remoted is running...
    wazuh-syscheckd is running...
    wazuh-analysisd is running...
    wazuh-maild not running...
    wazuh-execd is running...
    wazuh-db is running...
    wazuh-authd is running...
    wazuh-agentlessd not running...
    wazuh-integratord not running...
    wazuh-dbd not running...
    wazuh-csyslogd not running...
    wazuh-apid is running...

    Agent:

    [root@ip-172-31-31-210 centos]# /var/ossec/bin/wazuh-control status
    wazuh-modulesd is running...
    wazuh-logcollector is running...
    wazuh-syscheckd is running...
    wazuh-agentd is running...
    wazuh-execd is running...

Centos - Patch the vulnerable package to force a "solved" alert.
  1. The alert generated is shown on Dashboard.

    imagen

  2. Patch the vulnerable package to force a "solved" alert.

    yum install curl

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

Centos - Remove the vulnerable package to force a "solved" alert.
  1. The alert generated is shown on Dashboard.

    imagen

  2. Patch the vulnerable package to force a "solved" alert.

    yum remove freestyle

  3. Restart the agent

  4. The alert solved generated is shown on Dashboard.

    imagen

@damarisg
Copy link
Member Author

damarisg commented Jul 20, 2022

Conclusion

After testing the cases, we can visualize the generated and resolved alerts with the new UI.
Also, we can see that once the vulnerable package is resolved, it disappears from the Inventory list.

Finally, I would like to clarify a doubt:

  1. Why doesn't the content of the selected alert appear? Is it normal?

    imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants