Popular code-sharing website github reported that on feb. 28, it was hit by a massive ddos attack that left its site unavailable or intermittently unreachable, but only for 10 minutes. Akamai, which provides ddos defenses for github, clocked the attack’s peak at a whopping 1.35 terabits per second.

On monday, however, ddos defense firm arbor networks, part of netscout, reported that one of its customers, a U.S.-based service provider, was hit by a 1.7 tbps reflection/amplification attack "based on the same memcached reflection/amplification attack vector that made up the github attack," according to arbor’s carlos morales, who says his firm successfully repelled the disruption.

Arbor says the biggest-ever previous ddos attack that it logged was in the summer of 2016, when a brazilian customer was hit with a 650 gbps attack. "The memcached UDP protocol [is] a fine example of double trouble with potential for severe operational impact."

Port 11211

"Memcached servers are now being used as reflectors/amplifiers to launch extremely high-volume UDP reflection/amplification attacks," morales says in a march 1 blog post. "They are proving especially effective because memcached servers have high-bandwidth access links and reside on networks with high-speed transit uplinks. This makes memcached servers ideal for use in high-bandwidth reflection/amplification ddos attacks." frequency of ddos attacks from april 2014 to feb. 2018 against customers of arbor networks. Irrespective of frequency, the firm says attack intensity has spiked in recent months. (source: arbor networks)

Here’s how: "you should see traffic *from* port 11211 if you are hit by this attack," he says in a blog post. "Blocking all traffic from port 11211 should be possible, as all modern operating systems tend to use a source port higher than that for client connections. But given the traffic volumes people are seeing, you will likely need help "upstream" or from an anti-ddos company."

Some ddos extortionists are now threatening to unleash memcached-enabled disruptions on victims unless they pay ransoms of 50 monero – aka XMR – cryptocurrency, worth about $16,000. But ullrich says all attacks seen to date have directed victims to pay into a single monero wallet address, meaning that these opportunistic criminals would have no way to verify which victims paid or did not pay.DDoS attacks memcached ddos packet with request for payment in monero, aka XMR, cryptocurrency. (source: akamai) the power of amplification

Memcached offers massive bang for attackers’ buck. For starters, it can be abused to inject massive keys – up to 50 kilobytes – and attackers can then use IP spoofing to create ddos attacks with a massive rate of amplification.

The U.S. Computer emergency readiness team has updated its alert on UDP-based amplification attacks, originally released in 2014, to include memcached-based reflection ddos attacks via UDP/TCP port 11211. It warns that abusing memcached can result in attacks being amplified by 10,000 to 51,000 times. Memcached users: upgrade now logo for the open source memcached project.

As information security media group reported on monday, version 1.5.6 of memcached, released feb. 27, disables UDP by default, according to memcached’s developer, who goes by dormando. "I’m surprised it took this long for someone to abuse it," dormando tweets. "Please upgrade, or disable UDP. …Port 11211 please do not expose cache to internet, and so on."

For what it’s worth, if you’re getting attacked by memcached’s, it’s pretty easy to disable them since the source won’t be spoofed. They may accept "shutdownrn", but also running "flush_allrn" in a loop will prevent amplification.— dormando (@dormando) february 27, 2018 potential risks, defenses

Memcached can potentially be used for more than ddos attacks. On wednesday, ddos defense firm corero network security warned that servers with open memcached ports could potentially be abused by attackers to "reveal the ‘keys’ to your data" by using debug commands, as well as potentially to maliciously modify the data and reinsert it into the cache without the knowledge of the memcached owner. "If you have a memcached server in your environment that is exposed to the internet, then you should stop scanning for them, and spend your time writing a resume instead."

DDoS attack

Corero also repeated a suggestion, first aired by dormando on feb. 27, that sending a "flush_all" command back to any attacking server could help mitigate attacks. Doing so "invalidates a vulnerable server’s cache, including the large, potentially malicious payload planted there by attackers," according to corero, which suggested this maneuver might function as the equivalent of a "kill switch."

But mounir hahad, head of threat research at security hardware manufacturer juniper networks, tells ISMG that he believes this defense is no silver bullet.

