
are you affected?
- is your sshd running on musl? (alpine, openwrt, buildroot, yocto)
- is it not using pam? alpine’s openssh-server doesn’t by default, or maybe you set UsePAM no
- are password logins still on? they are by default
- is there an account with just * as its password? key-only users, ldap users, root on alpine
- and some other account with a real password?
- then that * account takes any password between 257 and 1024 characters
on alpine’s official aws and azure images that’s the default alpine user, and it has passwordless doas. so it’s root
on debian, ubuntu, fedora or anything else with glibc? going through pam? dropbear? openbsd? you’re fine
Jesus Christ. Why?! How?
Edit: I can’t figure out how to upload gifs to Lemmy… please imagine
castle-nathan.gifcastle-nathan.gif
I don’t know why, but I always assumed that image was from Firefly. It’s the same color shirt and everything!
There are a lot of references to Firefly in Castle. It’s quite entertaining.
Me too
did you get hacked? check.
$ grep “Accepted password” /var/log/messages
That’s a really bad check unless you have an external box receiving logs and you’re looking there, because the first thing that a sophisticated attacker is going to do if they get in as root is remove the signs of their presence.
I’m no cybersecurity expert, but from what I’ve heard from those who are, this is the new normal as anyone who formerly had no chance due to being a “script kiddie” can now just prompt an AI* to eventually find a vulnerability.
* oversimplification redacted
You’d think that but so far I haven’t seen an actual PoC exploit for the PHP vulnerability that doesn’t require misconfiguring the server. And this is over a week after the patches were released.
The way it works is that finding vulnerabilities required a lot of technical understanding and mental effort. A software could have a glaring hole in it for years without anyone finding out simply due to nobody really looking. AI just gives you the ability to do rudimentary exploit analysis around the clock without having to spend your own time. This is a wake up call to anyone making software in sloppy fashion.
But it isn’t quite as easy as saying “AI hack into this service”, if the person doing the hacking is using the same model as the person who made the service, and that person already asked the AI to do that and fixed the resulting exploit prior to release.
Even projects that use AI in a limited fashion to code or even not at all, often use AI to at least do some red team stuff prior to release.
I don’t really foresee any way this doesn’t even out eventually.
I’m assuming this is only if you allow password authentication? If you’re only allowing certificate based auth you should be safe, right?
NO! Exactly the opposite, that is the problem. Key-only is a prerequisite for this.Edit: see also, the first thing that pops up under the link.I was wrong, see below.
The linked article literally says you need password login enabled at the ssh level. The account however needs to not have a password set
Ah. Thanks for the correction. The intro + where I originally learned this from made me overreact a bit, it seems.
That website is atrocious. It’s the web design equivalent of shoving five kilograms of sugar and whipped cream in a cup of coffee.
Now, now. Starbucks is a very successful business.
Yes, it was a stroke of genius to label their mediocre confectionery as “coffee”, although it can lead to near fatalities when someone who’s only ever had Starbucks encounters real coffee for the first time.
Still, my point stands. That website is like 20% useful content, 40% flair, and 40% wasted space.
“Cyber” ppl love to do this. This is basically their resume I guess? They have to sensationalize absolutely everything they can (not that this isn’t an important bug, but this could have been a 1-2 page white paper imo (like many of them))
I wouldn’t recommend deploying any ssh server without reviewing the config and believe sane defaults are sane.
Most containers don’t run ssh right?
OP I know you’re trying to do good, but please try to understand the vulnerability before spreading FUD
Yeah fair, sorry about that. The intro + where I originally learned this from made me overreact a bit, it seems.
If I’m running containers on Alpine, doesn’t that mean that they already don’t offer SSH (sshd)? The entire point of Alpine as a base is to not add stuff you don’t need.
Why
I’ve been setting
UsePam = nofor decades because leaving it on meant that it’d still present a password login of keys failed. Is this still the case, was I wrong from the beginning, or is this somehow ok?I’m not following. Are you saying you login with ssh keys and not the password, but leave “UsePam = no” so then if ssh fails you don’t have a pam error?
It’s been years since I was experimenting, trying to set things up properly, but at the time I could swear that I’d have the following set:
PubkeyAuthentication yes PasswordAuthentication no UsePam yesand attempts to SSH into the system would still result in a password prompt, even though
PasswordAuthenticationwas set tono. After some experimentation, I found that if I setUsePamtono, you wouldn’t get a password prompt, so that’s what I’ve been doing on every SSH server I’ve had since like, 2000.Tinkering with it now though, I see there’s also another directive,
KbdInteractiveAuthentication, which when set tono, will ensure I don’t see a password prompt even whenUsePamis set toyes. I can only assume that 26ish years ago there was noKbdInteractiveAuthentication, or I just didn’t know about / notice it!Well no harm done in my case anyway, as I don’t generally expose SSH servers to the outside world anyway. But it’s good to know that I don’t have to turn off PAM to disable password logins anymore.
Why would a local server even have open internet access though?
This alerts feel more relevant for public facing servers.
The only container i have that has a reachable SSH port is forgejo, and even then it’s only local traffic and i’d have to check if it even uses alpine. All others also don’t have SSH enabled.
The vulnerability doesn’t seem too bad tbh.
How is crashing on an unhandled path in a security context not better?!
People use * as an account password, or sysadmins allow that? I’d never allow that on any system or service of mine. No surprise, like most of these LLM discovered issues in the media lately, it hasn’t come up before. 💯 Good they’re getting fixed, but nothing so far has really been that urgent to fix for me.
No,
\*is being put as a hash of a password, originally precisely because that would mean no actual hash (over any input) ever matches it.Ah got it, so is that a hack to prevent a specific user from logging in rather than something like:
Match User <username> PasswordAuthentication no





