News for hackers. Stuff that matters.
Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @01:46PM (#23468890)
>Plus, there's still a lot of damage you can do without root access.

That's not really true. An unprivileged user shouldn't be able to take down a production system, or really adversely effect other users. Assuming you have disk quotas enabled, what else could an unprivileged user do?

Re:Is Sudo Almost Useless? by closeparen on Tuesday June 09, 2020 @10:24PM (#23473253)
>An unprivileged user shouldn't be able to take down a production system

Why do these people have shell access to production systems in the first place?

Re:Is Sudo Almost Useless? by mywittyname on Tuesday June 09, 2020 @02:55PM (#23469547)
My line of thinking was theft or data modification.

I have access to this box and it has granted me access to some other system which has useful data, like a database, NFS mount, or S3 bucket. Let me hop in here and grep for something juicy to steal, maybe flip some bits around to fuck with people, or just delete shit.

Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @03:03PM (#23469644)
But an unprivileged user can't do any of that. The entire point of unix permissions is so you can't mess with other users' files unless you've explicitly been granted permission. File owned by, say, mysql are owned by a separate "mysql" user by default.
Re:Is Sudo Almost Useless? by mywittyname on Wednesday June 10, 2020 @09:26AM (#23476731)
If there are readable configuration file sitting around, then it's totally possible to get the credential for other systems. I see this stuff all the time and have leveraged t his fact for troubleshooting systems that I'm unfamiliar with.
Re:Is Sudo Almost Useless? by dependenttypes on Tuesday June 09, 2020 @03:16PM (#23469786)
> theft

You can't steal data unless if you intentionally delete the original after copying, but then that is not really theft as any proper organisation will have backups.

Re:Is Sudo Almost Useless? by Sohcahtoa82 on Tuesday June 09, 2020 @08:18PM (#23472523)
You know what is meant. This kind of pedantry doesn't add to the conversation.

"Theft" is a nice easy word for making a copy of data that you do not have permission to access.

Re:Is Sudo Almost Useless? by mc32 on Tuesday June 09, 2020 @04:40PM (#23470657)
So someone steals a book from a library isn’t theft because they have secondary copies?
Re:Is Sudo Almost Useless? by 0_gravitas on Tuesday June 09, 2020 @06:25PM (#23471647)
A better analogy would be photocopying all the contents of one of the books and putting it back on the shelf
Re:Is Sudo Almost Useless? by Scarbutt on Tuesday June 09, 2020 @01:51PM (#23468945)
DoS attack, ex: consuming CPU or RAM resources.
Re:Is Sudo Almost Useless? by bch on Tuesday June 09, 2020 @01:56PM (#23468994)
That’s a class of attacks that sudo doesn’t even pretend to address. I’m not championing sudo, but consider it as one piece of a “Defense in depth” approach.
Re:Is Sudo Almost Useless? by d2xdy2 on Tuesday June 09, 2020 @02:17PM (#23469171)
I believe the commenter was more talking about giving shells to a daemon than any sudo shenanigans.
Re:Is Sudo Almost Useless? by bch on Tuesday June 09, 2020 @02:30PM (#23469283)
I reread, can see that now. I think the commentor was speaking to a conversation that had shifted. I’ll leave my comment but also vote them up - theirs was a fair point.
Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @03:53PM (#23470173)
cgroups let you limit a user's usage of system resources. Like disk quotas, you need to configure this yourself if this is a threat model you care about, but it comes out-of-the-box with all modern distros.
Re:Is Sudo Almost Useless? by dependenttypes on Tuesday June 09, 2020 @03:18PM (#23469817)
> An unprivileged user shouldn't be able to take down a production system

How about deleting everything under /var/www/?

Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @03:41PM (#23470061)
An unprivileged user can't do that. /var/www/ will be owned either by root, or (by default on debian, depends on your distro) www-data. Your unprivileged user can't modify other users' files, that's the entire point of unix permissions.
Re:Is Sudo Almost Useless? by dependenttypes on Tuesday June 09, 2020 @04:01PM (#23470264)
Given

> >Plus, there's still a lot of damage you can do without root access.

> That's not really true. An unprivileged user

We can see that "unprivileged user" equals to anything that is not root in your post. Considering that definition www-data is an unprivileged user which can delete everything under /var/www/.

So no, what you are saying is not really true.

Re:Is Sudo Almost Useless? by parliament32 on Tuesday June 09, 2020 @04:14PM (#23470385)
But www-data doesn't get a login shell, so it can't[1].

Obviously a user can modify their own files. The idea is if you compromise unprivileged user "scott", with their account, you can't harm other users or the system itself.

[1]easily. Technically it depends, but a hardened configuration would only give www-data permissions to read files its data files in /var/www, not write them (which includes delete), apart from things it actually needs to write like its app logs (and even then you should be using syslog facilities, which only let you write, again not delete or cause any issues). Principal of least privilege and all that. For fun, try to figure out how to ssh into your system as www-data and see the half dozen different roadblocks that come up in your way.