DEV Community

Carrie
Carrie

Posted on

SafeLine WAF: How to Protect Your Website Dynamically

1. Introduction

As cybersecurity continues to evolve, we see more and more technologies and strategies being applied to protect personal and organizational data from malicious attacks and intrusions.

2. What is SafeLine WAF

SafeLine is a self-developed web application firewall by Chaitin, a network attack detection system based on big data and machine learning technologies. By monitoring and analyzing threat intelligence, attack data, and vulnerability information from around the world in real-time, SafeLine can quickly detect and identify unknown security threats, accurately determine the type and source of attacks, and promptly issue alerts. SafeLine also features a self-developed intelligent defense engine and a visual management interface, providing efficient attack prevention and comprehensive security monitoring, thus offering users more secure and reliable cloud security services.

Now they provide the free and open source edition for trial.

3. How to Install SafeLine

You can choose the installation method according to your system environment, supporting one-click installation.

Online Installation (Recommended)

If the server can access the internet, use this method for installation.

Execute the following command to complete the installation:

bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/setup.sh)"
Enter fullscreen mode Exit fullscreen mode

If you need to install the latest version in stream detection mode, use:

STREAM=1 bash -c "$(curl -fsSLk https://waf-ce.chaitin.cn/release/latest/setup.sh)"
Enter fullscreen mode Exit fullscreen mode

After installation, access port 9433 to see the SafeLine management page.

Click sequentially, Web Service ---> Add Web Service to add the site you need to protect.

4. SafeLine Dynamic Protection Capability

4.1 This is a blog system (Typecho) I set up on the intranet.

Image description

4.2 This is the state with dynamic protection not enabled.

Image description

You can see that the webpage source code is not encrypted.

Image description

4.3 How to Enable Dynamic Protection

First, you need to update to the latest version of SafeLine. After adding the site, configure dynamic protection in the "Web Services ---- Security ---- Dynamic" option.

Image description

Image description

  1. First-time users need to add the resources that need protection.
  2. I chose to add the admin/login.php file and clicked add.

Image description

  1. Click save to enable dynamic protection.

Image description

5. Dynamic Protection Enabled

After enabling dynamic protection, the source code of the resources you choose to protect will be dynamically encrypted.

When you access the protected resources, you will see
Image description

5.1 Comparison Before and After Encryption

Before dynamic protection is enabled

Image description

After dynamic protection is enabled

Image description

6. Protection Logs

SafeLine's protection logs allow us to clearly see records of successfully intercepted attacks.

Directory scanner has been blocked effectively.

Image description

Image description

7. Conclusion

SafeLine WAF is easy to install, supporting online and one-click installation. Through dynamic protection features, users can encrypt site resources to enhance security. Additionally, SafeLine provides detailed protection log records, helping users monitor and block potential attacks.

More information refer to the following sites:
Website:https://waf.chaitin.com/
Github:https://github.com/chaitin/SafeLine
Discord:https://discord.gg/wVyX7vDE

Reference:https://zhuanlan.zhihu.com/p/701540414

Top comments (0)