Attack Analysis·

Deep Dive into Memcached Reflection Amplification Attacks

A comprehensive technical analysis of Memcached reflection amplification attacks, exploring the protocol mechanics, real-world case studies, and proven mitigation strategies to protect your infrastructure.

Memcached Protocol Overview

Memcached is a high-performance distributed memory caching system widely used to accelerate dynamic web applications. It uses a simple text-based protocol supporting both TCP and UDP transport methods. It is precisely the openness of its UDP interface that provides an opportunity for reflection amplification attacks.

Core Protocol Characteristics

No Authentication Mechanism

By default, no client authentication is required. Any host that can access the Memcached port can send requests.

UDP Support

For low latency, Memcached can listen on UDP port 11211. UDP's connectionless nature makes it easy to exploit through source address spoofing.

High Amplification Factor

A single small request (approximately 15 bytes) can trigger up to 1 MB of data return, with a theoretical amplification factor of up to 51,000x.

Key Risk: Memcached's stats command can return detailed cache statistics. Attackers can achieve an amplification factor of approximately 130x using this command without needing to pre-inject data.

Reflection Amplification Attack Mechanism

Attack Mechanism

The core of reflection amplification attacks (DrDoS) lies in using third-party servers as "reflectors" to amplify small attack requests into large volumes of attack traffic that ultimately converge on the target victim. Memcached attacks have an extremely high amplification factor, with a theoretical maximum of 51,000x.

Spoof Source Address

The attacker constructs Memcached request packets, forging the source IP as the victim's address. Since UDP is connectionless, the server cannot verify the authenticity of the source address.

Send Requests

Send requests to Memcached servers exposed on the internet. Attackers typically scan large numbers of servers to find targets exposed on the public network.

Amplification and Reflection

Memcached servers send large volumes of response data to the "source address" (i.e., the victim). The response data volume far exceeds the request data volume, achieving traffic amplification.

Traffic Convergence

Responses from thousands of Memcached servers converge into a massive attack flood, and the victim's network bandwidth is instantly exhausted.

Amplification Factor Analysis

Request CommandRequest SizeResponse SizeAmplification FactorDanger Level
stats~15 bytes~2 KB~130xMedium
stats slabs~20 bytes~10 KB~500xHigh
stats items~20 bytes~50 KB~2,500xExtremely High
Custom key read~15 bytesUp to 1 MB~51,000xExtremely High
By pre-injecting large amounts of data into Memcached (exploiting the default no-authentication characteristic) and then using get commands to read this data, attackers can achieve extremely high amplification factors. This two-phase attack pattern of "pre-injection + reflection" enables attack traffic to easily reach Tbps levels.

Real Case Studies

GitHub Incident (2018)

In February 2018, the well-known code hosting platform GitHub experienced one of the largest DDoS attacks in history at that time, with a peak traffic of 1.35 Tbps. The attackers precisely utilized Memcached reflection amplification technology, launching the attack through approximately 1,700 Memcached servers exposed on the internet.

Incident Impact: The attack caused GitHub service disruption for approximately 10 minutes, affecting millions of developers' normal work. This incident prompted the industry to harden Memcached services at scale and drove the development of UDP reflection attack protection technologies.

Although Memcached attacks have been widely recognized by the industry, our monitoring data shows:

MetricDataTrend
Share of all reflection attacks18%Declining
Average attack peak750 Gbps+45%
Average attack duration12 minutesShortening
Publicly exposed servers~23,000Slowly decreasing

Attacks exhibit a "short and intense" characteristic -- duration is shortening but peak traffic is increasing, placing higher demands on the rapid response capability of protection systems.

Protection Strategies

Protection for Memcached Servers

Protection for Potential Victims

  • Traffic scrubbing: Deploy professional DDoS protection equipment to identify and filter Memcached reflection traffic
  • Anycast network: Use Anycast technology to distribute attack traffic across multiple nodes
  • Protocol analysis: Identify abnormal Memcached response traffic based on deep packet inspection (DPI)
  • Blackhole routing: In extreme cases, route attack traffic to a blackhole

Hiddos Protection Capabilities

Hiddos's intelligent traffic scrubbing platform provides multi-layer protection mechanisms against reflection amplification attacks. Through real-time protocol fingerprint identification technology, the system can identify Memcached reflection traffic characteristics within sub-seconds, automatically triggering scrubbing strategies. Additionally, Hiddos's global Anycast protection network can distribute attack traffic to the nearest scrubbing nodes, ensuring normal business operations are unaffected.

Conclusion

Although Memcached reflection amplification attacks have been known for years, their extremely high amplification factor and the large number of still-exposed servers make them an important threat in the DDoS attack landscape. Enterprises should build comprehensive defense systems from both the source (hardening Memcached services) and the endpoint (deploying professional protection) to effectively counter such attacks.

© 0 Hiddos Corporation. All rights reserved