Help Center> Web Application Firewall> Best Practices> Combining WAF and HSS to Get Improved Web Tamper Protection
Updated on 2023-03-30 GMT+08:00

Combining WAF and HSS to Get Improved Web Tamper Protection

WAF examines HTTP/HTTPS requests. If an attacker attempts to tamper with web pages using attacks like SQL injection, WAF can identify and block the attacks in a timely manner, so they cannot sneak into or change anything in the OSs of your web servers.

Even if attacks bypass the first layer of protection, HSS WTP provides multi-level defenses. HSS WTP protects files in the web file directories from any unauthorized access. Only your website administrator can update the website content through the privileged process. Apart from that, HSS WTP also backs up web file directories locally and remotely. Once a file is tampered with, it can be quickly restored with backups. For dynamic web pages such as applications on web servers, HSS WTP uses Runtime Application Self-Protection (RASP) to monitor application access. It can detect tampering on dynamic data such as databases and prevent attackers from using applications to tamper with web pages in real time.

With HSS and WAF in place, you can stop worrying about web page tampering.

What Web Tampering Is and Impacts of Web Tampering

Web tampering is a type of cyberattack that exploits vulnerabilities in web applications to tamper with web application content or to insert hidden links. Web tampering attacks are often used to spread malicious information, incite unrest, and steal money.

Links to pornographic or otherwise illegal content may be inserted into normal web pages. Tampered web pages can permanently damage the brand image of your organization.

Differences Between The Web Tamper Protection Functions of HSS and WAF

Table 1 Differences between the web tamper protection functions of HSS and WAF




Static web pages

Locks files in driver and web file directories to prevent attackers from tampering with them.

Caches static web pages on servers.

Dynamic web pages

  • Dynamic WTP

    Protects your data while Tomcat is running, detecting dynamic data tampering in databases.

  • Privileged process management

    Allows only privileged processes to modify web pages.

Not supported

Backup and restoration

  • Proactive backup and restoration

    If WTP detects that a file in the protection directory is tampered with, it immediately uses the backup file on the local server to restore the file.

  • Remote backup and restoration

    If a file directory or backup directory on the local server becomes invalid, you can use the remote backup service to restore the tampered web page.

Not supported

Protection object

Web tamper prevention. This function is suitable for websites that have high protection requirements.

Websites that only require application-layer protection

Configuring a Web Tamper Protection Rule in WAF

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. Click in the upper left corner and choose Web Application Firewall under Security & Compliance.
  4. In the navigation pane on the left, choose Website Settings.
  5. (Old console) In the Policy column of the row containing the domain name, click Configure Policy.
  6. (New console) In the Policy column of the row containing the domain name, click the number to go to the Policies page.

    Figure 1 Domain name list

  7. In the Web Tamper Protection configuration area, change Status if needed and click Customize Rule to go to the Web Tamper Protection page.

    Figure 2 Web Tamper Protection configuration area

  8. In the upper left corner of the Web Tamper Protection page, click Add Rule.
  9. In the displayed dialog box, specify the parameters by referring to Table 2.

    Figure 3 Adding a web tamper protection rule
    Table 2 Rule parameters



    Example Value

    Domain Name

    Domain name of the website to be protected


    A part of the URL, not including the domain name

    A URL is used to define the address of a web page. The basic URL format is as follows:

    Protocol name://Domain name or IP address[:Port]/[Path/.../File name].

    For example, if the URL is, set Path to /admin.

    • The path does not support regular expressions.
    • The path cannot contain two or more consecutive slashes. For example, ///admin. If you enter ///admin, WAF converts /// to /.


    Rule Description

    A brief description of the rule. This parameter is optional.


  10. Click Confirm. You can view the rule in the list of web tamper protection rules.

Enabling HSS Web Tamper Protection

  1. Log in to the management console.
  2. In the upper left corner of the page, select a region, click , and choose Security & Compliance > Host Security Service (New).

    Figure 4 Accessing HSS

  3. In the displayed dialog box, click Try the new edition to switch to the HSS (New) console.

    • Currently, HSS is available in the following regions: CN South-Guangzhou, CN-Hong Kong, AP-Bangkok, and AP-Singapore.
    • On the HSS (New) console, you can click Back to Old Console in the upper left corner to switch to the HSS (Old) console.

  4. In the navigation pane, choose Prevention > Web Tamper Protection. On the Web Tamper Protection page, click Add Server.

    Figure 5 Adding a protected server

  5. On the Add Server page, select the target server, select quota from the drop-down list or retain the default value, and click Add and Enable Protection.

    Figure 6 Selecting a server to enable protection

  6. View the server status on the Web Tamper Protection page.

    The premium edition will be enabled when you enable WTP.
    • Choose Prevention > Web Tamper Protection. If the Protection Status of the server is Protected, WTP has been enabled.
    • Choose Asset Management > Servers & Quota and click the Servers tab. If the protection status of the target server is Enabled and the Edition/Expiration Date of it is Premium (included with WTP), the premium edition provided by the WTP edition is enabled free of charge.

  • Before disabling WTP, perform a comprehensive detection on the server, handle known risks, and record operation information to prevent O&M errors and attacks on the server.
  • If WTP is disabled, web applications are more likely to be tampered with. Therefore, you need to delete important data on the server, stop important services on the server, and disconnect the server from the external network in a timely manner to avoid unnecessary losses caused by attacks on the server.
  • After you or disable WTP, files in the protected directory are no longer protected. You are advised to process files in the protected directory before performing these operations.
  • If you find some files missing after disabling WTP, search for them in the local or remote backup path.
  • The premium edition will be disabled when you disable WTP.