• PM_Your_Nudes_Please@lemmy.world
      link
      fedilink
      English
      arrow-up
      24
      ·
      edit-2
      9 hours ago

      Yes, it’s actually a very creative name. It’s caused by the character * allowing anyone to log into an open SSH port. So it’s an amalgam of {*}{SSH}{port (hole)}.

      The long story short is that if you don’t have a password set for an account, Alpine saves the user’s password hash as “*” because no password hash will ever match it. Should be safe, right? Any password will always automatically fail, because the hash algorithm cannot return “*” as a result. So the only way to log in as that user is via something besides a password.

      And when musl (the underlying system that Alpine uses for SSH) gets a Null response from its password hash, it uses “*” to represent that null value. Because lots of programs throw a fit if they get a true null value. So instead of returning a null value, it just returns a *. Which shouldn’t match anything, right?

      So an attacker forces the password hash to return a null value. Simple to do, because the password hash is capped at 256 characters. So just enter something with more than 256 characters. Musl takes that null value, turns it into a *, and passes that onto Alpine. Alpine takes this *, and compares it with the list of saved usernames and password hashes. And it finds that the user (who has no password set, and shouldn’t be allowed to log in with a password) has a password hash of “*”. This matches the result musl just provided, so the attacker is able to log into the system.

  • yucandu@lemmy.world
    link
    fedilink
    English
    arrow-up
    74
    ·
    1 day ago

    The only time I ever exposed my SSH port to the WAN, I got about 750 connection attempts from China and 250 attemps from Russia per hour.

    • Aquatic_Melon@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      How do you know this? What tool or utility tells you this fact? I have a port exposed for a game server but realising I don’t know how many attempts are being made.

      • yucandu@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        20 hours ago

        This was about 20 years ago btw. I know it’s gotten worse. But it started earlier than most think.

        • wonderingwanderer@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          4
          ·
          20 hours ago

          Yeah, BBC has a whole documentary about it. Plus the russian state department basically published it all in a propaganda manual. They don’t exactly try to hide this stuff…

    • pHr34kY@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 day ago

      99.999% of that is over IPv4. I leave IPv6 open to WAN for my own use and it’s not a problem.

    • nexusband@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      2
      ·
      1 day ago

      yeah, while reading this i was going “What maniac exposes SSH to WAN anyway…?” the whole time. I fail to see any reason or point that can be justified exposing SSH to WAN.

      • muusemuuse@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        21
        ·
        1 day ago

        I used to have a synology NAS that would sleep of death itself. Synology support asked me to port forward SSH to the open internet and set no password so they could pull logs over the next few weeks.

        Yes, it was legit synology support not a scammer.

        No, I haven’t bought synology ever again.

      • dev_null@lemmy.ml
        link
        fedilink
        English
        arrow-up
        9
        ·
        1 day ago

        Any VPS provider just gives you an SSH IP and port. So that’s the default state, until you do something else, which I imagine many don’t, since key based authentication was always considered secure.

        So I don’t know the reason, but that’s the standard practice with most providers, like Digital Ocean or Linode or whatever. You can call them maniacs but you shouldn’t be surprised at something so ubiquitous.

    • Zarobi@aussie.zone
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 day ago

      Yeah it’s crazy. Are they just constantly pinging every possible ip address on every possible port every second? I opened a port for 1 day and the traffic made me uncomfortable enough to rearchitecture my entire self host setup

  • Samsy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    2
    ·
    1 day ago

    Wait that means I have to expose a port. But I have zero exposed ports.

    This post was created by the pangolin-gang.

      • Jason2357@lemmy.ca
        link
        fedilink
        English
        arrow-up
        41
        ·
        2 days ago

        It seems like the pattern emerging is that AI is great at finding these obscure vulnerabilities that are only exploitable on very particular systems with very particular, non-typical configurations, and only on nights where unicorns fart candycorn.

        Sure, fix them, but the hype is too much. Also, disable password auth on SSH already. Jesus. Keys arnt that hard.

        • P03 Locke@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          13
          arrow-down
          3
          ·
          1 day ago

          More like AI is much faster at finding obscure vulnerabilities, because it doesn’t get tired of digging into the mind-numbing details of human-generated spaghetti code. Give a human the same kind of task, and they would die of boredom 12 hours into it.

          We’re entering an age where AI is quickly cleaning up the stupid security holes that have been created by decades of human mistakes, and will continue to be this way until increased AI security reviews will become more standard. The tribals wielding spears will continue to get shot by superior firepower until they adapt to the same weapons and protection themselves.

          • kkj@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            5
            ·
            1 day ago

            “Cleaning up” seems a little generous. It’s finding them, but someone still has to patch them.

            • The_Decryptor@aussie.zone
              link
              fedilink
              English
              arrow-up
              2
              ·
              5 hours ago

              “Finding” is also rather generous, going by numbers from Anthropic and from the Linux kernel, things like Mythos are wrong 95% of the time.

              They’re much easier to run though, compared to more reliable tools. So even being wrong 95% of the time wins out if you’ve got 100x more people running them.

            • P03 Locke@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              1
              ·
              16 hours ago

              Most vulnerability patches are a few lines of code. Finding it is the hard part.

              Even then, the AI session that found it probably already has a solution to fix it.

              • kkj@lemmy.dbzer0.com
                link
                fedilink
                English
                arrow-up
                2
                ·
                10 hours ago

                In my experience, the LLM usually proposes a solution, but it’s a crapshoot whether it works well. And plenty of bugfixes go well beyond a few lines, especially in older code.

                • P03 Locke@lemmy.dbzer0.com
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  1 hour ago

                  I use this shit on a daily basis at work. They work well, as long as you’re choosing the right models, making the right engineering decisions, and have a good set of baseline rules.

          • Jason2357@lemmy.ca
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            This example demonstrates my point though. It requires an extremely unusual system configuration that may or may not even exist in the real world it is so unusual. AI doesnt get tired, like you said, but its not about spaghetti code (both musl and openssh are gold-standard opposite of spaghetti code), its about trying every possible software combination in ways a human wouldnt bother.

            • P03 Locke@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              1
              ·
              16 hours ago

              It requires an extremely unusual system configuration that may or may not even exist in the real world it is so unusual.

              You have to remember that the same AI agents finding the code are also able to exploit the code. So, if it’s some extremely rare race condition requiring some convoluted pattern, it’s still easy to exploit.

        • MyFriendGodzilla@lemmy.world
          link
          fedilink
          English
          arrow-up
          11
          ·
          2 days ago

          I agree about the AI, but desktop Linux has never been under haxxor pressure the same way windows or apple has. I also think the newer parts of the userbase are less technical than even ten years ago. Previously undocumented bugs found and squashed is great for everyone.

  • AppleMango@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    2
    ·
    1 day ago

    Most ssh ports should be accessed through a VPN anyway, not exposed directly to the internet

  • IronKrill@lemmy.ca
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    1
    ·
    2 days ago

    Well that sucks. IIRC a lot of my docker images are alpine based, but they’d be safe due to never having their SSH ports exposed I assume.