Automatic text replacement let users spoof URLs ending in x, like netflix.com.

Elon Musk’s clumsy brand shift from Twitter to X caused a potentially big problem this week when the social network started automatically changing “twitter.com” to “x.com” in links. The automatic text replacement reportedly applied to any URL ending in “twitter.com” even if it wasn’t actually a twitter.com link.

The change apparently went live on X’s app for iOS, but not on the web version. It seems to have been a problem for a day or two before the company fixed the automatic text replacement so that it wouldn’t affect non-Twitter.com domains.

Security reporter Brian Krebs called the move “a gift to phishers” in an article yesterday. It was a phishing risk because scammers could register a domain name like “netflitwitter.com,” which would appear as “netflix.com” in posts on X, but clicking the link would take a user to netflitwitter.com.

“A search at DomainTools.com shows at least 60 domain names have been registered over the past two days for domains ending in ‘twitter.com,’ although research so far shows the majority of these domains have been registered ‘defensively’ by private individuals to prevent the domains from being purchased by scammers,” Krebs wrote.

  • zeppo@lemmy.world
    link
    fedilink
    English
    arrow-up
    61
    arrow-down
    1
    ·
    8 months ago

    It’s amazing that not only did they fuck up the regex, but only changed how the link was displayed and not where it linked to. And somehow their org is fucked up enough that someone not only wrote this incompetent code but it went into production.

    • Rob@lemmy.world
      link
      fedilink
      English
      arrow-up
      81
      ·
      8 months ago

      It’s amazing that not only did they fuck up the regex regetwitter, .

      FTFY

      • Flying Squid@lemmy.world
        link
        fedilink
        arrow-up
        23
        ·
        8 months ago

        I’m sure plenty of H1B visa talent is still there, terrified to do anything that Musk doesn’t explicitly order them to do, thus resulting in the same sort of fuckups that would result if they weren’t there. So I guess at least Twitter is stopping foreign people from having to go back to an impoverished life in Goa or wherever.

        • zeppo@lemmy.world
          link
          fedilink
          English
          arrow-up
          12
          ·
          8 months ago

          Marginalized non-white people working for him while afraid of the consequences of quitting or disagreeing must take him back to his childhood.

    • WindyRebel@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      edit-2
      8 months ago

      Wait, they just did a text replacement and didn’t change the anchor links? I tried x dot com and it redirects to twitter, so even if they changed the links, too, it would just send them back to twitter.

      (laughs in SEO) You fools!

      If they really wanted X to happen they’d do a full site migration using 301, or 308, redirects of twitter to x.

      Do they just not have the resources to do this or what the hell is stopping them from doing it the correct way if that’s what they want? Doesn’t Musk own the x domain?

      • WhatAmLemmy@lemmy.world
        link
        fedilink
        arrow-up
        10
        ·
        8 months ago

        It was evident a year ago that Musk fired or drove away all their skilled, competent engineers.

        They can’t do it the right way because a) they don’t know how b) nobody understands most of their existing services, and c) Musk is guaranteed to step in and fuck everything up.

      • funkless_eck@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        8 months ago

        armchair developer here, but it wouldn’t be that hard, right? Isn’t it just a single line at the very root of the domain in .htaccess - or whatever equivalent if there’s a different stack

        • WindyRebel@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          8 months ago

          I’ve never done the actual implementation myself, honestly. Redirects can be done via .htaccess (or equivalent), server side, or JavaScript.

          Theoretically, yes, it’s that easy. However, pages should have 1:1 redirects for each page URL that matters. Then a strategy to prune the ones no longer needed/outdated by allowing them to 404, redirect to the most relevant subfolder, or just send to the main domain should be considered.

          The list can be quite long. There’s more to it than all this as well, but that’s the general gist.

          • funkless_eck@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            8 months ago

            yeah I assumed everything stayed the same except domain - and if best practices are maintained then everything should have relative urls anyway…

      • zeppo@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        8 months ago

        Just optics, I guess? Probably some urgent drug-induced decree from Elron. They still have tons of references to Twitter in various parts of the site. The transition to the ‘x’ domain (which yes, Musk has owned since 1999) was rushed, hasty, and poorly done, not to mention incredibly stupid from a business perspective.

    • quindraco@lemm.ee
      link
      fedilink
      arrow-up
      2
      arrow-down
      11
      ·
      8 months ago

      You have it exactly backwards. They only changed where the links went, not how they were displayed. That’s why it’s such a phishing concern.

          • zeppo@lemmy.world
            link
            fedilink
            English
            arrow-up
            12
            ·
            edit-2
            8 months ago

            Are you serious?

            As of April 8, 2024, the iOS Twitter (now X) client automatically replaces the text “twitter.com” in posts with “x.com” as part of its functionality. Therefore, for example, a URL that appears to be “netflix.com” will actually redirect to “netflitwitter.com” when clicked.

            As another X user (@Arcticstar0) pointed out, “the actual link is unchanged. It’s just the text placeholder that appears different. So the link goes to a different url than it appears.”

            It could work the way you’re describing with the same effect, but that’s not what’s being described.

            • quindraco@lemm.ee
              link
              fedilink
              arrow-up
              3
              arrow-down
              1
              ·
              8 months ago

              Quoting your quote, now with emphasis:

              a URL that appears to be “netflix.com” will actually redirect to “netflitwitter.com” when clicked

              So, as I said, the link text you see appears unchanged, but where it goes is changed. That’s why it’s a phishing concern.

              • zeppo@lemmy.world
                link
                fedilink
                English
                arrow-up
                6
                ·
                8 months ago

                No, apparently what happens is people post netflitwitter.com, linking to netfltwitter.com, and the X app changes the visible link text to netflix.com but not the link target.

                The way you’re describing it is the reverse, like people post netflix.com and the link is changed to netflitwitter.com. That’s not what they’re doing. Or, if it was that people posted netflitwitter.com and it linked to netflix.com, how would that be a problem?

                • quindraco@lemm.ee
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  2
                  ·
                  8 months ago

                  No. If the link was left pristine, phishing would be impossible, because the original links we’re discussing went to genuine sites and the displayed link would be obviously garbage.

                  The whole problem is that people are linking to netflitwitter with a display of netflitwitter, then the regex changes the link target, so you see the original, sane address, click on it, and get deceived into going to a target the regex fabricated.

  • machinin@lemmy.world
    link
    fedilink
    arrow-up
    31
    arrow-down
    1
    ·
    8 months ago

    And to think, the same guy greenlighting the processes and creating the culture that produced a problem like that, also heads another company that puts software in the hands of people called “full self driving” that controls a piece of equipment that is thousands of pounds and flying down our streets and highways at significant speeds.

    What a time to be alive!

    • goldteeth@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      20
      ·
      8 months ago

      To say nothing of the whole, y’know, “grafting experimental hardware directly into peoples’ brains” thing.

    • crusa187@lemmy.ml
      link
      fedilink
      arrow-up
      4
      ·
      8 months ago

      I recently found out that many high profile engineers from Tesla have left to create a new EV company called Lucid.

      The cars are pricey, but they look really nice. Might be worth checking out if you’re in the market and have a boatload of money burning a hole in your pocket.

    • Chainweasel@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      The cars aren’t what you should be worried about, he also has a company that makes brain chips meant to be implanted in humans.
      Imagine that that kind of technology could do to people when it matures.

      • machinin@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        8 months ago

        when it matures.

        Do you think Musk will wait for it to mature before doing whatever he wants with it?

        • Chainweasel@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          8 months ago

          Absolutely not, but I do think most people won’t adopt it until it’s mature and it likely won’t become a problem until lots of people have adopted it.