News for hackers. Stuff that matters.
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by rahuldottech on Wednesday January 08, 2020 @11:04AM (#21992573)
But... What about legit unicode domains? I own a couple that I use for personal projects or file sharing.
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by kylek on Wednesday January 08, 2020 @12:53PM (#21993893)
I've never seen a legit unicode domain personally, but, is this not compatible with whitelisting specific domains? (in pihole, anyways...)
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by LadyCailin on Wednesday January 08, 2020 @02:11PM (#21994680)
I have, but I live in Norway, where we have æøå in the standard alphabet. I suspect it’s more common still in Asian countries, because at least in Norwegian, there are standard ascii replacements for all the extra letters, å = aa, ø = oe, æ = ae
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by Nullabillity on Wednesday January 08, 2020 @02:19PM (#21994744)
Here in Sweden I have never encountered a single legit IDN domain.
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by Symbiote on Thursday January 09, 2020 @12:31PM (#22003340)
I know http://www.xn--sknetrafiken-ucb.se, but like many it just redirects to an ASCII version. (Does it look weird seeing "Skane" when you know it ought to be "Skaane"?)

Similarly for a power company, http://xn--rsted-uua.dk, just a redirect, but they do use it on adverts and my electricity bill.

Some that don't redirect: http://xn--mgk--jra.dk/ https://www.xn---strm-uuae.dk/ https://xn--magnusbrth-85a.se/

(HN has converted the displayed URLs to Punycode, presumably as a quick security measure without reference to the reasonable characters for each TLD.)

Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by LadyCailin on Wednesday January 08, 2020 @02:47PM (#21995031)
rødt.no comes to mind, but I know I’ve seen others.
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by lokedhs on Wednesday January 08, 2020 @10:25PM (#21998286)
www.hörby.se

You probably don't want to remove the dots on that one.

Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by dual_dingo on Wednesday January 08, 2020 @02:11PM (#21994676)
In countries that use diacritical characters, umlauts etc., unicode domains are somewhat common (but are often just an alias for a non-unicode primary domain).
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by deith on Wednesday January 08, 2020 @02:10PM (#21994664)
I've yet to see a legit unicode domain, and my country doesn't speak English as a first language.

To tell you the truth IDN domains feel like a failure, a gimmick. Their biggest market probably was meant to be countries that don't use the Latin alphabet, and they've failed spectacularly.

If you use Firefox, for your own security, set network.IDN_show_punycode to true.

Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by Symbiote on Thursday January 09, 2020 @12:37PM (#22003416)
There are a few in Roman-lettered Europe, but they're not exactly common. Many are redirects to an ASCII domain.

They seem to be used in Russia a little more, especially with the .рф TLD[1], although many are still just redirects.

I have no idea what the text means, but these sites look reasonable: https://www.xn--80aicstx0byb.xn--p1ai/ http://xn--j1abth1c.xn--p1ai/ https://xn--d1ai6ai.xn--p1ai/

[1] https://en.wikipedia.org/wiki/.%D1%80%D1%84

(HN seems to have translated these to Punycode, presumably a quick security measure without respect for non-ASCII languages.)

Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by DyslexicAtheist on Thursday January 09, 2020 @01:57PM (#22004258)
it used to be possible to block this with a patched dnsmasq that allows setting a regex, but the fork is not maintained and merging the patches to upstream is also not much fun.

so I hacked something together that uses the linux kernel NFQUEUE: https://github.com/DyslexicAtheist/nfq

this way I have guarantee that these domains will never be resolved (which is what I want :))

Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by TimTheTinker on Wednesday January 08, 2020 @02:44PM (#21994989)
I predict that blacklisting unicode domains will become a "best practice" for security, but that eventually their use will become normal and accepted when the security issues have been worked out (perhaps by something as simple as using a different background color for unicode characters in the browser's location bar).
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by DyslexicAtheist on Wednesday January 08, 2020 @12:01PM (#21993263)
indeed those would get thrown under the bus. it's a trade-off and depends on how paranoid you want to be.
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by archi42 on Wednesday January 08, 2020 @12:31PM (#21993649)
Two ideas to lessen the trade-off:

1. Use a browser extension that throws a warning on all unicode domains (maybe even with unicode highlighting). Drawback: Needs to be done per-device.

2. Let your pihole MitM all https traffic with a certificate you do NOT trust (maybe create one per domain, so you can add it to the trusted list); if the connection is over http, upgrade it to https (if the server doesn't speak https, proxy it). Drawback: It's much more complicated, and if your bank happens to be called e.g. "Bank of Zürich" you still need to take a look at the IDN to determine if you're on the right website (or add an exception).

Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by chupasaurus on Wednesday January 08, 2020 @01:21PM (#21994198)
Modification of 2nd idea. Run two dnsmasq servers: one which would do resolving and listening on loopback interface, and other listening 53/udp with no-resolv, whitelist of IDNs and filtering rules to pass normal and block other punycode DNs.
Re:Add '127.0.0.1 xn–9q8h' to /etc/hosts gives you "localghost" by DyslexicAtheist on Thursday January 09, 2020 @01:38PM (#22004049)
I came up with another "solution" using the linux kernel NFQUEUE: https://news.ycombinator.com/item?id=22003933