When you spin up a fresh public Linux instance, automated scanners start knocking on your doors within milliseconds.

It doesn’t take much to get locked down properly, but missing a few basics can leave you exposed.

I’ve put together a straightforward guide covering the essential hardening steps from UFW and SSH key-only auth to secure Docker bindings and automated maintenance.


Original content by The Unknown Universe, written by a human and not AI generated!

  • iByteABit@lemmy.ml
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    2 days ago

    Of course privilege escalation exists, but why roll out the red carpet on an attacker that managed to get shell access? Maybe in the time that they take to figure out that privilege escalation you have the time to detect the attack and defend against them

    • MangoCat@lemmy.sdf.org
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Most shell users have enough privilege to read (exfiltrate) most data-value from a server, and they almost always have the capacity to damage it beyond functional operation.

    • underisk@lemmy.ml
      link
      fedilink
      arrow-up
      8
      ·
      1 day ago

      If someone put a script on your server that tried to do privilege escalation you should just assume it was successful and act accordingly. It doesn’t really change what should happen.

      • eldavi@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 day ago

        replacing or reimaging it automatically when you see something like this feels like overkill.

        • underisk@lemmy.ml
          link
          fedilink
          arrow-up
          3
          ·
          1 day ago

          Only if you haven’t built the infrastructure to make that trivial, which you should have. If you have any data worth securing it’s not even close to overkill.