9 ms·
With Ironsides, that makes at least two of you using safest languages you can find to try to improve DNS. Good goal and tool to pick. :) http://ironsides.marti
by nickpsecurity 10y ago
With Ironsides, that makes at least two of you using safest languages you can find to try to improve DNS. Good goal and tool to pick. :)
http://ironsides.martincarlisle.com/ http://ironsides.martincarlisle.com/
"Take a look at the full list sometime, I think roughly 50% of those could have been avoided by using (safe) Rust."
This is true for most vulnerabilities I see in C-related apps. We also know there's techniques to prevent that with acceptable performance. So, outside hobbyist or non-critical stuff, I tell people to use a different language to get the baseline of quality/security up. DNS is kind of example that makes it more true.
Now, I haven't learned Rust yet, so I won't be able to fully appreciate the article or spot coding ideas until I do. What I did spot was that you slogged through all the RFC's implementing and testing what you thought should be in the DNS system. Aside from a DNS server/client, I think one of most valuable things you could do in this project is create a single specification of various things in DNS that cites parts of RFC's or advice from real-world implementations to justify each part. Kind of a walkthrough for other people creating DNS's that gives them high-level view and/or drill-down into details of something.
"While in the pit of dispair" "Then I climbed saviors peak"
Haha. Good job getting through all the work as most people quit that I can tell.
"It’s currently not used in production (as far as I know). I’ve put a lot of work into validating correctness of what is going on"
It's good you have gone through the specs and have plenty of features. You did hit on a risk area that might need to be in this section: difference between the specs and real-world implementations that you have to work with. The differences could cause your server to fail. If those exist in DNS, too, there might already be write-ups on common ones out there. Biggest way to find them, though, is running combo's of popular clients and servers against each other in testing. So, that's a possible consideration for the future.
- bluejekyll 10y ago> With Ironsides, that makes at least two of you using safest languages you can find to try to improve DNS I looked at that a while ago, I should take another. Thanks for pointing that out. > I think one of most valuable things you could do in this project is create a single specification of various things in DNS that cites parts of RFC's or advice from real-world implementations to justify each part. Kind of a walkthrough for other people creating DNS's that gives them high-level view and/or drill-down into details of something. I was thinking of doing something like this, but you have an even better idea here. Actual references back to the code. I might start trying to do that. (Though that's probably as much work, if not more, as writing the software ;) > Biggest way to find them, though, is running combo's of popular clients and servers against each other in testing. So, that's a possible consideration for the future. Yeah, I've wanted to stand up some automated tests with the most popular systems out there, but there's a time issue here. If others are inspired and want to join the project, I'd love help in this area!
- voltagex_ 10y agoHappy to help with that (although I've uttered that phrase way too much this month). I've got a toy DNS server and I also hit the problem of specs not matching reality (whoda-thunkit). Wireshark's DNS dissector is exceptionally useful here. I agree that it's a project in and of itself.
- e12e 10y ago> I was thinking of doing something like this, but you have an even better idea here. Actual references back to the code. I might start trying to do that. Literate programming (in the Knuth sense): yay! > (Though that's probably as much work, if not more, as writing the software ;) Yep. Hence one of the few big projects I'm aware of that use lp (apart from Knuth) is: Axiom: http://axiom.axiom-developer.org/axiom-website/books.html http://axiom.axiom-developer.org/axiom-website/books.html Ed: from the post: > (And writing this post helped uncover a bug, so even if no one reads this, it was worth it). Literate programming: yay! Or perhaps narrative-driven design: ndd, to go with tdd and bdd...
- spc476 10y agoI marked the RFC where each RR is defined (https://github.com/spc476/SPCDNS/blob/master/src/dns.h https://github.com/spc476/SPCDNS/blob/master/src/dns.h) in my DNS decoding library (in C: https://github.com/spc476/SPCDNS https://github.com/spc476/SPCDNS). I've also referenced RFCs (in comments) in the main code (https://github.com/spc476/SPCDNS/blob/master/src/codec.c https://github.com/spc476/SPCDNS/blob/master/src/codec.c) so someone going through the code knows where to look. And just to note: I separated the network portion from the encoder/decoder functions. It's easier to integrate that way.
- deleted 10y ago[deleted]