Облачная платформаAdvanced

What Is WAF?

Эта статья полезна?
Язык статьи: Английский
Перевести

Web Application Firewall (WAF) is a tool used to protect web applications. WAF is deployed in front of web applications. It checks HTTP and HTTPS traffic between the Internet and web applications and identifies and blocks web attacks based on predefined protection rules. WAF can defend against many types of attacks, such as SQL injection, cross-site scripting (XSS), web shells, command/code injection, file inclusion, sensitive file access, third-party application vulnerability exploits, CC attacks, malicious crawler scanning, and cross-site request forgery (CSRF). You can use WAF to protect web servers, web applications, and sensitive data.

How WAF Works

After applying for WAF, add the website to WAF on the WAF console. After a website is connected to WAF, all website access requests are forwarded to WAF first. WAF detects and filters out malicious attack traffic, and returns normal traffic to the origin server to ensure that the origin server is secure, stable, and available.

Figure 1 How WAF Works


The process of forwarding traffic from WAF to origin servers is called back-to-source. WAF uses back-to-source IP addresses to send client requests to the origin server. When a website is connected to WAF, the destination IP addresses to the client are the IP addresses of WAF, so that the origin server IP address is invisible to the client.

Figure 2 Back-to-source IP address


Protected Objects

WAF offers the cloud and dedicated modes to protect websites. You can add either domain names or IP addresses to WAF. Before you start, get familiar with the following differences:

  • Cloud mode: protects your cloud and on-premises web applications as long as they have domain names.
  • Dedicated mode: protects your cloud web applications as long as they have domain names or IP addresses (public or private IP addresses).

Differences Between WAF and Advanced Anti-DDoS

  • Advanced Anti-DDoS: Provides protection at the network layer (Layer 3) and transport layer (Layer 4) to defend against heavy-traffic attacks, and at the application layer (Layer 7) to defend against CC attacks.
    • Network-layer protection defends against attacks on IP addresses, such as ICMP flood and UDP flood attacks.
    • Transport-layer protection defends against attacks on ports, such as TCP SYN flood and TCP RST flood attacks.
  • WAF: Provides protection at the application layer (Layer 7) to defend against attacks on web applications.
  • The following table lists the comparison between Advanced Anti-DDoS and WAF application layer protection.
    Table 1 Comparison between Advanced Anti-DDoS and WAF application layer protection

    Item

    Advanced Anti-DDoS

    WAF

    Core positioning

    Focus on heavy-traffic application layer: In addition to L3/L4 protection, lightweight L7 identification is provided to defend against ultra-large traffic CC/HTTP flood attacks.

    In-depth web application protection: Focuses on HTTP/HTTPS content parsing to prevent application-layer intrusions and vulnerability exploits.

    Protection principle

    Analyzes only the traffic volume, request frequency, and IP connection behavior. In-depth parsing is not performed on the request content. Abnormal access is identified based on the traffic threshold and connection baseline.

    Fully parses request headers, URLs, parameters, request bodies, and cookies, and identifies malicious payloads through feature matching, regular expressions, semantic analysis, and behavior detection.

    Typical attack scenarios

    • High-concurrency, ultra-large-traffic services such as gaming, live broadcast, e-commerce promotion, and government and enterprise portal
    • CC, HTTP flood, and slow attacks with over 100,000 QPS
    • L3/L4 DDoS + application-layer CC hybrid attack scenarios
    • HA scenarios where bandwidth should be preferentially guaranteed and services are not interrupted
    • Standard web services such as websites, mini programs, APIs, and management backends
    • Vulnerability exploits, web page tampering, malicious crawlers, and API traffic spoofing
    • Medium- and low-level QPS services, requiring security compliance and intrusion prevention
    • Scenarios requiring refined access permission control and content risk control

    Best combination

    Use Advanced Anti-DDoS to defend against heavy traffic, and use WAF to implement precise application protection, forming in-depth defense with Advanced Anti-DDoS (L3/L4 + light L7), WAF (in-depth L7), and origin server.