this post was submitted on 07 Apr 2024
239 points (95.8% liked)

Linux

48185 readers
1238 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I have been thinking about self-hosting my personal photos on my linux server. After the recent backdoor was detected I'm more hesitant to do so especially because i'm no security expert and don't have the time and knowledge to audit my server. All I've done so far is disabling password logins and changing the ssh port. I'm wondering if there are more backdoors and if new ones are made I can't respond in time. Appreciate your thoughts on this for an ordinary user.

(page 2) 44 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 7 months ago (5 children)

Reading the source code for everything running on your machine and then never updating is the only way to be absolutely 100% sure.

load more comments (5 replies)
[–] [email protected] 35 points 7 months ago

I would say you can't, but if you are using open source software, then somebody can and will find them eventually and they will be patched. Unlike with closed source software, you will never know if it has a backdoor or not. This whole episode shows both the problems with open source, being lack of funding for security audits, and the beauty of open source, being that eventually it will be detected and removed.

[–] [email protected] 11 points 7 months ago (2 children)

I'm not a security specialist either. I learn new things every day, but this is why my NextCloud is accessible through TailScale only and I have zero ports exposed to the outside world.

The only real convenience I lose is being able to say "check out this thing on my personal server" with a link to someone outside my network, but that's easily worked around.

[–] [email protected] 3 points 7 months ago

I think you can use Tailscale Funnels for that.

[–] [email protected] 17 points 7 months ago (2 children)

Next: how do we know tailscale's network hasn't been backdoored?

load more comments (2 replies)
[–] [email protected] 8 points 7 months ago

You can't trust any of it to be totally secure, it's effectively impossible. But, this is true of all software, at least open source is being audited and scrutinised all the time (as demonstrated).

All you can do is follow best practices.

[–] [email protected] 20 points 7 months ago* (last edited 7 months ago)

We don't. That's why we use multiple layers of security. For example keeping all services accessible only via VPN and using a major OS that a lot of production workloads depend on such as Debian, Ubuntu LTS or any of the RHEL copycats. This is a huge plus of the free tier of Ubuntu Pro BTW. It's commercial level security support for $0. Using any of these OSes means that the time between a vulnerability being discovered, patched and deployed is as short as possible. Of course you have to have automatic security updates turned on, unattended-upgrades in Debian-speak.

[–] [email protected] 14 points 7 months ago

if you are self hosting and enjoy over-engineering systems... VLANS, ACLs between subnets and IDS/IPS should be part of.your thinking. separate things into zones of vulnerability / least-privilege and maintain that separation with an iron fist. this is a great rabbit hole to fall down if you have the time. however, given a skilled adversary with enough time and money, any network can be infiltrated eventually. the idea is to try to minimize the exposure when it happens.

if the above is not a part of your daily thinking, then don't worry about it too much. use a production OS like Debian stable, don't expose ports to the public internet and only allow systems that should initiate communication to the internet to actually do so (preferably only on their well known protocol ports - if possible).

[–] [email protected] 28 points 7 months ago

We can't know. If we would know, those weren't undetected backdoors at all. It's not possible to know something you don't know. So the question in itself is a paradox. :D The question is not if there are backdoors, but if the most critical software is infected? At least what I ask myself.

Do you backups man, do not install too many stuff, do not trust everyone, use multiple mail accounts and passwords and 2 factor authentication. We can only try to minimize the effects of when something horrible happens. Maybe support the projects you like, so that more people can help and have more eyes on it. Governments and corporations with money could do that as well, if they care.

[–] [email protected] 13 points 7 months ago* (last edited 7 months ago)

This was likely a state-sponsored attack. If your SSH isn't exposed to the internet this probably wouldn't have effected you. Also most people run stable distros like Debian on their server, and this particular vulnerability never made it to the stable branch. I would guess that most of the computers you have ever used have backdoors. Even if you run Linux (which may itself have some) you might still have a proprietary UEFI on your motherboard. Something like xz wouldn't effect you because no government really cares what's on your server. Smaller attacks can be avoided through common sense. Some people will expose services that require zero authentication to the internet. Follow basic best practices and you will probably be fine.

