Updated on 2024-07-12 GMT+08:00

Fixing and Verifying the Fix of Vulnerabilities

  • Linux or Windows vulnerabilities

    You can select servers and click Handle to fix the vulnerabilities, or manually fix them based on the suggestions provided.

    Then, you can use the verification function to quickly check whether the vulnerability has been fixed.

    To fix Windows vulnerabilities, you need to connect to the Internet.

  • Web-CMS vulnerabilities

    Manually fix them based on the suggestions provided on the page.

  • Application vulnerabilities

    Manually fix them based on the suggestions provided on the page.

Constraints

  • The Server Status is Running, Agent Status is Online, and Protection Status is Protected.

Precautions

  • Vulnerability fixing operations cannot be rolled back. If a vulnerability fails to be fixed, services will probably be interrupted, and incompatibility issues will probably occur in middleware or upper layer applications. To prevent unexpected consequences, you are advised to use CSBS to back up ECSs. Then, use idle servers to simulate the production environment and test-fix the vulnerability. If the test-fix succeeds, fix the vulnerability on servers running in the production environment.

Urgency

  • High: This vulnerability must be fixed as soon as possible. Attackers may exploit this vulnerability to damage the server.
  • Medium: You are advised to fix the vulnerability to enhance your server security.
  • Safe for now: This vulnerability has a small threat to server security. You can choose to fix or ignore it.

Automatically Fixing Vulnerabilities (Vulnerability View)

You can only fix Linux and Windows vulnerabilities with one click on the console.

A maximum of 1,000 server vulnerabilities can be fixed at a time. If there are more than 1,000 vulnerabilities, fix them in batches.

  1. Log in to the management console.
  2. In the navigation pane, choose Prediction > Vulnerabilities.
  3. Fix Linux and Windows vulnerabilities.

    • Fixing a single vulnerability

      Locate the row containing a target vulnerability and click Fix in the Operation column.

    • Fixing multiple vulnerabilities

      Select all target vulnerabilities and click Fix in the upper left corner of the vulnerability list to fix vulnerabilities in batches.

      To fix all Linux or Windows vulnerabilities, select Select all Linux vulnerabilities or Select all Windows vulnerabilities in the Fix dialog box.

      If you have at least one premium edition quota, you can select all Linux or Windows vulnerabilities.

    • Fix one or more servers affected by a vulnerability.
      1. Click a vulnerability name.
      2. On the vulnerability details slide-out panel displayed, click the Affected tab, locate the row containing the target server, and click Fix in the Operation column.

        You can also select all target servers and click Fix above the server list to fix vulnerabilities for the servers in batches.

  1. In the Fix dialog box displayed, select I am aware that if I have not backed up my ECSs before fixing vulnerabilities, services may be interrupted and fail to be rolled back during maintenance. and click Auto Fix.
  2. Click a vulnerability name.
  3. Click the Handling History tab to view the fix status of the target vulnerability in the Status column. Table 1 describes vulnerability fix statuses.

    Table 1 Vulnerability fix statuses

    Status

    Description

    Unhandled

    The vulnerability is not fixed.

    Ignored

    The vulnerability does not affect your services. You have ignored the vulnerability.

    Verifying

    HSS is verifying whether a fixed vulnerability is successfully fixed.

    Fixing

    HSS is fixing the vulnerability.

    Fixed

    The vulnerability has been successfully fixed.

    Restart required

    The vulnerability has been successfully fixed. You need to restart the server as soon as possible.

    Failed

    The vulnerability fails to be fixed. The possible cause is that the vulnerability does not exist or has been changed.

    Restart the server and try again

    This status is displayed only for vulnerabilities that exist on Windows servers.

    The vulnerability has not been fixed on the Windows server for a long time. As a result, the latest patch cannot be installed. You need to install an earlier patch, restart the server, and then install the latest patch.

Automatically Fixing Vulnerabilities (Server View)

