Protected Directory |
WTP supports static and dynamic web page protection. Static WTP protects specified directories by locking files in the web file directory in the drive to prevent attackers from modifying the files. Therefore, when configuring a protection policy, you need to specify the directories to be protected.
After a directory is protected, the files and folders in the directory will become read-only.
The requirements for adding a protected directory are as follows:
- For Linux,
- It cannot start with a space, end with a slash (/), or contain semi-colons (;). Up to 256 characters are allowed.
- A server can have up to 50 protected directories.
- The folder levels of a protected directory cannot exceed 100.
- The total folders in protected directories cannot exceed 900,000.
- For Windows,
- Up to 256 characters are allowed. The directory name cannot start with a space or end with a backslash (\). It cannot contain the following characters: ;/*?"<>|
- A server can have up to 50 protected directories.
Do not add network directories as protected directories. The reasons are as follows:
- A network directory usually contains a large number of files and may reach hundreds of terabytes, severely slowing down a scan.
- The access to network directories may occupy all your bandwidth and affect your services.
|
- Linux: /etc/lesuo
- Windows: d:\web
|
Excluded Subdirectory (Optional) |
If a protected directory contains subdirectories that do not need to be protected, you can exclude the subdirectories.
The requirements for adding a subdirectory are as follows:
- A subdirectory name must be a valid relative path of the protected directory.
- A subdirectory name cannot start or end with a slash (/), and can contain up to 256 characters.
- Up to 10 subdirectories can be added. Use semicolons (;) to separate multiple subdirectories.
|
- Linux: lesuo/test
- Windows: web\test
|
Excluded File Path (Optional) |
This item is available only for Linux servers.
If a protected directory contains files that do not need to be protected, exclude the files.
The requirements for adding excluded file paths are as follows:
- A file path must be a valid relative path of the protected directory.
- A file path cannot start or end with a slash (/), and can contain up to 256 characters.
- Up to 50 file paths can be added. Use semicolons (;) to separate multiple file paths.
|
lesuo/data;lesuo/ma.txt |
Local Backup Path |
This item is available only for Linux servers.
Set a local backup path for a protected directory. After WTP is enabled, files in the protected directory are automatically backed up to the local backup path. Once the system detects that a file in the protected directory is tampered with, it immediately uses the local backup to restore the tampered file.
The requirements for adding local backup paths are as follows:
- A local backup path cannot contain semicolons (;), start with a space, or end with a slash (/). Up to 256 characters are allowed.
- Key system directories are a main attack target and cannot be used as backup paths, including but not limited to /etc/, /bin/, /usr/bin/, /var/spool/, /usr/sbin/, /sbin/, /usr/lib/, /lib/, /lib64/, /usr/lib64/, and their subdirectories.
Local backup rule description:
- The local backup path must be valid and cannot overlap with the protected directory path.
- Excluded subdirectories and types of files are not backed up.
- Generally, the backup completes within 10 minutes. The actual duration depends on the size of files in the protected directory.
|
/etc/backup |
Excluded File Type |
If a protected directory contains files of certain types that do not need to be protected, exclude these file types, for example, logs. You can exclude any type of files.
To record the running status of servers in real time, exclude the log files in the protected directory. You can set high permission requirements for log read and write, so that attackers cannot view or tamper with log files. |
log |
Type |
Action taken when file tampering is detected.
- Alarm: Only alarms are reported.
- Block: An alarm is reported, and the file is restored to the status before being tampered with.
|
Block |
Scheduled Protection (Optional) |
You can schedule when to disable static WTP. In the unprotected period, you can modify, update, or release web pages.
Click to enable scheduled protection and configure the following parameters:
- Unprotected Time Range
A time range when WTP is disabled within a day, for example, 10:05 to 15:35.
Requirements:
- A time range must be at least 5 minutes.
- Time ranges (except for those starting at 00:00 or ending at 23:59) cannot overlap and must have at least a 5-minute interval.
- All time ranges are subject to the system time of the server.
- Unprotected Days of a Week
Static WTP is automatically disabled on specified days of a week, for example, Wednesday and Thursday.
|
, 10:05-15:35, Wednesday
|
Dynamic WTP (Optional) |
Dynamic WTP is mainly used to protect Tomcat applications on Linux. It can detect and prevent tampering with dynamic data, such as database data, in real time during application running.
Currently, dynamic WTP can protect Tomcat applications using JDK 8, JDK 11, and JDK 17.
To enable dynamic WTP, click and enter a complete Tomcat bin directory path, for example, /usr/workspace/apache-tomcat-8.5.15/bin. The system presets the setenv.sh script in the bin directory to configure the startup parameters of the anti-tamper program. |
, /usr/workspace/apache-tomcat-8.5.15/bin
|
Configure Privileged Processes (Optional) |
A privileged process is a process authorized to modify a protected directory.
After WTP is enabled, all files in the protected directory will be set to read-only and cannot be modified. If anyone attempts to modify a file or website, the system will automatically restore it to the status before the modification.
You can add privileged processes and use them to modify the files in protected directories or update websites. Ensure the specified privileged processes, which are authorized to access protected directories, are secure and reliable.
This feature is compatible with Linux and Windows. For Linux, only the distributions using kernel versions 5.10 or later are supported.
Click to enable the privileged processes and configure the following parameters:
- Process File Path
Set one or multiple complete file paths of privileged processes. Put each privileged process file path on a separate line. Up to 10 privileged processes are allowed.
- Trust Subprocess
If Trust Subprocess is enabled, HSS will trust all the subprocesses up to five levels deep in the subdirectories of specified directories, and allow the subprocesses to modify protected directories, and allow the subprocesses to modify protected directories.
|
- Linux: /Path/Software.type
- Windows: C:\Path\Software.type
|