Edit: Also remember, google photos once flagged a picture of a child that the child's father had taken for medical reasons as abuse, so self-hosted may not be completely private or secure, but it's better than the alternative.

[–] [email protected] 12 points 7 months ago

There probably are, there's a reason why super high security systems aim for airgapping of sorts, and even that's not immune.

[–] [email protected] 46 points 7 months ago (1 children)

You don't. Hackers often exploit things like this for ages before they are found. Every bit of non simple software also has bugs.

But chances are you won't be the target.

Just keep everything updated and you should be alright.

load more comments (1 replies)
[–] [email protected] 27 points 7 months ago (1 children)

The main solace you can take is how quickly xz was caught: there is a lot of diverse scrutiny on it.

[–] [email protected] 21 points 7 months ago (5 children)

Hmm, not really. It's only because it nerd-sniped someone who was trying to do something completely unrelated that this came to light. If that person has been less dedicated or less skilled we'd still probably be in the dark.

[–] [email protected] 7 points 7 months ago* (last edited 7 months ago)

Call me names... But sometimes the story has far more branched backstories than they actually shed into light.

Trust nobody, not even yourself.

load more comments (4 replies)
[–] [email protected] 7 points 7 months ago (1 children)

That's the neat part, you don't. However if you stay up to date it is not a big deal.

[–] [email protected] 21 points 7 months ago (1 children)

Well not too up to date as we just have witnessed 😁

[–] [email protected] 6 points 7 months ago

Just use a stable system

[–] [email protected] 8 points 7 months ago

You never know what security holes exist until they're exploited. Nothing you can really do about that. Security and convenience have always, and will always, be a trade off and a matter of personal acceptability. If you host anything, it will be potentially vulnerable, way less so if you take proper precautions. If you're not just overtly insecure, you'll probably be fine, but there's no way to say for sure.

[–] [email protected] 37 points 7 months ago (1 children)

That's the neat part, we don't!

...but, we at least can have a shot of finding them.

In the meantime, I'd advise you to keep an eye out and maybe look into threat models. As people said in this thread already, bad actors probably don't care about your personal photos.

[–] [email protected] 12 points 7 months ago

Unless OP is a celebrity or politician. Or knows they have an enemy with the resources to find and exploit potential backdoors.

[–] [email protected] 4 points 7 months ago (1 children)

As many have pointed out, you don't know that there is not a back door in your software.

One way to defend against such an unknown is to have a method of quickly reinstalling your system, so if you ever suspect you have been compromised you can reload your OS from scratch and reconfigure it with minimal fuss. This is one reason I recommend folks learn one of the configuration management systems like ansible or puppet, and use those to configure your Linux servers. Having config management also helps you recover anfter unexpected hardware failures.

Defense is done in layers. No one layer will protect you 100%. Build up several layers that you trust and understand.

[–] [email protected] 1 points 7 months ago (1 children)

Very good points. Call me paranoid but i always fear I might fail to notice the symptoms of something nasty going on. I wish linux had a built-in, easy-to-use auditing/alerting system. I know this can be achived by experts but others have no idea what's actually going on on their machines.

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago)

Dude, you're so not paranoid. This stuff has happened to me. I had a Wordpress blog that was hacked and the exploit was stored in the DB so even after reloading the OS I still was infected because I hadn't sanitized my database. Luckily it was just Google search viagra spam, and it was a valuable lesson.

[–] [email protected] 6 points 7 months ago

While others are saying “no one cares about your personal photos” personal info is not the target of backdoor attacks like this. It’s more likely an attempt to get access to lots of processing power for a crypto mine or botnet.

It’s best practice to have the minimum packages required to run whatever service you are running, don’t add other stuff that you won’t be using. Using a distro that is “outdated” like Debian stable can help since the packages have had more time out in the wild to be tested.