"This kill switch is unfortunately just a band-aid," hahad says. "It will take an attacker only a few minutes to overcome by replanting the large file in the memcached servers again.Port 11211 it becomes a game of whack-a-mole: the attacker replants the file repeatedly and the good guys try to flush it out again and again. Try doing this on about 100,000 servers at the same time and you’ll realize it’s a cat-and-mouse chase."

Also, corero’s suggestion to use "flush_all" might subject users to legal repercussions, says john graham-cumming, CTO of cloudflare. "We didn’t use this technique because it’s unethical and possibly illegal," he tweets. Servers vulnerable to abuse

Shodan, a search engine for devices connected to the internet, reports that as of march 5, more than 105,000 internet-connected servers were running memcached and answer on TCP or UDP port 11211, meaning their use of the protocol could potentially be abused.

More than 10,000 of those servers appear to be run or hosted by china’s hangzhou alibaba advertising, an advertising technology unit of e-commerce giant alibaba.Port 11211 by domain, the single greatest number of servers appear to be hosted by amazon web services.

As of thursday, however, shodan searches reported that the number of servers listening on port 11211 had decreased from approximately 105,000 to less than 96,000.

On feb. 27, ddos defense firm cloudflare reported that its data centers in new jersey, germany and hong kong were seeing a disproportionately large number of attacking IP addresses because most of the vulnerable servers are located in major hosting providers." location of servers being used to launched memcached ddos attacks as of feb. 27. (source: cloudflare) isps help mitigate threat

Based on scans of the ipv4 space, ddos defense firm qrator labs reports finding fewer vulnerable servers. Whatever the actual quantity is, the good news is that the number of servers running memcached in a manner that can be exploited by ddos attackers appears to be diminishing.DDoS attacks scans of servers in the ipv4 address space show a decline in the number of internet-connected servers running the memcached protocol that are listening on TCP or UDP port 11211. (source: qrator labs)

"The significant part of this decrease was the result of homework made by several huge isps," qrator labs says, noting that by monday, alibaba had fixed more than 5,000 servers, hosting giant OVH more than 2,300 servers and china telecom more than 1,600. "Still, there are more than 8,000 services that haven’t been fixed," qrator labs says. "We encourage all isps to check their networks and fix services that can be used as amplification for the ddos attack."

All isps should "port filter (exploitable port filters), rate limit the port 11211 UDP traffic (ingress and egress), and clean up any memcached exposed to the internet (iptables on unix works)" for both ipv4 and ipv6, barry greene, principal architect at akamai, says in a blog post cited by US-CERT. "There is not excuse for isps, telcos and other operators for not acting."

Port 11211

Service providers, including telecommunications giant NTT communications, have also been responding, says job snijders, an internet architect at NTT

"NTT too has deployed rate limiters on all external facing interfaces on the GIN [global IP network] backbone – for UDP/11211 traffic – to dampen the negative impact of open memcached instances on peers and customers," snijders writes in a march 1 post to the north american network operators group mailing list.

"The toxic combination of ‘one spoofed packet can yield multiple response packets’ and ‘one small packet can yield a very big response’ makes the memcached UDP protocol a fine example of double trouble with potential for severe operational impact," he adds. What IT administrators must do

Enterprise IT administrators must also act. "If you are an enterprise, ask your upstream ISP if they are deploying exploitable port filters and look through your firewall rules to add them to your network," greene says. "Layered security means it is prudent to ask your ISP to do their part while you do your part."

DDoS attack

"There should be no business for these memchached servers to accept connections from the internet. People should be using firewall or routing rules to drop traffic from the internet to these servers, period," says juniper’s hahad. "It is very easy to mitigate this kind of amplification: just rate limit the particular port used by this service, 11211, which can be done by any decent firewall. Better yet, reconfigure your network to have memcached only allow connections from the desired servers."

"If you have a memcached server in your environment that is exposed to the internet, then you should stop scanning for them, and spend your time writing a resume instead," ullrich says.

"Either because you do not want to work in an utterly incompetent organization like that, or if you are responsible for the exposed server, then …Port 11211 write a resume for a simpler job" than being a systems administrator, he says.

Schwartz is an award-winning journalist with two decades of experience in magazines, newspapers and electronic media. He has covered the information security and privacy sector throughout his career. Before joining information security media group in 2014, where he now serves as the executive editor, databreachtoday and for european news coverage, schwartz was the information security beat reporter for informationweek and a frequent contributor to darkreading, amongst other publications. He lives in scotland.