23 points

An article about tweaking sudo without insults?

permalink
report
reply
20 points

This incident will be reported

permalink
report
parent
reply
3 points

Guru meditation number: 73564804

permalink
report
parent
reply
13 points

Insults is a bonus after tip 7

permalink
report
parent
reply
4 points

Oops guess I didn’t read far enough ;)

permalink
report
parent
reply
6 points

Please stop the blogspam. Nobody wants to see yet another shitty list.

permalink
report
reply
27 points

bu-bu-but number 4 will shock you!

permalink
report
parent
reply
5 points

You are right. I expected to see a boring list of most frequently used options from /etc/sudoers, but WOW! The author is very brave guy!

permalink
report
parent
reply
6 points

Step 1. install opendoas

permalink
report
reply
-14 points

I.e. how malware could easily catch your Sudo password without root access.

Peeps, bad news, Linux is damn insecure.

By simply placing an alias in your bashrc they could already grab your sudo password.

Another bad news, this Windows “okay” Button without any password is actually more secure.

permalink
report
reply
12 points

I.e. how malware could easily catch your Sudo password without root access.

Peeps, bad news, Linux is damn insecure.

By simply placing an alias in your bashrc they could already grab your sudo password.

Another bad news, this Windows “okay” Button without any password is actually more secure.

In other words: a compromised system at the User level can easily compromised at the admin level if there are no additional checks/measures in place. Same for Windows. Just change the link to a Programm you commonly need the press OK to to you maleware. Profit.

permalink
report
parent
reply
3 points

The proper way to handle issues like these is process level permissions (i.e. capability systems), instead of user level. Linux CGroups, namespaces, etc. are already moving that way, and in effect that’s the way windows is trying to head too. (Windows has its own form of containerization called AppContainers, which UWP apps use. Windows also has its own capability system).

permalink
report
parent
reply
5 points

Either you’re trolling - in which case, sod off back to Reddit - or you have a woeful misunderstanding of how Linux user permissions work.

Please explain how someone might “simply change” someone else’s .bashrc without either already having access to that user account, or root access on the whole machine?

permalink
report
parent
reply
5 points
*

The idea is malware you installed would presumably run under your user account and have access. You could explicitly give it different UIDs or even containerize it to counteract that, but by default a process can access everything it’s UID can, which isn’t great. And even still to this day that’s how users execute a lot of processes.

Windows isn’t much better here, though.

permalink
report
parent
reply
1 point

If you containerize, the application (malware) will run under the user configured in the image, unless you override it, and in a separate mount namespace, unless you change that, which makes the “alias sudo” trick extremely unlikely.

Even running under a separate user anyway prevents almost fully the attack you mention, unless the separate user has root privileges or the DAC_OVERRIDE capability is assigned to the binary (assigning it requires CAP_SYS_ADMIN).

In short, the attack you mention is a common persistence and privilege escalation vector, which is relatively easy to detect (watch for changes to shell profiles), although preventing it requires some care. I just want to point out that in single-user machines (e.g. personal computers) escalating to root is anyway fairly unnecessary, given that all the juicy stuff (ssh keys, data, etc.) is anyway probably running under/owned by that user.

permalink
report
parent
reply
0 points

Regarding Windows all I read is that this “admin permission dialog” is launched in some form of sandbox where no software can access it. Not sure about faking input devices though, and I am also not promoting Windows for Security

permalink
report
parent
reply
1 point

Nearly all tools (with flatpak and portals progressing into better directions but probably never finished) have rw permissions everwhere.

The modern OS threat model is not other users, as private users mostly have single user systems. It is malware and software doing nasty things.

On Linux this always worked out somehow, but grabbing your sudo password is not hard, just alias sudo to a script reading your argument, reading your password, and piping the password to the real sudo. You dont even notice it but that script just got your sudo password.

Dont know what Reddit has to do with that

permalink
report
parent
reply
1 point

It’s not about someone, it’s about something. A lot of us aren’t (only) using Linux as a server OS, but for desktop too, and desktop usage involves running much more different kinds of software that you simply just can’t afford to audit, and at times there are programs that you can’t choose to not use, because it’s not on you but on someone on whom you depend.

Then it’s not even only that. It’s not only random shit or a game you got that can edit your bashrc and such, but if let’s say there’s a critical vulnerability in a complex software you use, like a web browser, an attacker could make use of that to take over your account with the use of a bashrc alias.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

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

Community stats

  • 8.4K

    Monthly active users

  • 6.3K

    Posts

  • 172K

    Comments