DDoS and CC attack principles and common defense methods (with real-world cases)

02 May, 2025 zhangwuji

In the field of network security, DDoS (Distributed Denial of Service Attack) and CC (Challenge Code Attack) can be called two major "traffic killers". The former with "flood-like traffic" flooding the target server, the latter with "precise request" exhaustion of system resources, although the two have similar goals, but the technical principles and defense logic are very different.

I. What is a DDoS attack?

1. Core Principle: Distributed Collaboration's "Sea of Men"

DDoS attacks work by controlling hundreds or thousands of "zombie hosts" (Botnet), sending a huge number of invalid requests to the target server, which ultimately leads to the network bandwidth being occupied, server resources being exhausted, and normal users being unable to access.

Common types of attacks include:

  • SYN Flood: Exploit the TCP three times handshake flaw to send a large number of semi-open connection requests, exhausting the server connection pool (e.g., this type of attack is common during e-commerce sales);
  • UDP Flood: Send massive UDP packets to random ports, forcing the target device to keep returning error responses and consuming CPU resources;
  • DNS Flood: Fake domain name resolution requests that cause DNS servers to become overloaded, triggering chained service outages.
Explain the DDoS attack schematic
DDoS Attack Schematic

2. Traffic characteristics: the violent aesthetics of "volume and variety"

DDoS attack traffic typically has three characteristics:

  • Single node traffic peaks exceed the target bandwidth threshold (e.g., above 50 Gbps);
  • The source IPs are dispersed, with no clear geographic or behavioral pattern;
  • Contains a large number of invalid requests (e.g. malformed packets, unusual protocol formats).

Real-world case: a blockchain exchange suffered 800Gbps DDoS attack, and the user transaction page was completely paralyzed. Through traffic analysis, we found that 70% of the attack traffic is UDP packets, and the source IP covers 200+ countries around the world, which is a typical distributed coordinated attack.

Second, what is CC attack?

1. Core Principle: "Resource Exhaustion Technique" to Disguise Normal Users

CC attacks focus on the application layer (OSI Layer 7) by simulating real user behavior and sending legitimate but high-frequency HTTP/HTTPS requests (e.g., visiting the home page, submitting a form, calling an API) to the target server. As each request appears normal, it is difficult for traditional firewalls to recognize it, eventually leading to:

  • The web server thread pool is full and cannot handle real user requests;
  • Database connections are overloaded and query response times soar from milliseconds to minutes;
  • CDN edge node cache failures and surges in back-to-source requests drag down the source station.
CC Attack Schematic
CC Attack Schematic

2. Traffic characterization: the gentle stranglehold of the "legal but abnormal"

Unlike the "violent traffic" of DDoS, CC attacks are more stealthy:

  • Unusually high frequency of single IP requests (e.g., hundreds of page views per minute);
  • Requests are focused on specific URLs (e.g. "checkout page" for e-commerce, "login interface" for games);
  • Includes browser fingerprints such as real User-Agents, cookies, and even simulates human browsing latency.

Practical case: a cross-border e-commerce suffered CC attacks, the attacker launched 2000 requests per second for the "product details page", resulting in the server CPU utilization rate of 100%, the product purchase function is completely jammed, and the firewall did not trigger the interception of legitimate requests.

III. Construction of the defense system: from "passive" to "active defense"

1. Common Defense Strategy: Building a Strong Cybersecurity Baseline

Traffic cleaning technology: through dedicated devices or cloud services (e.g.08Host DDoS Protection,Cloudflare Spectrum), filtering malicious traffic in real time.

Typical Steps:

Traffic mirroring analysis to identify anomalous traffic characteristics (e.g., traffic surges for DDoS, high-frequency URL requests for CC);

Block malicious requests based on rule-based engines (e.g., IP black and white lists, request frequency limits) or AI models (machine learning user behavior baselines);

The cleaned and cleaned traffic is returned to the source to guarantee the normal processing capacity of the server.

Elastic bandwidth and load balancing:

Configure redundant bandwidth (e.g., 20Gbps base bandwidth + 50Gbps burst expansion) for critical services, and combine with load balancing equipment (e.g., F5BIG-IP) to spread traffic to multiple server nodes to avoid single-point overload.

