25
Amplification DDoS attacks with game servers Alejandro Nolla

DDoS amplification attacks with game servers

Embed Size (px)

DESCRIPTION

Talk I gave at GreHack 2013 about a research to analyze and evaluate current situation and potential impact of DDoS amplified attacks using video game servers as well as bypassing potential mitigations. As a result of such research several dozens of vulnerabilities were notified through CERTs.

Citation preview

Page 1: DDoS amplification attacks with game servers

Amplification DDoS attackswith game servers

Alejandro Nolla

Page 2: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

CLASS ALEJANDRONOLLA(MANDALORIAN):#---------------------------------------------------------def __init__(self): self.name = 'Alejandro Nolla Blanco' self.nickname = 'z0mbiehunt3r' self.role = 'Threat Intelligence Analyst' self.interests = ['networking', 'python', 'offensive security'] self.member_of = 'mlw.re'

Hunting MalwareLike a Sirmlw.re

Page 3: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

UDP as transport protocolUpper layers must properly control communication

The “bad guy” sends spoofed requests

WHAT IS AN AMPLIFICATION ATTACK?

Intermediate servers “amplify”

answers

Victim gets flooded

Page 4: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

FUZZING THROUGH STIMULUS

The “hacker without time” solution“Gameserver status query libraries” for the win!

---protocol: sourcestimulus: - \xFF\xFF\xFF\xFF\x56\x00\x00\x00\x00 - \xFF\xFF\xFF\xFFTSource Engine Query\x00

Page 5: DDoS amplification attacks with game servers

Let’s frag...

Page 6: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

HAIL TO THE KING(S), BABYGame Protocol Amplification

factor (max.)CS Condition

Zero half-life x109.8

f.e.a.r gamespy x107

quake-4 doom3 x88

CS Source half-life x83

Tested about 75 games, 67 vulnerable

Perceived really high amplification factors

Page 7: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

THE ROOT OF ALL EVIL

Quake Engine

id Tech 2

id Tech 3

id Tech 4

GoldSrc

IW engine

SourceEngine

ioquake3

Already vulnerable!

CVE-1999-1066

Page 8: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

THE ROOT OF ALL EVIL

Quake Engine

id Tech 2

id Tech 3

id Tech 4

GoldSrc

IW engine

SourceEngine

ioquake3

Already vulnerable!

CVE-1999-1066

Page 9: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

UNINTENDED SELF-FLOOD

# capinfos undisclosed_game.pcap# capinfos undisclosed_game.pcapNumber of packets: 817Capture duration: 200 secondsData byte rate: 244 bytes/sData bit rate: 1958 bits/sAverage packet size: 59,99 bytesAverage packet rate: 4 packets/sec

Page 10: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

UNINTENDED SELF-FLOOD

# capinfos undisclosed_game.pcap# capinfos undisclosed_game.pcapNumber of packets: 817Capture duration: 200 secondsData byte rate: 244 bytes/sData bit rate: 1958 bits/sAverage packet size: 59,99 bytesAverage packet rate: 4 packets/sec

With just one request

Page 11: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

CLOAKING A DDOS ATTACK

Be a genuine Predator

Responses triggered to any payload, even to one byte

“disconnect” flood

token flood

Page 12: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

if data_to_send > MTU: ip.flags = 0x01 # More Fragments ip.frag_offest = XX

Needs (exhaustive) reassembling!

Collateral damage #01

Page 13: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

if data_to_send > MTU: ip.flags = 0x01 # More Fragments ip.frag_offest = XX

Needs (exhaustive) reassembling!

Collateral damage #01

Collateral damage #02“backscatter” effect

ICMP “port unreacheable” responsesAdds more traffic...

???

Page 14: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

ABUSING MASTER SERVER QUERY PROTOCOL

>>> r = sr1(IP(dst='hl1master.steampowered.com')/ UDP(dport=27011)/Raw('\x31’))>>> r.display()###[ IP ]### [...]###[ UDP ]### len= 1400###[ Raw ]### load= '\xff\xff\xff\xff [...]’

https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol

Page 15: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

>>> r = sr1(IP(dst='hl1master.steampowered.com')/ UDP(dport=27011)/Raw('\x31’))>>> r.display()###[ IP ]### [...]###[ UDP ]### len= 1400###[ Raw ]### load= '\xff\xff\xff\xff [...]’

Amplification

factor of x

33,34

You bring

the spoofed

queries,

Valve bring

s the serve

rs

ABUSING MASTER SERVER QUERY PROTOCOL

https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol

Page 16: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

FINDING SERVERS (THE EASY WAY)

Game Servers VulnerableCounter Strike 1.6 24,100 YES

Minecraft 9,692 YES

CS Global Offensive 9,079 YES

Team Fortress 2 8,136 YES

CS Source 7,531 YES

Call Of Duty 4 5,219 YES

Battlefield 3 4,241 NO

DayZ 4,216 YES

www.gametracker.com, games with most servers

Page 17: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

FINDING SERVERS (THE RUDE WAY)

One request per IP address to source protocol default port 27015 (in few hours...)

81,000 answers, 55,460 “looked like” source protocol

Page 18: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

MITIGATION NETWORK LAYER

VICTIM

UPSTREAM #2

UPSTREAM #1

Page 19: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

UPSTREAM #2

MITIGATION NETWORK LAYERMUST be

mitigated at edge/upstream level

VICTIM

UPSTREAM #1

RTBH, uRPF, A

CL, fw rules...

Page 20: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

content:"|ff ff ff ff 73 74 61 74 75 73 52 65 73 70 6f 6e 73 65|"; nocase; offset:0; depth:18;

MITIGATION NETWORK LAYER

Easily detected by IDS/IPS/DPI rules

UPSTREAM #2

MUST be mitigated at edge/

upstream levelVICTIM

UPSTREAM #1

RTBH, uRPF, A

CL, fw rules...

Page 21: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

content:"|ff ff ff ff 73 74 61 74 75 73 52 65 73 70 6f 6e 73 65|"; nocase; offset:0; depth:18;

MITIGATION NETWORK LAYER

statusResponse

Easily detected by IDS/IPS/DPI rules

UPSTREAM #2

MUST be mitigated at edge/

upstream levelVICTIM

UPSTREAM #1

RTBH, uRPF, A

CL, fw rules...

Page 22: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

Use challenge/response tokensImplemented in the proper way

IP requests throttlingLess concurrent requests, more servers

MITIGATION APP. LAYER

Limit source IP to actual gamersCan be still used against players

Page 23: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

CONCLUSIONS

There are a lot of vulnerable servers

Huge online gaming infrastructures also vulnerable

Amplification attacks transition to game servers based?

BCP 38, BCP84, uRPF, filtering, filtering and more filtering....

Page 24: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

SOME LAST WORDS...Valve didn’t worry too much (hey Valve,

giving feedback doesn’t hurt...)

Spanish cert INTECO handled almost everything (thanks guys, you rock!)

Dozens vulnerabilities notified through US-CERT (thanks again, INTECO)

Page 25: DDoS amplification attacks with game servers

AMPLIFICATION DDOS WITH GAME SERVERS

QUESTIONS?

Alejandro Nolla Blanco

twitter.com/z0mbiehunt3r

blog.alejandronolla.com

[email protected]