Show HN: Use DNS TXT to share information
143 points| danradunchev | 2 years ago | reply
You can base64 encode an image, split to TXT records and send over Internet. Useful in certain circumstances. Like when one of the communicating parties is under severe censorship.
[+] [-] gunapologist99|2 years ago|reply
But should you do crazy things like this? Absolutely not!
DNS is notoriously prone to MITM, injection, cache poisoning, DoS, etc. DANE and DNSSEC are horrible bodges that don't actually do anything useful or in a secure way.
Even though it's the foundation of almost everything we try to do securely, including the basis for TLS DV certificate (totally fungible, regardless of a hundred or so certificate authorities, including many located in authoritarian regimes!) validation:
DNS is absolutely and irredeemably broken forever, from a security perspective, and can never be fixed. As tempting (and easy) as it is to hack on it or treat it as an ultra-fast and extensible UDP remotely-accessible lookup database, just don't. (It just needs to die in a fire, probably along with SMTP.)
Unfortunately, even if someone came up with some system that could credibly replace it, that system would inevitably have a LOT of privacy and censorship trade-offs, so DNS is what we're stuck with.
Just stay very aware of the risks of encoding anything security-related inside DNS and try to minimize your reliance on it as best you can.
[+] [-] puppetmaster|2 years ago|reply
As a side note, anything security related exists in the reality of uncertainty. It is expected that sharing properly secured secrets is reasonably safe, but day after day we discover "we didn't know". Sometimes simplicity for a particular application is worth certain amount of risk.
Sometimes, you need to take the server out of its box, out of the bunker, and plug it to both the power distribution network, and of course... a LAN...
For quick reference: - https://en.m.wikipedia.org/wiki/Hesiod_(name_service) - https://jpmens.net/2012/06/28/hesiod-a-lightweight-directory...
[+] [-] 8organicbits|2 years ago|reply
Adoption is extremely poor, usability is horrible, and the approach used is quite dated, but I'm not sure DANE and DNSSEC are insecure. Did you have a reference on the latter?
[+] [-] blechinger|2 years ago|reply
[+] [-] fanf2|2 years ago|reply
The order of records associated with a name is undefined, so if you spread your data across multiple records, you need to add ordering metadata.
The total size of the records must be less than 64 KiB - they have to fit within a DNS message, which has a limited size.
You can put all your 64K ish data into one TXT record, but it has to be split into strings of up to 255 bytes.
You can invent your own record type to contain raw binary data without the sequence-of-strings requirement.
You can use multiple names (eg, numbers) to get past the size limit and to be explicit about the correct order.
[+] [-] hashstring|2 years ago|reply
[1] https://github.com/yarrick/iodine
[+] [-] dormento|2 years ago|reply
[+] [-] fanf2|2 years ago|reply
https://man.freebsd.org/cgi/man.cgi?query=fmt
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/f...
[+] [-] runjake|2 years ago|reply
I still use them at work to provide hints and more information but the current fleet of IT workers don’t really grok anything beyond A and PTR.
You’re just using DNS as intended. :-P
[+] [-] whartung|2 years ago|reply
Part of this, though is also who is "in control" of the server.
Most of the times, DNS is on the other side of the bastion, managed by Network Ops, and out of reach of Joe Developer. Perhaps a reasonable situation, fat finger DNS and Bad Things can happen. However, Joe Developer has carte blanche access to things like HTTP servers and with that they were allowed to go hog wild.
So, the innovation in the HTTP space exploded as it was a safer place to dabble to the point that every solution was viewed through the lens of HTTP.
In the end, devs don't know DNS because they don't need to know DNS, and even if they did, the Powers in NetOps weren't going to let them have their grubby fingers on it anyway.
[+] [-] Eduard|2 years ago|reply
[+] [-] Hnrobert42|2 years ago|reply
https://github.com/yarrick/iodine
[+] [-] c7DJTLrn|2 years ago|reply
[+] [-] madmax108|2 years ago|reply
---
[1] well, it's not really hackery if you're being pedantic, since it's doing what the spec allows it to do
[2] DNS Toys (946 points): https://news.ycombinator.com/item?id=31704789
[+] [-] EnglishLFC|2 years ago|reply
$ dig +short -t txt current.cvd.clamav.net "0.103.8:62:26972:1689593340:1:90:49192:334"
For anyone interested, Freshclam interprets this as:
Latest ClamAV version: 0.103.8 Latest Main DB version: 62 Latest Daily DB version: 26972 UNIX Timestamp 1689593340
...and then some other version numbers and things I don't remember, one is probably a bytecode DB version 334, f-level 90 maybe.
Anyway, nothing new, works as designed. You can do all kinds of neat tricks with it. DNS has a lot going on that most people don't (ab)use.
[+] [-] hannob|2 years ago|reply
So a man in the middle could prevent updates from happening, and freshclam wouldn't even throw a warning?
[+] [-] RajT88|2 years ago|reply
I've been noodling on how to build a simple proxy off DNS to test on my next flight.
[+] [-] smashed|2 years ago|reply
https://github.com/yarrick/iodine
[+] [-] andrelaszlo|2 years ago|reply
Otherwise there's https://github.com/yarrick/iodine
Edit: seems like others have recommended it already. I got it working in a hotel room once after giving up on the utterly broken ToS acceptance page for the WiFi.
[+] [-] xyx0826|2 years ago|reply
https://www.softether.org/1-features/1._Ultimate_Powerful_VP...!)
[+] [-] philipwhiuk|2 years ago|reply
(From the opener to https://www.wired.com/2008/11/ff-kaminsky/ )
[+] [-] tekknolagi|2 years ago|reply
[+] [-] ahachete|2 years ago|reply
https://dyna53.io/
[+] [-] laserlight|2 years ago|reply
[0] Bizarre and Unusual Uses of DNS. https://fosdem.org/2023/schedule/event/dns_bizarre_and_unusu...
[1] https://news.ycombinator.com/item?id=34939809
[+] [-] xabi|2 years ago|reply
[+] [-] knagy|2 years ago|reply
I couldn't find the talk, but I found this nice article: https://unit42.paloaltonetworks.com/dns-tunneling-how-dns-ca...
[+] [-] badrabbit|2 years ago|reply
In my experience, bypassing censorship does not mean doing unusual things like this but things like browser extenstions that stego your message in legitimate requests .
[+] [-] ngc6677|2 years ago|reply
[+] [-] 1vuio0pswjnm7|2 years ago|reply
What if the censor hijacks DNS queries. This is also done outside the realm of censorship, e.g., hotel wifi networks.
[+] [-] candiddevmike|2 years ago|reply
[+] [-] PinguTS|2 years ago|reply
[+] [-] tux2bsd|2 years ago|reply
[deleted]
[+] [-] breakingcups|2 years ago|reply
[+] [-] 8organicbits|2 years ago|reply
[+] [-] danradunchev|2 years ago|reply
[+] [-] nigamanth|2 years ago|reply
[+] [-] exabrial|2 years ago|reply
[+] [-] threesevenths|2 years ago|reply
[+] [-] CrLf|2 years ago|reply
https://www.cloudflare.com/learning/dns/dns-records/dns-srv-...
[+] [-] sgjohnson|2 years ago|reply
[+] [-] mobilio|2 years ago|reply
https://github.com/yarrick/iodine
Or IP-over-DNS