Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2021-09-28 00:00:00Z and 2021-09-29 00:00:00Z
Avatar
traceroute -m40 hand.bb0.nl
00:06
(needs ipv6)
Avatar
Avatar
heinrich5991
interesting, didn't know the article that you posted @Learath2 http://ithare.com/udp-for-games-security-encryption-and-ddos-protection/
If the entire point of the article is to "encrypt" udp traffic, it won't make a difference. (edited)
00:13
Encrypting initial handshake packet as example, will make it way harder to seperate legitimate from malicious traffic.
Avatar
Yes. At the filtering level encrypting will make it that much harder to tell a legitimate packet apart. But with all things there would still need to be a handshake. As long as there is a handshake that can be emulated at an upstream level it will make the game more easy to protect. CF for instance emulates a handshake for TLS for customers that don't want CF to see their traffic.
00:21
But encrypting UDP packets at the game level may become messy. Since often encryption changes based on previous bytes sent and also a video game does not care to resend a stale game world state so the encryption could fail.
Avatar
Avatar
Kigen
Yes. At the filtering level encrypting will make it that much harder to tell a legitimate packet apart. But with all things there would still need to be a handshake. As long as there is a handshake that can be emulated at an upstream level it will make the game more easy to protect. CF for instance emulates a handshake for TLS for customers that don't want CF to see their traffic.
The game is pretty damn easy to protect to begin with.
00:23
Everything you need is there, an initial UDP handshake challenge is sufficient.
00:23
(We've already made a filter, took about 2 minutes of looking at traffic in wireshark)
Avatar
Yes. I was just pointing out problems with encrypting. But also that it probably won't affect filtering that much.
Avatar
It could affect filtering, depending on how well the encryption is handled.
00:25
If there's still an easily recognizable handshake packet, no problem.
00:25
But again, "encrypting" packets will not solve ddos attacks.
00:25
It will stop users from messing with the game on network-level, but it won't really affect ddos attacks at all.
Avatar
Encryption of this type does require a handshake process unless they have a pre-shared key. And yeah, encrypting has no effect on DDoS protection. Encrypting should be for the purposes of privacy or tamper protection to sensitive communications.
Avatar
I agree, what I am trying to say is that if you introduced game-specific ddos filtering, and the initial handshake packet is being messed with by the encryption, filtering will just become way harder.
00:27
(Talking about the initial challenge packet (10\00\00\01\TKEN)) (edited)
00:28
Regardless, as you already said, encrypting will not "protect" you from ddos attacks.
Avatar
I haven't had a chance to look at packet captures of this game's communication yet. But I am familiar with the concepts from building such filtering for the Source engine.
Avatar
Well, with source engine, you'd still have to cache A2S_INFO packets
00:29
with this server application, you do not have to
Avatar
There are a lot more attack vectors.
Avatar
Not if your filtering works properly.
00:29
I'm not talking about just caching info packets, I'm trying to point out that this is not necessary with this game/mod (edited)
00:29
therefore it is even easier to craft a filter than for e.g. SRCDS, which is already fairly trivial (edited)
Avatar
A2S_CHALLENGE, the connect 'k' packet. etc
Avatar
A2S_CHALLENGE is handled pretty easily
Avatar
The servers I worked on protecting got hit with everything under the sun.
Avatar
Our SRCDS filter is ~100 lines of C, and I am fairly confident that it'd work flawlessly
Avatar
I basically just fully emulated every unauthenticated communication.
00:31
And built in a ban and rate limit system.
00:32
Due to a dude that kept using so many VPNs to connect and attack the server that way.
Avatar
Avatar
Kigen
I basically just fully emulated every unauthenticated communication.
Do not allow any packets except for A2S_INFO, which you'll respond to from a cache instead. Listen for SRCDS challenge header, reply with a crafted packet, and validate that. Now, you start accepting other packets from that source ip & source port. Otherwise, drop. Bam, there you go. Only thing limiting you now is capacity.
Avatar
I built that quite a few years ago.
00:33
And the capacity problem is something I'm trying to address now. But the issue is waiting for ARIN to give me a IPv4 /22.
Avatar
Also, for the love of god, do not go with Cogent.
Avatar
I've seen someone mention Cogent in here, horrible choice.
Avatar
My main issues have been with HE.net lately. They keep screwing up their BGP.
Avatar
Avatar
Kigen
My main issues have been with HE.net lately. They keep screwing up their BGP.
Should talk to Cogent Customer Support
00:35
"Sorry sir, BGP is not something we offer"
00:35
Cheap? Sure. Quality? If you stay within Cogent yes. If Cogent starts handing off packets to GTT / whatever other isp, you will start seeing packet loss. a lot.
Avatar
Well, I've already been approved for an ASN, on a wait list for IPv4, and getting some IPv6 for giggles).
Avatar
IPv4 should be handed out in a few days, if you're with ARIN (edited)
Avatar
Yes, Oct 1.
Avatar
if you're lucky, that is.
Avatar
If I'm lucky. So far they've been able to fully fulfill their quarterly wait lists.
Avatar
Avatar
Kigen
Yes, Oct 1.
If you're lucky. Last time we've received an allocation was 10 days after allocations were given out
Avatar
So I am quite hopeful.
Avatar
and that was for a single /24
Avatar
They do say it takes them a week after Oct 1 to fully distribute IPs.
00:37
Not including weekends.
00:37
But I became aware of the need.
Avatar
If I can tell you one thing, then it is to always request a /22
00:38
We've requested /24's in the past, horrible choice
Avatar
Since a gaming community I'm with rents a /24 for a stupid price so they can host 5 servers with an anycast network.
00:38
Oh I definitely will stick with /22. I got approved for it.
00:38
And once I can justify another block I'll definitely do it as a /22 if possible.
Avatar
IPv4 is also a ridiculous investment. a month ago, a /22 was worth $40k, now it's worth $60k (edited)
Avatar
ARIN sets a limit on transfers for 5 years to prevent people from using their wait list to resell the blocks.
00:40
And that is something I did think of in case things don't work out with my plan.
Avatar
I'm aware
00:40
I'm just pointing it out
Avatar
But I just want to solve some waste I've seen with a gaming community I'm apart of and another that we worked with. Renting entire /24 from prager-it for stupid prices to host 5 to 20 servers.
Avatar
Which Com is it?
00:44
I know a few who are renting from Prager-IT
00:44
(Panda & GFL as example)
Avatar
GFL and HG.
Avatar
gfl it is
00:44
ok
Avatar
I'm apart of HG.
Avatar
Ah, I see
Avatar
And we had a partnership with GFL for a Jailbreak server while Roy was there.
Avatar
Yup. "while Roy was there"
00:45
Learned a little bit about their network but I never directly interacted with Roy.
00:45
Or had access.
Avatar
If you have questions, dm me
00:46
I worked with Roy for a while
00:46
GFL stopped doing anycast btw.
Avatar
Yeah, I know since I think Jailbreak is becoming an HG only server as well now.
00:47
HG rebuilt the anycast network with Vultr.
00:47
Though I remember Roy used another provider as well.
00:47
Vultr is a horrible choice, but it's hard to find good providers that do BGP in many locations (edited)
Avatar
Yes, I need a provider that allows me to announce and control a BGP.
00:48
If you know of any others I'd appreciate it.
00:50
What's even harder seems to be ones that support flowspec.
Avatar
We provide BGP free of charge (edited)
Avatar
We? Gameserverkings?
00:51
I'll hit you up in DMs.
Avatar
pamonha1487777 2021-09-28 02:51:46Z
hi, i wanted to know who are the brazilian admins
03:02
I'm assuming you meant moderators, there are no admins from brazil.
Avatar
I've hit up Dean in DM about the blog post, if there's somebody else I should speak with about helping - my DM's should be open.
Avatar
ddnet on hackernews
05:38
and i missed it rip
05:45
Another server hoster called noby
05:45
hahaha
05:45
i laughed at this xd
05:49
how to identify learath on hn, he says the word "cute" rly often
05:56
monkalaugh
05:57
oh
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
nice
Avatar
valve reached out to deen?
05:57
poggers
Avatar
wow, great news
Avatar
but relying on propietary is not the best
06:01
as the user leath said in hn
06:01
wonder who he is admiralMC
Avatar
[quakenet] eeeee BOT 2021-09-28 06:12:54Z
neat, ddnet is getting serious
06:13
whos the mod now, #teeworlds
Avatar
We did get a couple ideas and a couple offers for help, so overall the post did reach it’s intended goal 😄
Avatar
@Fän I'm aware that at best encryption does nothing wrt. DoSability of the protocol, or makes it worse
Avatar
Avatar
heinrich5991
@Fän I'm aware that at best encryption does nothing wrt. DoSability of the protocol, or makes it worse
In addition decrypting the packages needs more cpu time
Avatar
the idea of encryption would be to transport-secure chat messages, passwords and make strong authentication viable
12:39
@Avolicious we've tested it on our weakest servers, they could handle decryption of player traffic just fine. protection of the initial handshake is still a problem though, the article gives out some ideas about that though
Avatar
The initial handshake being makes it so much easier to filter efficiently at the lowest layer and even offload to other devices (e.g. a hardware firewall)
13:05
s/being/being plain/
Avatar
Or offload the initial handshake as HTTP request to a custom auth service?
Avatar
Well, we can use the access to http://info2.ddnet.tw/info?name=deen as auth
13:29
Once you successfully fetched that file your ip can be whitelisted
Avatar
How would you hand over such authentication to non-ddnet servers?
13:30
i.e. blocker?
13:31
And its not working with legacy clients, no?
Avatar
Well that is where things get hard, we could share the list with trusted servers, but it's very risky
Avatar
Avatar
Avolicious
And its not working with legacy clients, no?
DDNet client has been contacting info.ddnet for a long time now, not sure if clients older than that even work still
Avatar
But only DDNet clients
Avatar
I think we had a statistic somewhere, but the people using the vanilla fallback are minuscule iirc
Avatar
Oh okay, seems like a fair tradeoff (edited)
Avatar
we can always ratelimit the rare connections more aggressively, people don't seem to DoS unpopular stuff
Avatar
Avatar
Learath2
Well that is where things get hard, we could share the list with trusted servers, but it's very risky
GDPR hates you
Avatar
Eh, one could argue we have a "legtimate interest" in storing the ips, gdpr specifically mentions "network and information security" purposes
13:36
sharing it with other hosters I'm much more unsure about
Avatar
If you use them inside DDNet services, it is fine in general, but sharing it with 3rd party, you have to ask the users ( esp. in europe ) if they agree (edited)
Avatar
we could maybe expose the list through an api such as dnsbl, but it'd be waay too slow, completely unacceptable for a low level filter
13:39
besides exposing the data that way is also probably against gdpr
Avatar
We could provide hashes, but might not be good enough
13:40
And yeah, it's of course sad if we only have a solution for the official servers, would be better to have something that works for everyone
Avatar
mh, too easy to compute a table of ip hashes
Avatar
Avatar
Learath2
mh, too easy to compute a table of ip hashes
IPv6 xddd
Avatar
Maybe a small http server implemented in the gameserver that is only capable enough to handle a GET request
Avatar
Avatar
Learath2
Maybe a small http server implemented in the gameserver that is only capable enough to handle a GET request
Would provide an external http server
Avatar
Oh, how about a new serverinfo field broadcasting the "auth-server" of sorts which the client will do a GET to before trying to join
Avatar
yeah, that would work
Avatar
For legacy clients idk though, I guess under attack we can ignore legacy clients
Avatar
Or the auth server just specifies a valid token to the client, then client can use that to log in. Can use some crypto so the auth server signs it and the game server trusts the auth server's cert
13:43
Yeah, at some point we have to throttle them
Avatar
Avatar
deen
Or the auth server just specifies a valid token to the client, then client can use that to log in. Can use some crypto so the auth server signs it and the game server trusts the auth server's cert
Like minecraft does it?
Avatar
The idea with the simple GET request was to allow invalid traffic to be very cheaply dropped
13:44
If we don't involve any crypto we can easily drop the traffic at both nftables and XDP (if nftables turn out not performant enough)
Avatar
Avatar
Learath2
mh, too easy to compute a table of ip hashes
add some sort of salt? 🧂
Avatar
Avatar
Learath2
The idea with the simple GET request was to allow invalid traffic to be very cheaply dropped
Or maybe add custom auth-servers to the initial http request to the master server?
13:44
So the server can register an auth-server with its request to the master server
Avatar
Avatar
Ryozuki
add some sort of salt? 🧂
I mean the salt would have to be derived from the ip for the checker to be able to know it, it's not any harder to hash ip + salt(ip) when generating the table
Avatar
i mean
13:45
maybe make the salt known but rotate it
13:45
every 1 min
13:45
or smth
13:45
xd
Avatar
Hm, that could work actually
Avatar
idk how much time it takes to calc the hash of all ipv4 addresses
Avatar
We could also chose an intentionally slow hash like bcrypt
Avatar
you can always use a more expensive hash
13:46
ye
Avatar
Avatar
Avolicious
So the server can register an auth-server with its request to the master server
This will be possible already when the servers start registering with http
13:48
You will be able to broadcast whatever fields you want about your server
Avatar
Yeah, sounds good
Avatar
Avatar
Learath2
Oh, how about a new serverinfo field broadcasting the "auth-server" of sorts which the client will do a GET to before trying to join
👍
Avatar
i always thought about the video recorder limitation of it not being able to record a 60fps video faster than what it would take in real time
16:03
i know the audio is a issue but that just is weird
16:03
shouldnt there be a way to process the data faster without real time affecting it
16:03
why is it tied to real time anyway
16:04
you shouldnt even need to render to screen to create the video
Avatar
I think the audio issue was the only issue remaining
19:29
stunning
19:29
but not that perfomant imho
troll 1
Avatar
Avatar
Ryozuki
but not that perfomant imho
do u have angle enabled or what?
Avatar
gotta google that
Avatar
its opengl wrapped, instead of just using "real" opengl
19:40
whathever default firefox dev edition on arch has
Avatar
with chrome it runs really smooth for me, with firefox not really xd
Avatar
ok set webgl.disable-angle to true and still sucks, but my firefox is also pretty outdated xd
Avatar
Avatar
deen
And yeah, it's of course sad if we only have a solution for the official servers, would be better to have something that works for everyone
Happy to provide that btw 🙂
heartw 1
Avatar
Avatar
Fän
Happy to provide that btw 🙂
Huge thanks! USA2 sponsored by secured.gg is running already, GER1 coming up in a few minutes 🙂
Avatar
excited to see how these will perform 🙂
Exported 193 message(s)