I recall that subdomains are their own record inside a DNS, which would imply that anyone can claim that their server is a non-existent subdomain of the real domain

  • Draghetta@lemmy.world
    link
    fedilink
    arrow-up
    83
    ·
    1 month ago

    There are a lot of answers here but I feel they mostly miss OP’s point so I’ll try my own:

    What stops a scammer from HTTPS certifying foobar.reputable.com is the trust system.

    Anybody can create a certificate on their machine for anything within seconds, even you could create a certificate for www.google.com. The problem is that you, as an issuer, are not trusted by anybody.

    Browsers and operating systems are released with a list of issuers that are considered trustworthy, so if you want your certificate to be recognised it has to come from one of these, not from you.

    All of these issuers are in the list because they have been individually vetted, and are known to do their due diligence before issuing certificates, so they would not give you that cert unless they know that the bank domain or subdomain belongs to you, and the technical means to achieve this have been explained in other answers.

    But if one of these issuers went rogue, or if you hypothetically hacked into their certification authority, then indeed nothing would stop you from obtaining a valid and recognised certificate for foobar.bank.com.

    This is why for example Trustcor was removed from this list in 2022: from that position it would be trivial for a certificate authority to allow third parties to spy on people.

    • Nougat@fedia.io
      link
      fedilink
      arrow-up
      14
      arrow-down
      5
      ·
      1 month ago

      And when you are requesting a certificate for foobar.bank.com, your certificate request must come from an authorized email address at bank.com. That is also where your issued certificate would be sent. So, in order to get a certificate from a third party issuer, you have to:

      • Control the domain registration at the level just above the TLD (I don’t know how it works for co.uk, probably similar though)
      • Have access to a mailbox at the domain, where that mailbox has an address which is authorized to request certificates (this would be configured in the domain registration)

      Could a malicious actor compromise that mailbox in a way that allows them to request a certificate and then receive it? It’s not impossible, but it would be a huge effort with a small payout. Honestly, if you’ve got access to that mailbox, you don’t want to give yourself away by making false certreqs through it. You want to just exfiltrate as much data from it as you can. There’s certainly something way more valuable in there.

      • MartianSands@sh.itjust.works
        link
        fedilink
        arrow-up
        16
        arrow-down
        1
        ·
        1 month ago

        your certificate request must come from an authorized email address at bank.com

        That isn’t true in general. In fact, it can’t be.

        It might be policy for most cases from the well-known certificate authorities, but it’s not part of the protocol or anything like that.

        If it were, then it would be impossible to set up your mailserver to begin with because you could never get a certificate for mail.bank.com

        • Ghoelian@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          8
          ·
          edit-2
          1 month ago

          Yeah, letsencrypt doesn’t do this for example. They do ask for an email address, but that’s just for expiry notices.

          They do require you control the domain, and run it on the server the DNS record points to. When using certbot at least.

            • chameleon@fedia.io
              link
              fedilink
              arrow-up
              2
              ·
              1 month ago

              The email ecosystem is changing in recent years but yeah, it’s best to expect that there is at least one opportunity for any given email to be sent over the internet unencrypted. MTA-STS has been slowly changing the landscape but adoption isn’t going all that great.

  • partial_accumen@lemmy.world
    link
    fedilink
    arrow-up
    29
    ·
    1 month ago

    I recall that subdomains are their own record inside a DNS

    Well, not a record, but a zone. A subdomain is its own zone. There are additional DNS records that support a separate zone though.

    which would imply that anyone can claim that their server is a non-existent subdomain of the real domain

    False. The person wanting control of the subdomain must be delegated control from the parent domain. Owners of the parent domain don’t just hand that out to anyone. The mechanism is called DNS Delegation.

  • Em Adespoton@lemmy.ca
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    1 month ago

    The way DNS works, each dot is authoritative.

    So if you want the IPv4 for scam.legitco.com, your computer contacts the authoritative DNS for “com” and asks it for the address for legitco’s DNS. You then contact legitco.com and ask it for scam’s IP. Which it won’t have.

    This is simplified, because in reality there’s DNS caching and pooling, but that wouldn’t affect your scenario. Although, cache poisoning IS a thing, as is BGP hijacking where the IP of the DNS itself may get redirected to a different machine.

  • redpotatoes@lemm.ee
    link
    fedilink
    English
    arrow-up
    16
    ·
    edit-2
    1 month ago

    They’d need a certificate authority to issue the certificate, and the victim’s browser would have to trust that authority.

    Edit: and the scammer would need to control the domain DNS server to use the subdomain, like another reply said, so the certificate alone wouldn’t help much.

    • over_clox@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      15
      ·
      1 month ago

      I’ve been able to downgrade https sites to plain http sites, through a series of loopholes which I won’t go into.

        • Elvith Ma'for
          link
          fedilink
          arrow-up
          1
          ·
          1 month ago

          Checks own servers

          Strict-Transport-Security: max-age=63072000; includeSubDomains; preload

          Yeah, I’d like to see that…

            • Elvith Ma'for
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              1 month ago

              Yeah, but now you’re talking about communicating with web.archive.org and not nonesense.reputable-bank.com as in the original post. In this case you’re not even trying to hide the fact, that you aren’t affiliated with reputable-bank.com and we’re back to square one and you could also just use reputable-bank.com.some.malicious-phishing.website to host your page.

              Btw: all modern browsers will warn you when you access a non-encrypted website - some immediately, some only when you try to enter data into a login form.

              • over_clox@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                1 month ago

                I’m not trying to log into anything nor am I trying to get anyone’s personal information. I mostly use the archive to make it a lot easier for legacy operating systems to access and download files and software and stuff.

                You ever put Windows 3.11 or other legacy operating systems on the internet? Easier said than done, but http is basically the only way.

        • over_clox@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 month ago

          My own security? Hah, that’s a joke right?

          Everything on the Internet Archive can be accessed via simple http, even if the original archived site was https.

          • Serinus@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 month ago

            All that does is allow someone in the middle to potentially read your traffic. So what’s secret about the traffic between you and the Internet archive? If it’s only your login details, that seems like a you problem.

            It wasn’t long ago that most of the internet was http only.

            • over_clox@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              1 month ago

              Who said I log into anything? I have terabytes of files archived, without any accounts anywhere, not even the archive. I’m not that stupid.

  • Phen@lemmy.eco.br
    link
    fedilink
    arrow-up
    13
    ·
    1 month ago

    Something in the way of “an apartment key is useless if you can’t get into the building”.

  • Tarogar
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    1 month ago

    There were some rather in detail answers already to which I could add. But instead I am going with a more simple answer that is hopefully also good.

    Basically, bad actors want to stay undetected if possible. Like staying in dark places with dark clothing and not making noise. trying to get your own subdomain is more like wearing a high Vis jacket, having Christmas lights on you and broadcasting your presence with a loudspeaker with something like “catch me if you can!” on repeat.

    Or even simpler: getting detected is bad for bad actors, doing that is one great way to get detected, they know that so they don’t do that.

    Or metaphorically: a drop of water in the ocean won’t get noticed, rain in the desert will.

    At the end of the day it’s not about what you can do but if you should do that.