Combining WAF and HSS to Improve Web Page Tampering Protection
Application Scenarios
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.
This topic describes how to use the combination of WAF and HSS to protect dynamic and static web pages from being tampered with.
Solution Architecture and Advantages
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.
Resource and Cost Planning
Resource |
Description |
Monthly Fee |
---|---|---|
Host Security Service (HSS) |
|
For details about billing rules, see Billing Description. |
Web Application Firewall |
Cloud mode - standard edition:
|
For details about pricing rules, see Billing Description. |
Step 1: Configure a Web Tamper Protection Rule in WAF
- Log in to the WAF console.
- Click
in the upper left corner and select a region or project.
- (Optional) If you have enabled the enterprise project function, in the upper part of the navigation pane on the left, select your enterprise project from the Filter by enterprise project drop-down list. Then, WAF will display the related security data in the enterprise project on the page.
- In the navigation pane on the left, click Policies.
- Click the name of the target policy to go to the protection rule configuration page.
Before configuring protection rules, ensure that the target protection policy has been applied to a domain name. A protection policy can be applied to multiple protected domain names, but a protected domain name can have only one protection policy.
- Click the Web Tamper Protection configuration area and ensure that web tamper protection is enabled.
: enabled.
- In the upper left corner above the Web Tamper Protection rule list, click Add Rule.
- In the displayed dialog box, specify the parameters by referring to Table 3.
Figure 1 Adding a web tamper protection rule
Table 3 Parameter description Parameter
Description
Example Value
Domain Name
Domain name of the website to be protected
www.example.com
Path
Path of the URL for which you want to enable web tamper protection.- A URL is the address of a web page. The basic format of a URL: Protocol-name://Domain-name or IP-address[:Port]/[Path-name/.../Filename].
For example, if the URL is http://www.example.com/admin, set Path to /admin.
- Note that:
- Do not include the domain name in the path.
- Regular expressions are not supported.
- The path cannot contain two or more consecutive slashes. For example, if you enter ///admin, WAF will convert /// to /.
/admin
Rule Description (Optional)
A brief description of the rule.
None
- A URL is the address of a web page. The basic format of a URL: Protocol-name://Domain-name or IP-address[:Port]/[Path-name/.../Filename].
- Click OK. You can view the rule in the list of web tamper protection rules.
To update cache of a protected web page, click Update Cache in the row containing the corresponding web tamper protection rule. If the rule fails to be updated, WAF will return the recently cached page but not the latest page.
After completing the preceding configurations, you can:
- Update the cache: To update cache of a protected web page, click Update Cache in the row containing the corresponding web tamper protection rule. If the rule fails to be updated, WAF will return the recently cached page but not the latest page.
- Check the rule status: In the protection rule list, check the rule you added. Rule Status is Enabled by default.
- Disable the rule: If you do not want the rule to take effect, click Disable in the Operation column of the rule.
- Delete or modify the rule: Click Delete or Modify in the Operation column of the rule.
- Verify the protection effect:
- Access the http://www.example.com/admin page. The initial page is displayed.
- Simulate the attack to tamper with the http://www.example.com/admin web page.
- Access the http://www.example.com/admin page in the browser. The initial page that is not tampered with is displayed.
- On the Events page, check the protection logs.
Step 2: Enable HSS Web Tamper Protection
- Log in to the HSS console.
- Click
in the upper left corner and select a region or project.
- In the navigation pane, choose Server Protection > Web Tamper Protection.
Figure 2 Web tamper protection
- On the Servers tab, click Add Server. The Add Server page is displayed.
- On the Add Server page, select servers and click Next. For more information, see Table 4.
Figure 3 Selecting servers
Table 4 Parameters for selecting protected servers Parameter
Description
Example Value
OS
Select the OS type of the server to be protected by WTP.
- Linux
- Windows
Linux
Select Servers
Select servers.
You can filter the servers by software type or other attributes.
-
Select Quota
The HSS WTP edition supports two billing modes, yearly/monthly and pay-per-use billing, to meet requirements in different scenarios.
- Yearly/Monthly billing is a prepaid mode in which you pay for the service before using it. Your bill is generated based on the required duration you specify in the order. The longer you use the service, the more discounts you got.
- Pay-per-use is a postpaid billing mode. You pay as you go and just pay for what you use. The HSS usage is calculated by the second but billed every hour. With the pay-per-use billing mode, you can easily adapt to resource requirement changes, reducing the risk of over-provisioning resources or lacking capacity. In this mode, there are no upfront commitments required.
When selecting the yearly/monthly billing mode, you can select a quota or retain the default value Select a quota randomly.
Yearly/Monthly
Agreement
Before enabling WTP, ensure that you have read the Host Security Service Disclaimer.
Select I have read and agree to the Host Security Service Disclaimer.
Selected
- On the Add Server page, configure policies. For more information, see Table 5.
Figure 4 Configuring policies
- After the policy is configured, click OK.
- On the Servers tab, check the static and dynamic WTP status of the server.
The Protected status indicates protection has been enabled. After dynamic WTP is enabled, restart Tomcat to apply the settings.

- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot