• yucandu@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    25 days 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.

    • nexusband@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      25 days 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
        1
        ·
        24 days 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.

          • greybeard@feddit.online
            link
            fedilink
            English
            arrow-up
            0
            arrow-down
            1
            ·
            24 days ago

            Not the person you responded to, but I’ll give my unsolicited advice: I switched to Unifi NAS. QNAP has had a lot of security nightmares, and a bad habit of EOLing devices.

            The best option might actually be using an old workstation and going with something like TrueNAS, but I enjoy the convenience of a purpose built box.

            One big difference between Unifi NAS and something like QNAP or Synology, is that the Unifi NAS only does NAS work, it doesn’t run containers or “apps”. You need separate compute if you want to run containers.

      • yucandu@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        24 days 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
          0
          ·
          24 days 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…

          • Ann Archy@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            23 days ago

            And we’ve caught them doing it. Again, and again, and again. Also they are waging a literal war against Europe and treat their own population basically the same as they do their enemies.

            So there’s that hard physical evidence and proof…

            • wonderingwanderer@sopuli.xyz
              link
              fedilink
              English
              arrow-up
              0
              arrow-down
              1
              ·
              23 days ago

              Yeah but thank god for the aNtI-wEsT tankies who so enthusiastically push kremlin-sponsored talking points night and day to liberate us from our… democratically-elected oppressors, or something?

              /s, of course

              I mean I get it, the west isn’t perfect. But compared to russia, most western countries don’t seem so bad.

              And we’d be much better off by now if they would stop meddling in our elections (i.e. by funding reactionaries and running manipulative social media campaigns) and keep their filthy psyops out of our zeitgeist

    • PM_Your_Nudes_Please@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      24 days 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.

  • DevDave@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    24 days ago

    practically need to rotate logs every hour if you foolishly leave ssh open on a open network. usually a bastion with ssh listening to port 34000 or such is a good first step.

    that said the conditions for this exploit are fascinating. no pam, shadow password set to *, using a alternative to glibc. The sacrifices to be more efficient feel on par with replacing a tank’s armor with paper mache and hope.

      • DevDave@piefed.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        23 days ago

        I got into it with another sys admin on shifting port numbers. “Security through obscurity is not security!” to which I responded “Obscurity cuts out most of the bots” (therefore easier to spot real threats).

        Eventually we just went the secret squirrel bastion route.