You can only fix Linux and Windows vulnerabilities with one click on the console.

  1. Log in to the management console.
  2. In the navigation pane, choose Prediction > Vulnerabilities.
  3. Fix Linux and Windows vulnerabilities.

    • Fixing all vulnerabilities on a server
      1. Locate the row containing a target server and click Fix in the Operation column.

        You can also select multiple servers and click Fix in the upper part of the vulnerability list. To fix all server vulnerabilities, you can select all servers in the batch fix dialog box.

        If you have at least one premium edition quota, you can select all servers.

      2. In the Fix dialog box displayed, select the type of the vulnerability to be fixed, select I am aware that if I have not backed up my ECSs before fixing vulnerabilities, services may be interrupted and fail to be rolled back during maintenance., and click OK.

        Only Linux and Windows vulnerabilities can be automatically fixed with one click. Web-CMS and application vulnerabilities need to be manually fixed by logging in to the server.

      3. Click the server name. On the server details slide-out panel displayed, view the vulnerability fix status. Table 2 describes vulnerability fix statuses.
    • Fixing one or more vulnerabilities on a server
      1. Click the name of a target server. The server details slide-out panel is displayed.
      2. Locate the row containing a target vulnerability and click Fix in the Operation column.

        Alternatively, you can select all target vulnerabilities and click Fix above the vulnerability list to fix vulnerabilities in batches.

      3. In the Fix dialog box displayed, select I am aware that if I have not backed up my ECSs before fixing vulnerabilities, services may be interrupted and fail to be rolled back during maintenance., and click Auto Fix.
      4. In the Status column of the target vulnerability, view the fix status of the vulnerability. Table 2 describes vulnerability fix statuses.
    Table 2 Vulnerability fix statuses

    Status

    Description

    Unhandled

    The vulnerability is not fixed.

    Ignored

    The vulnerability does not affect your services. You have ignored the vulnerability.

    Verifying

    HSS is verifying whether a fixed vulnerability is successfully fixed.

    Fixing

    HSS is fixing the vulnerability.

    Fixed

    The vulnerability has been successfully fixed.

    Restart required

    The vulnerability has been successfully fixed. You need to restart the server as soon as possible.

    Failed

    The vulnerability fails to be fixed. The possible cause is that the vulnerability does not exist or has been changed.

    Restart the server and try again

    This status is displayed only for vulnerabilities that exist on Windows servers.

    The vulnerability has not been fixed on the Windows server for a long time. As a result, the latest patch cannot be installed. You need to install an earlier patch, restart the server, and then install the latest patch.

Manually Fixing Software Vulnerabilities

On the basic information page of a vulnerability, you can fix the detected vulnerabilities based on the fix suggestions. For more information, see Table 3.

  • Fix the vulnerabilities in sequence based on the suggestions.
  • If multiple software packages on the same server have the same vulnerability, you only need to fix the vulnerability once.

Restart the system after you fixed a Windows OS or Linux kernel vulnerability, or HSS will probably continue to warn you of this vulnerability.

Table 3 Vulnerability fix commands

OS

Command

CentOS/Fedora/EulerOS/Red Hat/Oracle

yum update Software_name

Debian/Ubuntu

apt-get update && apt-get install Software_name --only-upgrade

Gentoo

See the vulnerability fix suggestions for details.

Vulnerability fixing may affect service stability. You are advised to use either of the following methods to avoid such impact:

Method 1: Create a new VM to fix the vulnerability.
  1. Create an image for the ECS to be fixed.
  2. Use the image to create an ECS.
  3. Fix the vulnerability on the new ECS and verify the result.
  4. Switch services over to the new ECS and verify they are stably running.
  5. Release the original ECS. If a fault occurs after the service switchover and cannot be rectified, you can switch services back to the original ECS.
Method 2: Fix the vulnerability on the target server.
  1. Create a backup for the ECS whose vulnerabilities need to be fixed.
  2. Fix vulnerabilities on the current server.
  3. If services become unavailable after the vulnerability is fixed and cannot be recovered in a timely manner, use the backup to restore the server.
  • Use method 1 if you are fixing a vulnerability for the first time and cannot estimate impact on services. In this way, you can release the ECS at any time to save costs if the vulnerability fails to be fixed.
  • Use method 2 if you have fixed the vulnerability on similar servers before.

Manually Fixing Vulnerabilities

HSS does not automatically fix Web-CMS vulnerabilities and application vulnerabilities with one click. You can log in to the server to manually fix them by referring to the fix suggestions on the vulnerability details slide-out panel.

  • Restart the system after you fixed a Windows OS or Linux kernel vulnerability, or HSS will probably continue to warn you of this vulnerability.
  • Fix the vulnerabilities in sequence based on the suggestions.
  • If multiple software packages on the same server have the same vulnerability, you only need to fix the vulnerability once.

Viewing vulnerability fix suggestions

  1. Log in to the management console.
  2. In the navigation pane, choose Prediction > Vulnerabilities.
  3. Click the name of a target vulnerability to access the vulnerability details slide-out panel and view the fix suggestions.

Fixing vulnerabilities by referring to vulnerability fix suggestions