2.DDoS Targeted Defense

IP Traceability and Botnet Combat: Hiding the source IP through BGP Anycast technology, while linking with threat intelligence platforms (e.g., Spamhaus, CiscoTalos) to identify the IP of the botnet, and blocking the source of the attack in advance.

Protocol optimization and state detection: For SYN Flood, TCPSYN Cookie technology is enabled to verify the legitimacy of the client in the three handshake phases to avoid occupying server connection resources;

For DNSFlood, deploy a DNS firewall (e.g. PowerDNSRecursor) to filter invalid domain name resolution requests.

3.CC attack targeted defense

Human-robot identification and behavioral verification: force triggering CAPTCHA (e.g., GooglereCAPTCHA, Extreme Verification Sliding Verification) on high-frequency access pages (e.g., logging in, payment), and distinguishing between humans and robots by analyzing characteristics such as mouse movement trajectory and clicking frequency.

Intelligent Speed Limit and URL Access Control: set thresholds for the request frequency of a single IP (e.g. 100 times per minute), beyond which temporary blocking will be triggered; enable referer checksum and IP whitelisting for core URLs (e.g. /api/order) to restrict access to non-business scenarios.

Web Application Firewall (WAF): Deploy WAF (e.g., ModSecurity, AWSWAF) and customize rules to intercept anomalous requests.

Example:

  • Prohibit the same IP from submitting a form more than 5 times in 10 seconds;
  • Identify HTTP requests containing SQL injection Payload and block them.

Case: A game company defended against CC attacks through "AI behavioral analysis + WAF rules", set the request frequency threshold for a single IP to 200 times/minute, and enabled dynamic authentication code for the "role creation" interface, and the interface response latency dropped from 500ms to 80ms during the attack. During the attack, the response time of the interface was reduced from 500ms to 80ms, and the number of user complaints decreased by 90%.

IV. Selection of enterprise-level defense solutions

Small and medium-sized teams: lightweight cloud protection solutions

Choose cloud CDN with integrated DDoS cleaning and CC protection (such as CloudflarePro, CDN5 high defense IP), the basic package supports 10-50Gbps protection, the monthly fee is about $50-200, suitable for blogs, small and medium-sized e-commerce sites.

Advantage: ready-to-use, no need to build your own hardware; Disadvantage: complex scenarios require additional configuration rules.

Medium to Large Enterprises: Hybrid Architecture with Localized Hardware + Cloud Services

Local deployment of DDoS cleansing equipment (e.g. Huawei AntiDDoS) combined withCDN07The cloud traffic cleaning, forming a three-dimensional defense of "local cleaning + cloud backing".

Advantage: high degree of customization, suitable for finance, government and other industries with high requirements for data localization; Disadvantage: high initial investment costs (hardware procurement + operation and maintenance team).

Emerging industries (blockchain, cross-border e-commerce): anonymization protection solutions

Choose to support cryptocurrency payments, anonymous access to theAnti-DDoS CDN(e.g., CDN07) to protect business privacy while defending against attacks and avoiding compliance risks due to filing or real name requirements.

V. The essence of defense is "knowing your enemy".

The technological evolution of DDoS and CC attacks has never stopped - from the early days of script kiddies using open source tools to launch attacks, to today's hacker organizations using AI to generate variant requests to bypass protection. Enterprises need to establish a closed-loop system of "monitoring-analysis-response-optimization":
Real-time insight into anomalies through traffic monitoring tools (e.g. Prometheus, Grafana);

Conduct regular attack and defense drills (e.g., simulate DDoS attacks to test bandwidth redundancy capabilities);

Keep an eye on industry threat reports (e.g., Akamai's Internet Security Report) and keep your protection rules up to date.

There is no "silver bullet" for network security, but by understanding the principles of attack, selecting the appropriate solution, and continuously optimizing the defense strategy, enterprises are fully capable of holding their ground in the "traffic war". After all, real security begins with a clear perception of risk.

Leave a Reply

Your email address will not be published. Required fields are marked *