News for hackers. Stuff that matters.
Re:Abusing Ubuntu 24.04 features for root privilege escalation by HumanOstrich on Thursday November 14, 2024 @11:08AM (#42137583)
Err, why? Nothing is actually broken with Ubuntu 24.04. The issue GP is describing is just a lack of understanding of how config files have worked on Linux for decades.
Re:Abusing Ubuntu 24.04 features for root privilege escalation by Brian_K_White on Thursday November 14, 2024 @12:00PM (#42138223)
Actually ubuntu and/or some cloud integrator is violating principle of least suprise, which predates by even more decades and applies everywhere not just in a computer operating system.

Having /etc/ssh/sshd_config not do what it appears to do is inexcusable, however that comes about.

Even if the fix is no more than structuring the file a little differently so there are parts both before and after the .d loading, and comments that say what overrides what, and all the actual config files and default behavior are still the same.

Re:Abusing Ubuntu 24.04 features for root privilege escalation by HumanOstrich on Thursday November 14, 2024 @12:52PM (#42138960)
That's just not how it works, and it never has. One of the main purposes of the .d files is to avoid modifying the distro's sshd_config file, so you don't have to resolve conflicts during an OS upgrade. Commenting your overrides in the sshd_config? That's backwards.

Downstream distros sometimes want to override the default settings. That's what .d is for. It doesn't violate the dogma "principle of least surprise", especially if you run `man sshd_config` and learn the first thing about sshd's config files.

Re:Abusing Ubuntu 24.04 features for root privilege escalation by Brian_K_White on Thursday November 14, 2024 @08:24PM (#42143101)
Child,

"That's just not how it works" Incorrect.

"dogma "principle of least surprise"" That is not dogma, it is a principle. It's right there in the name.

Dogma might be the understanding that the principle of least suprise is a valid principle.

But this suggests you don't subscribe to this silly "dogma" eh?

Re:Abusing Ubuntu 24.04 features for root privilege escalation by HumanOstrich on Thursday November 14, 2024 @11:34PM (#42143994)
Child? Do you condescend based on principle or dogma? ¯\_(ツ)_/¯
Re:Abusing Ubuntu 24.04 features for root privilege escalation by Brian_K_White on Friday November 15, 2024 @11:25AM (#42148358)
Well, I don't know anyone else who scoffs at that.

I also don't know anyone else who would assume that others don't know "how this has always worked" except someone who only learned themselves last week and think they know a lot now.

I didn't say anything about adding comments as an end user. My point about comments was that least suprise could be resolved trivially without even changing the existing desired behavior, by nothing more than the OS shipping a default sshd_config that was structured so that it clearly had a section that will be overridden, and a section that will override, which requires nothing more than a few comments.

Re:Abusing Ubuntu 24.04 features for root privilege escalation by HumanOstrich on Friday November 15, 2024 @02:54PM (#42150264)
There isn't a comment specifically saying that including more config files can override values, so I'll give you that. However, it does have comments explaining exactly how to override default values. It looks like what the OP of this thread is attempting should work unless they messed up something else.

I'm looking at a couple sshd_config files on my servers, and the Include directive for the overrides is the first non-comment line in the file.

Having that Include be first means that changing any settings in the sshd_config file will override anything set by sshd_config.d/* files.

What in the heck are these people doing to break their config? There really is no legitimate issue here.

Re:Abusing Ubuntu 24.04 features for root privilege escalation by DaSHacka on Thursday November 14, 2024 @11:25AM (#42137793)
Any sufficiently poorly constructed system is indistinguishable from a legitimate vulnerability.

You shouldn't need to edit an undocumented file that's force enabling an insecure authentication method in the first place.

"You're using it wrong" doesn't change the fact that the defaults are poor and likely to ultimately cause more devices to be improperly configured than if it was left as sysadmins and end-users expect.

Re:Abusing Ubuntu 24.04 features for root privilege escalation by HumanOstrich on Thursday November 14, 2024 @11:45AM (#42138020)
They likely chose the option to enable password-based SSH authentication during installation [1], or it's a cloud service that provisions servers with a password.

I've been looking for info about whether it's force-enabled with a vanilla install where the user doesn't actually choose for it to be enabled. I'm happy to be educated here.

[1]: https://askubuntu.com/a/1440509