Vulnerability fix may affect service stability. You are advised to use either of the following methods to avoid such impact:

  • Method 1: Create a new VM to fix the vulnerability.
    1. Create an image for the ECS to be fixed.
    2. Use the image to create an ECS.
    3. Fix the vulnerability on the new ECS and verify the result.
    4. Switch services over to the new ECS and verify they are stably running.
    5. Release the original ECS. If a fault occurs after the service switchover and cannot be rectified, you can switch services back to the original ECS.
  • Method 2: Fix the vulnerability on the target server.
    1. Create a backup for the ECS whose vulnerabilities need to be fixed.
    2. Fix vulnerabilities on the current server.
    3. If services become unavailable after the vulnerability is fixed and cannot be recovered in a timely manner, use the backup to restore the server.
    • Use method 1 if you are fixing a vulnerability for the first time and cannot estimate impact on services. In this way, you can release the ECS at any time to save costs if the vulnerability fails to be fixed.
    • Use method 2 if you have fixed the vulnerability on similar servers before.

Ignoring a Vulnerability

Some vulnerabilities are risky only in specific conditions. For example, if a vulnerability can be exploited only through an open port, but the target server does not open any ports, the vulnerability will not harm the server. Such vulnerabilities can be ignored.

After the vulnerability is ignored, no alarm will be generated for the vulnerability.

  1. Log in to the management console.
  2. In the navigation pane, choose Prediction > Vulnerabilities.
  3. Locate the row containing a target vulnerability and click Ignore in the Operation column.
  4. In the dialog box displayed, click OK.

Whitelisting Vulnerabilities

If you evaluate that some vulnerabilities do not affect your services and do not want to view the vulnerabilities in the vulnerability list, you can whitelist the vulnerabilities. After they are whitelisted, the vulnerabilities will be ignored in the vulnerability list and no alarms will be reported. The vulnerabilities will not be scanned and the vulnerability information will not be displayed when the next vulnerability scan task is executed.

  1. Log in to the management console.
  2. In the navigation pane, choose Prediction > Vulnerabilities.

    • Whitelisting all servers that are affected by a vulnerability

      HSS will ignore the vulnerability when scanning for vulnerabilities on all servers.

      1. In the Operation column of the row containing the target vulnerability, click More and select Add to Whitelist.

        You can also select multiple vulnerabilities and click Add to Whitelist above the vulnerability list.

      2. In the dialog box displayed, click OK.
    • Whitelisting one or more servers that are affected by a vulnerability

      HSS will ignore the vulnerability when scanning for vulnerabilities on these servers.

      1. Click a target vulnerability name.
      2. On the slide-out panel displayed, click the Affected tab.
      3. In the Operation column of the row containing the target server, click More and select Add to Whitelist.

        You can also select multiple servers and click Add to Whitelist above the server list.

      4. In the dialog box displayed, click OK.
    • Whitelisting vulnerabilities using whitelist rules
      1. In the upper right corner of the Vulnerabilities page, click Configure Policy. The Configure Policy slide-out panel is displayed.
      2. In the Vulnerability Whitelist area, click Add Rule.
      3. Configure a whitelist rule according to Table 4.
        Table 4 Vulnerability whitelist rule parameters

        Parameter

        Description

        Type

        Select the type of vulnerabilities to be whitelisted. Possible values are as follows:

        • Linux Vulnerabilities
        • Windows Vulnerabilities
        • Web-CMS Vulnerabilities
        • Application Vulnerabilities

        Vulnerability

        Select one or more vulnerabilities to be whitelisted.

        Rule Scope

        Select the servers affected by the vulnerabilities. Possible values are as follows:

        • All servers

          HSS will ignore the vulnerability when scanning for vulnerabilities on all servers.

        • Selected servers

          Select one or more target servers. HSS will ignore the vulnerabilities when scanning for vulnerabilities on these servers.

          You can search for a target server by server name, ID, EIP, or private IP address.

        Remarks (Optional)

        Enter the remarks.

      4. Click OK.

Verifying Vulnerability Fix

After a vulnerability is fixed, you are advised to verify it immediately.

Manual verification

  • Click Verify on the vulnerability details page.
  • Ensure the software has been upgraded to the latest version. The following table provides the commands to check the software upgrade result.
    Table 5 Verification commands

    OS

    Verification Command

    CentOS/Fedora/EulerOS/Red Hat/Oracle

    rpm -qa | grep Software_name

    Debian/Ubuntu

    dpkg -l | grep Software_name

    Gentoo

    emerge --search Software_name

Automatic verification

HSS performs a full check every early morning. If you do not perform a manual verification, you can view the system check result on the next day after you fix the vulnerability.