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!

  • TrollAccount69@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    13 hours ago

    Yes and no. Of course an easy solution is easy and getting the easy stuff out of the way is the point of whatever shake a dead chicken ritual script you scp over and run on new deployments.

    Doing the hard stuff doesn’t make doing the easy stuff less worthwhile.

    I would also like to make clear that with nonstandard logins and ports, restricted ssh, key ssh and fail2ban you essentially don’t have attack surface. What are they gonna do, use a residential proxy network to spread attempts across 100k ips to figure out your port and login (if you’re just using some tla greybeard larp username) before they start running key attacks against you? No. They’re gonna go mess with something else where the service gives them something quick and easy to feed to antifox to get a win.

    Just because you ought to be able to put the keys to the castle in a perfectly cryptographically secure glass case on a pedestal lit up by a spotlight next to the gate with a sign next to it that says “these are the keys to everything” doesn’t mean you should.

    If security through obscurity didn’t work then we wouldn’t be seeing 69 million obscure bugs that are all old enough to drive being discovered by ai.

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

      use a residential proxy network to spread attempts across 100k ips

      As I understand it, the clever kids can spoof IPs without that…

      They’re gonna go mess with something else… easier

      yes: because easier with value is still out there. LLM crafted chained attacks just made all sorts of things MUCH easier. The same arguments still work in the physical world for domestic dogs (until the perp just tranqs/poisons the dogs) intrustion alarm systems etc. Easy as they are to defeat, it’s easier still to pick the lower hanging fruit - while there still is any.

      the keys to the castle in a perfectly cryptographically secure glass case

      No, of course not - do the onion, it discourages a lot of attackers. Don’t think for one second that the onion can’t/won’t be peeled. Ideally, the hard crypto lives in a middle layer where you can detect the peeling of the outer layers, because hard crypto shouldn’t fail on short timescales (like the heat death of the universe, in theory) and obscure inner layers just might thwart that quantum attack when it comes.

      69 million obscure bugs that are all old enough to drive being discovered by ai.

      And AI is effectively that quantum threat made real for obscurity, I predict long before true cryptography falls to any real attacks AI will be obsoleting a lot of the security through obscurity.

      Final point about key management - ultimately, somebody somewhere has to hold the secret securely. Same goes for obscurity protocols - if you ever lose the protocols, you’re just as screwed as losing your final trusted key. Those protocols have to be shared with anyone accessing the system, there’s your “key management” for obscurity, and it’s ad hoc - unproven, ususally unreviewed, and doubtlessly duplicated many times around the world no matter how obscure or random you think your protocols are, your management of them (sharing them with people who need to know them) is not going to be very obscure by comparison.

      And, by the way, thanks for the discussion - I’m usually more on your side when having this argument at work and you’ve prompted me to find fwknop which is the kind of tool I might advocate for if anyone ever lets our department design a security protocol ever again: corpos are standardizing everything, which I predict is going to lead to a significant breach in the not-too-distant future, but it won’t be “our fault” for following the top-down advice. Hopefully I can still wedge some obscure things like fwknop as our “optional, additional layers” for our specific products so that we don’t fall when the rest of the company does.