I am sure that the xz incident has raised a lot of alarms across many projects.

[–] [email protected] 161 points 7 months ago

"We don't" is the short answer. It's unfortunate, but true.

[–] [email protected] 14 points 7 months ago (3 children)

We don't know. But if there were well known backdoors to mainstream security practices we might see more companies that depend on security shutting down, or at least shutting down their online activities. Banks, stock trading, crypto exchanges, other enterprises that handle money, where hacking would be lucrative.

[–] [email protected] 3 points 7 months ago

There are several known instaces of crypto exchages getting hacked.

[–] [email protected] 4 points 7 months ago

There's a concept of acceptable levels of risk. Companies are not going to shut down out of fear, or miss out on the business opportunities of online presence. There's money to be made.

Even with things as serious as spectre allowing full dumping of CPU and RAM contents simply by loading a website, I can't think of a single company that just said "well shit, better just die".

Serious, potentially business ending, security issues usually have a huge amount of effort when discovered put into mitigations and fixes. Mitigations are usually enough in the immediate "oh shit" phase. Defense in depth is standard practice.

[–] [email protected] 7 points 7 months ago

I don't think you need to worry about backdoors with most of those. Worry more about unfixed security holes due to an extreme emphasis on "stability" as in using old versions when fixes have already been released when it comes to anything hosted by large companies.

[–] [email protected] 12 points 7 months ago (4 children)

We don’t know. However, no one cares about your personal photos ; no one will ever attempt to hack you specifically unless you’re a high value target (in which case, stop hosting your photos anywhere immediately)

The only thing that could get your photos is if an undiscovered backdoor is exploited by someone doing some sort of a mass attack. As far as I know, they’re pretty rare, because people with the means to do them generally have a specific set of people they care about (which you are unlikely to be a part of).

[–] [email protected] 2 points 7 months ago

My ssh auth logs show a lot of login attempts from chinese IPs. That prompted me to install Fail2Ban..

[–] [email protected] 8 points 7 months ago (1 children)

no one will ever attempt to hack you

My brother in Christ, how do you think botnets get built?

[–] [email protected] 4 points 7 months ago

They did say specifically. I think bothers are usually automated attacks.

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago) (1 children)

unfortunately, mass attacks happen all the time. if you ever had access to the authentication logs of an SSH server with an unfirewalled port 22 into the internet that has been running for a few months, you would see international IPs starting port scans and brute force attacks. there is always someone out there trying to hack random IPs. it's fucking wild west out there.

[–] [email protected] 4 points 7 months ago

Yeah. I'd recommend using ssh keys and disabling password authentication whenever something is exposed to a public network

[–] [email protected] 13 points 7 months ago (1 children)

We don’t know. However, no one cares about your personal photos ; no one will ever attempt to hack you specifically unless you’re a high value target (in which case, stop hosting your photos anywhere immediately)

To those assumptions I would say : we don't know. Personal vendettas do exist and we cannot look into the minds of individuals going crazy neither.

[–] [email protected] 5 points 7 months ago

That fair enough I guess, really depends on what kinda personal photos you have. I know people are worried about revenge porn, I personally think the only actual remedy is not having any porn of yourself anywhere unless it’s your job 🤷🏻‍♀️

[–] [email protected] 54 points 7 months ago (1 children)

Self hosting personal photos doesn't generally require opening anything up to the internet, so most backdoors would not be accessible by anyone but you.

[–] [email protected] 17 points 7 months ago (1 children)

Or someone who has penetrated your network.

load more comments (1 replies)
[–] [email protected] 19 points 7 months ago

you don't and will never will. I would recommend reading a lecture by Ken Thompson the co-creator of Unix for more details on this https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf

[–] [email protected] 12 points 7 months ago

Good question. I have asking myself the same thing as well. In case of ssh it is possible to use 2FA with a security key, which is something I'd like to put in my todo.txt

load more comments
view more: ‹ prev next ›