Domain hacks with unusual Unicode characters (2018)

(shkspr.mobi)

104 points | by n_plus_1_acc 2 days ago ago

71 comments

  • n_plus_1_acc 2 days ago ago

    Looks like HN broke the URL after submitting. Let's try again:

        https://ₛᵖ.ⓜ/
    
    Here is the backup link:

    https://shkspr.mobi/blog/2018/11/domain-hacks-with-unusual-u...

    • zenexer 2 days ago ago

      That shows up as ₛᵖ.ⓜ, so a bunch of characters are missing.

      HN seems to encode it as punycode when it shouldn’t; it skipped normalization.

      • pwdisswordfishq 2 days ago ago

        Python 3 encodes the domain to xn--hkr-zdyy2ssn00g.mobi.

        Not that that works.

    • 2 days ago ago
      [deleted]
    • userbinator 2 days ago ago

      Consider that a good thing; it seems HN is immune to Unicode confusion attacks.

  • huhtenberg 2 days ago ago

    Tangentially related - 20+ years ago I managed to register a π domain under one of the primary TLDs.

    As in, the registration form was accepted and the fee was charged.

    Then, few days after they emailed to say that "due to technical difficulties" the registration can be registered and they have no choice but to unregister it.

    I was so close, damn amateurs.

    • waltbosz 2 days ago ago

      My brother had a friend who tried to register fuck.com in the early days of the Internet, around 1994, and the registrar was confused and wanted to know why he wanted to register it. This was when the Internet was mostly universities and a .com cost $100 to register.

      • qingcharles 2 days ago ago

        1994 they were definitely still free[1]. I had so many good ones, but when they switched to the paid model[0] I was a broke college student and let them all go.

        [0] IIRC, it was Unilever who caused it -- they mailed in something like 19,000 domain registration applications, one for each of their current trademarks.

        [1] OK, I looked it up, September 1995 was when the charging started.

        • schoen 2 days ago ago

          Unilever later bought the domain substance.com from my friend. Remarkably, they apparently later let it lapse and someone else registered it. I'd assumed they were going to have a database of chemical substances that were used as ingredients, or something.

      • emmelaich 2 days ago ago

        Was that friend Justin Hall of Wired?

        There was a story about Jon Postel (pre-ICANN) and fuck.com, this might be it:

        https://www.links.net/webpub/fuck.com.html

        • waltbosz 2 days ago ago

          Maybe. That sounds like the story he told me. But now I'm wondering if I'm misremembering the friend part. Maybe he read the story when he was posted in 1997 and told me about it.

          • 2 days ago ago
            [deleted]
      • jagged-chisel 2 days ago ago

        What was his response? Did they refuse to allow it?

    • Tepix 2 days ago ago

      I managed to register a one letter domain below a CC-tld, despite that country having a rule against it. Their signup form had two stages and the check was only on the first page... so all it took was changing a hidden form field.

      I had it for a while until they started charging a lot for it (it was Turkmenistan).

      • qingcharles 2 days ago ago

        I managed to grab a lot of really good[0] emoji domains by bouncing between registrars until you find one that has some poor (good?) coding that lets them slip through.

        Then you get stuck a year later when they've upgraded their system and now nothing you do will let you renew it or transfer it...!

        [0] "good" is subjective in this context

        • mapontosevenths 2 days ago ago

          I did the same. Namecheap was the worst. They'd let me register one then refund me a few days to a week later when someone caught it. That was way worse than just saying no.

  • Aozora7 2 days ago ago

    My favorite unicode character is zero width space. One of its funniest properties is that it's not a whitespace.

    Also, some programming languages treat it as a valid identifier.

    • TacticalCoder 2 days ago ago

      > My favorite unicode character is zero width space. One of its funniest properties is that it's not a whitespace.

      My editor is configured to never show any character (except the one and proper newline) at less than the full-width of a regular character (in the monospace font I'm using ofc).

      And if it's not a visible ASCII char, not only it's always shown at least at full-width, it's also shown as bold magenta on a black background. As the non visibe zero-width is empty, it shows as full-width on a black background.

      Sticks out like a sore thumb.

      • MadnessASAP 2 days ago ago

        Would you mind sharing your editor and magic recipe?

    • eviks 2 days ago ago

      That's new

      > For example, U+200B ZERO WIDTH SPACE was originally classified as a space character (General_Category=Zs), but it was reclassified as a Format character (General_Category=Cf) to clearly distinguish it from space characters in its function as a format control for line breaking.

    • nickcw 2 days ago ago

      Ha! Yes I discovered that this is true in C as part of my IOCCC entry:

      https://github.com/ioccc-src/winner/blob/master/2025/ncw3/pr...

    • gucci-on-fleek 2 days ago ago

      Braille Pattern Blank "⠀" (U+2800) is another one of my favourites, since it's also not considered whitespace, but it looks like it. It can actually be fairly helpful for forms that won't let you leave any field blank, since it bypasses most whitespace checks.

      • eviks 2 days ago ago

        Indeed, the ossification of this old absurdity can be helpful, also for visual alignment within names.

        This prompted me to finally dig a bit and find the official reference why they didn't fix the bug despite a plea from some Braille council

        https://www.unicode.org/L2/L2025/25183-utc184-properties-rec...

        • networked a day ago ago

          > It was found that many publications that use Unicode Braille characters use U+2800 with a marking glyph. A marking space is not without precedent, consider U+1680 OGHAM SPACE MARK. However, in some cases, U+2800 is clearly used as a symbol, to indicate the presence of a space when describing a Braille sequence corresponding to a symbol or punctuation, similar to the use of ␣ (U+2423 OPEN BOX) to indicate the presence of a space. Especially in cases where it is used in a trailing position, as in the [UNE13] example, it is clear that it would be inappropriate for this symbol to disappear.

          > Considering this usage as a marking symbol, together with concerns about changing the relatively stable—and often hardcoded—White_Space property (a property of only 25 code points, last changed in Unicode 6.3, when U+180E MONGOLIAN VOWEL SEPARATOR ceased to be a space), the PAG preferred a more targeted change.

          This doesn't seem that unreasonable.

          • eviks 14 hours ago ago

            but still unreasonable. In the presence of issues for each of the two options, you pick the correct one unless you have rather strong reasons, which they don't:

            > U+2800 is clearly used as a symbol, to indicate the presence of a space when describing a Braille sequence corresponding to a symbol or punctuation, similar to the use of ␣

            Why is that? Have you perhaps forgotten to add "␣" equivalent for Braille? So maybe do that instead so people can us a mark to mark something?

            > Especially in cases where it is used in a trailing position, as in the [UNE13] example, it is clear that it would be inappropriate for this symbol to disappear

            Nothing disappears in the cited example, the line is very short , how is it possible to reject a fix when you can't even find an example of that fix breaking someone?

            > last changed in

            and this approach is why we can't have nice things and generations of computer users continue to suffer due to some dumb oversight decades ago. And it's not like we get a payoff of great stability, not, that standard is uber complicated and changes all the time

    • jonathanlydall a day ago ago

      Over a decade ago this caused a quite bit of head scratching for me as to why in our C# application a certificate's thumbprint was not matching with that in our App.config file, even though the characters were seemingly identical.

      Turns out Windows Certificate Manager had an "easter egg" that if you copied a certificate's thumbprint to your clipboard it included a zero width space with it.

      Very, very subtle and actually very hard to spot without doing a debug or something.

      There is a Stack Overflow of exactly this issue: https://stackoverflow.com/questions/11115511/how-to-find-cer...

      At some point (Windows 10?) Microsoft "fixed" the Certificate Manager to stop doing this.

    • Rendello 2 days ago ago

      I use it for sites like Facebook where I want to type :) without it changing to the terrible `U+1F642 SLIGHTLY SMILING FACE` [1]. I wouldn't really mind if it were the `U+1F60A SMILING FACE WITH SMILING EYES` [2], but the first one is so laughably terrible, as if I'd really want to send an emoji to communicate a disingenuous, pained smile as a default. Some platforms let you backslash-escape sequences so they don't get turned to emoji, like \:), but for Facebook and the like, putting a ZWS in between the letters stops the conversion.

      Though if your emoji is at the end of a line, it'll potentially break your emoji between the two lines. since That's what a ZWS is for, after all.

      1. https://util.unicode.org/UnicodeJsps/character.jsp?a=%F0%9F%...

      2. https://util.unicode.org/UnicodeJsps/character.jsp?a=1F60A&B...

      • Timwi 2 days ago ago

        Try using the zero-width non-joiner instead (U+200C).

      • Aozora7 2 days ago ago

        My favorite use for it is putting it into mandatory surname fields, which sometimes works.

      • Y_Y 2 days ago ago

        I look like U+1F642 when I smile genuinely

    • Cpoll 2 days ago ago

      [dead]

  • TacticalCoder 2 days ago ago

    Which of course Bruce Schneier predicted in 2000:

    https://www.schneier.com/crypto-gram/archives/2000/0715.html...

    "Unicode is just too complex to eve be secure"

    As to me I'm running my own DNS resolver (I use unbound) and everything goes through port 53 UDP (and AIUI technically 53 TCP should be allowed, but nothing will happen if you just block it), unencrypted. What then unbound does on the Internet, that's up to you: you can encrypt those requests...

    The nice thing with everything being in the clear, is that you can null route / NX DOMAIN every single domain that uses Unicode (punnycode) characters and you can even do that at the firewall level, by inspecting UDP packets.

    Of course you gotta be sure to really block DoH / DoT internally but it's all doable.

    I set that up years ago and I've been running like that since then without any issue.

    Just as entire countries's IP blocks do not exist in my world, domains using Unicode characters do not exist. And I really don't care about your feelings about it: I'm just explaining that technically it can be done to block them all and that the Internet keeps working just fine.

    Unicode really is just too complex to ever be secure. And those who don't understand that are part of the problem.

    • matheusmoreira 2 days ago ago

      Does this also allow you to work with DNS in a fully private/anonymized way?

  • brewmarche 2 days ago ago

    Not sure why so many things use the compatibility form of normalisation.

    Some older RFCs even recommended using it for passwords, which needlessly reduces entropy (yes we need to normalise passwords because of combining characters, but we don’t need to collapse symbols that a user can choose from, like ſ and s).

    In my opinion, the compatibility form makes mostly sense for searching text, and even then it’s sometimes annoying (I want to search exactly for ss and not ß, browser). If you know of other good use cases let me know.

    It also OK to disallow registering two identifiers with the same compatibility normalisation form (edit: this does not prevent all homoglyph attacks BTW, that is another can of worms), but I don’t see the need to normalise the identifier when it’s used.

  • debugnik 2 days ago ago

    Firefox doesn't even let me open the link, wow.

    • ameliaquining 2 days ago ago

      Doesn't work for me in Chrome either; it transforms the URL from the top comment into https://sp.m. I believe this is the result of browser-level defenses against IDN homograph attacks, some of which postdate this article.

      • yorwba 2 days ago ago

        The URL from the top comment has been mangled by HN's "no fancy text" policy. You'll have to use the URL given in the post itself.

        • 2 days ago ago
          [deleted]
    • matheusmoreira 2 days ago ago

      Same here on Firefox mobile, link is not clickable.

    • 2 days ago ago
      [deleted]
    • extraextra 2 days ago ago

      Same, can't open on Firefox

  • mmsc 2 days ago ago

    On Firefox, hover-over of the link doesn't show the URL in the bottom left of the browser.

  • jasomill 2 days ago ago

    Note that, in addition to normalizing domain components, the process also maps U+3002 IDEOGRAPHIC FULL STOP (。) to U+002E FULL STOP (.) for use as a separator, a nice touch for domain names encoded in blackboard bold.

    Also, the author's one-liner, updated for Python 3:

      python3 -c 'import sys;print(sys.argv[1].encode("idna").decode("ascii"))' "℡"
  • 2 days ago ago
    [deleted]
  • tniemi a day ago ago

    Cyrillic `a` is a different charater than `a`: https://en.wikipedia.org/wiki/A_(Cyrillic)

  • waltbosz 2 days ago ago

    I click on the link on Android Firefox and nothing happens.

  • basilikum 2 days ago ago

    Here is the URL encoded in base64 so HN does not break it:

    aHR0cHM6Ly/wn4WC8J2WjfCdkKTigpvhtZbwnZKTLuKTnPCdlaDwnZKD8J2Tsi/wn4aG8J+Gg/CfhbU=

  • jonwinstanley 2 days ago ago

    Is it too late to say most Unicode characters should not be permitted in domains?

    • eviks 2 days ago ago

      Yes, but also wrong. Normalization like the one mentioned in the post is the mistake, not Unicode characters

  • jgalt212 2 days ago ago

    I know it's not inclusive, but DNS should be ASCII only.

  • wodenokoto 2 days ago ago

    This has given me a lot of trouble with emails.

    I have a domain that contains Nordic characters and it is a crapshoot if the email client will accept and send.

    Meanwhile I have not encountered problems with http access.

  • jan_Sate 2 days ago ago

    Looks like that it could be exploited by some means for nefarious purpose. I wonder why it's even implemented in the first place.

    • akersten 2 days ago ago

      Oh, it can. In fact there's an entire official tome of documentation describing how to carefully do Unicode-in-URLs to reduce the risk[0]. Browsers also have some mitigations to avoid the most common issues like homoglyph attacks where they show the domain in punycode if it doesn't match some local heuristic (like if you're in en-US, it's unlikely you're actually trying to visit a site with Cyrillic letter "a" instead of ASCII "a").

      It's implemented because we have thousands of writing systems and we decided, for better or worse, we want to reflect those in URLs. Solving the subsequent security issues is likely easier than getting everyone to agree to read and write the same language.

      [0]: https://www.unicode.org/reports/tr36/tr36-10.html

  • teddyh 2 days ago ago

    There have been some additions since 2018 when this article was written; here is the current list, from what I can tell:

      ㍳ │ 003373 │ SQUARE AU │ AU │ Australia
      ㍴ │ 003374 │ SQUARE BAR │ BAR │ Bar, Punto 2012 Sociedad Anonima Promotora de Inversion de Capital Variable
      ㎈ │ 003388 │ SQUARE CAL │ CAL │ Google
      ㏄ │ 0033C4 │ SQUARE CC │ CC │ Cocos (Keeling) Islands
      ㏅ │ 0033C5 │ SQUARE CD │ CD │ The Democratic Republic of the Congo
      � │ 01F12D │ CIRCLED CD │ CD │ The Democratic Republic of the Congo
      ㎝ │ 00339D │ SQUARE CM │ CM │ Cameroon
      � │ 01F190 │ SQUARE DJ │ DJ │ Djibouti
      ㍷ │ 003377 │ SQUARE DM │ DM │ Dominica
      DZ │ 0001F1 │ LATIN CAPITAL LETTER DZ │ DZ │ Algeria
      Dz │ 0001F2 │ LATIN CAPITAL LETTER D WITH SMALL LETTER Z │ DZ │ Algeria
      dz │ 0001F3 │ LATIN SMALL LETTER DZ │ DZ │ Algeria
      fi │ 00FB01 │ LATIN SMALL LIGATURE FI │ FI │ The Republic of Finland
      ㎙ │ 003399 │ SQUARE FM │ FM │ Federated States of Micronesia
      ㏿ │ 0033FF │ SQUARE GAL │ GAL │ Galicia, Spain
      ㎇ │ 003387 │ SQUARE GB │ GB │ United Kingdom
      ㏉ │ 0033C9 │ SQUARE GY │ GY │ Guyana
      ㏌ │ 0033CC │ SQUARE IN │ IN │ The Republic of India
      ㎏ │ 00338F │ SQUARE KG │ KG │ Kyrgyzstan
      ㎞ │ 00339E │ SQUARE KM │ KM │ Comoros
      ㏎ │ 0033CE │ SQUARE KM │ KM │ Comoros
      ㎾ │ 0033BE │ SQUARE KW │ KW │ Kuwait
      ㋏ │ 0032CF │ LIMITED LIABILITY SIGN │ LTD │ Binky Moon, LLC
      ㎃ │ 003383 │ SQUARE MA │ MA │ Morocco
      � │ 01F16A │ RAISED MC SIGN │ MC │ Monaco
      � │ 01F16B │ RAISED MD SIGN │ MD │ The Republic of Moldova
      ㎎ │ 00338E │ SQUARE MG │ MG │ Madagascar
      ㏕ │ 0033D5 │ SQUARE MIL │ MIL │ United States Military
      ㎜ │ 00339C │ SQUARE MM │ MM │ Myanmar
      � │ 01F16C │ RAISED MR SIGN │ MR │ Mauritania
      ㎳ │ 0033B3 │ SQUARE MS │ MS │ Montserrat
      ㎷ │ 0033B7 │ SQUARE MV │ MV │ Maldives
      ㎹ │ 0033B9 │ SQUARE MV MEGA │ MV │ Maldives
      � │ 01F14B │ SQUARED MV │ MV │ Maldives
      ㎽ │ 0033BD │ SQUARE MW │ MW │ Malawi
      ㎿ │ 0033BF │ SQUARE MW MEGA │ MW │ Malawi
      ㎁ │ 003381 │ SQUARE NA │ NA │ Namibia
      ㎋ │ 00338B │ SQUARE NF │ NF │ Norfolk Island
      № │ 002116 │ NUMERO SIGN │ NO │ The Kingdom of Norway
      ㎀ │ 003380 │ SQUARE PA AMPS │ PA │ Panama
      ㎩ │ 0033A9 │ SQUARE PA │ PA │ Panama
      ㎊ │ 00338A │ SQUARE PF │ PF │ French Polynesia
      ㏗ │ 0033D7 │ SQUARE PH │ PH │ The Republic of the Philippines
      ㏚ │ 0033DA │ SQUARE PR │ PR │ Puerto Rico (U.S.)
      ㎰ │ 0033B0 │ SQUARE PS │ PS │ Palestinian Territory, Occupied
      ㎺ │ 0033BA │ SQUARE PW │ PW │ Palau
      ₨ │ 0020A8 │ RUPEE SIGN │ RS │ Serbia
      � │ 01F14C │ SQUARED SD │ SD │ Sudan
      ℠ │ 002120 │ SERVICE MARK │ SM │ San Marino
      ㏛ │ 0033DB │ SQUARE SR │ SR │ Suriname
      � │ 01F14D │ SQUARED │ SS │ SS │ South Sudan
      st │ 00FB06 │ LATIN SMALL LIGATURE ST │ ST │ Sao Tome and Principe
      ㏜ │ 0033DC │ SQUARE SV │ SV │ El Salvador
      ℡ │ 002121 │ TELEPHONE SIGN │ TEL │ Contact data
      ™ │ 002122 │ TRADE MARK SIGN │ TM │ Turkmenistan
      Ⅵ │ 002165 │ ROMAN NUMERAL SIX │ VI │ Virgin Islands, U.S.
      ⅵ │ 002175 │ SMALL ROMAN NUMERAL SIX │ VI │ Virgin Islands, U.S.
      ㌽ │ 00333D │ SQUARE POINTO │ ポイント │ Amazon Registry Services, Inc.
  • ButlerianJihad 2 days ago ago

    Now, please present a list of these to your grandmother, and ask her which ones are phishing, and which are legitimately from the government.

    Now, present the same list to an I.T. professional with the same questions. Perhaps make sure they are not carrying any weapons before you try.

    This is just one reason why visual inspection of URLs and "hover over this link" haven't been useful defenses for a long time.

    • glenstein 2 days ago ago

      The author of the article isn't advocating for using these domains for trusted services.

    • 2 days ago ago
      [deleted]
  • kccqzy 2 days ago ago

    My browser refuses to open this link. It couldn’t find the server.

  • notorandit 2 days ago ago

    > Is this useful?

    No, it is not, IMHO. When you create an "alias" you are adding "yet-another-confusion-opportunity" and "yet-another-failure-opportunity".

    For no actual reason.

    I for one would aim at lowering the complexity, not at making stuff more fancy.

  • i18nagentai 2 days ago ago

    [flagged]

  • simplyetchedsit 2 days ago ago

    [flagged]

  • elvisgodevelop 2 days ago ago

    [flagged]

  • ihateaislop 2 days ago ago

    [flagged]