Hot answers tagged

100 votes
Accepted

Why is root security enforced but $HOME typically unprotected?

I'm going to disagree with the answers that say the age of the Unix security model or the environment in which it was developed are at fault. I don't think that's the case because there are ...
Blrfl's user avatar
  • 1,618
90 votes

Are most Linux systems that allow non-root users to execute code straightforwardly rootable?

No, this is not correct. While one may argue about the relative difficulty of finding and exploiting 0day vulnerabilities on Linux when you have local access, the security architecture itself of a ...
forest's user avatar
  • 66.3k
62 votes
Accepted

Ability To Change Root User Password (Vulnerability?)

You pretty much hit the nail on the head when you said that you need physical access to the machine. If you have physical access, you don't need to go through the official steps to reset the root ...
Ghedipunk's user avatar
  • 5,990
56 votes
Accepted

Why do companies not give root access to employees on their desktop machines?

Security administrators are responsible for your machine and what happens on your machine. This responsibility violates the basic security model for a single-user Unix machine because the admin (an ...
schroeder's user avatar
  • 127k
55 votes

Why is root security enforced but $HOME typically unprotected?

Because the UNIX-based security model is 50 years old. UNIX underlies most widespread OSs, and even the big exception Windows has been influenced by it more than is apparent. It stems from a time ...
Kilian Foth's user avatar
31 votes

Why is root security enforced but $HOME typically unprotected?

This is a highly astute observation. Yes, malware running as your user can damage/destroy/modify data in your home directory. Yes, user separation on single user systems is less useful than on ...
David's user avatar
  • 16k
28 votes

Ability To Change Root User Password (Vulnerability?)

How is this not a glaring security vulnerability? It is. Physical access to your system is the ultimate vulnerability. Is there a way to disable this 'feature' so that it cannot be changed from ...
DevSolar's user avatar
  • 911
26 votes

Are most Linux systems that allow non-root users to execute code straightforwardly rootable?

To rephrase the quote - Privilege escalation vulnerabilities have existed and will continue to be found or created. During the last week we have this little doozy in SystemD; what are we going to ...
James Snell's user avatar
25 votes

Why is root security enforced but $HOME typically unprotected?

The original design of Unix/Linux security was to protect a user from other users, and system files from users. Remember that 30-40 years ago, most Unix systems were multi-user setups with many ...
Steve Sether's user avatar
  • 21.6k
25 votes

Why do companies not give root access to employees on their desktop machines?

A few reasons off the top of my head: ARP poisoning or network flooding attacks on the network would generally require root access to a machine on the network. Being able to install unauthorised ...
me_and's user avatar
  • 427
14 votes

Docker runs container processes as root - should I be worried?

I assume you are concerned about containerized applications running as root. root in container is a risk. It still interacts with the kernel as root. And if an application manages to break out of ...
mviereck's user avatar
  • 379
14 votes

Are most Linux systems that allow non-root users to execute code straightforwardly rootable?

Exploiting a privilege escalation vulnerability is already hard enough, doing so while being certain that you don't leave a trace is much much harder. An Android user trying to root their phone can ...
Dmitry Grigoryev's user avatar
12 votes

Why do companies not give root access to employees on their desktop machines?

This answer is not meant to contradict the existing answers, but rather supplement them because it's too long for a comment. Part of the reason is (as others have alluded to) that users can't be ...
Jared Smith's user avatar
  • 1,988
10 votes

Why is root security enforced but $HOME typically unprotected?

Is there no way to prevent malicious code happening in $HOME? To answer this question, what some installations do is make use of the existing security framework by making a user specifically to run ...
JoL's user avatar
  • 242
10 votes
Accepted

/opt and sudo unzip to /opt, is it safe?

Yes, it is safer to run unzip without root permissions and then move the extracted contents to their final destination. However, if you suspect that the file which you are providing to unzip is ...
forest's user avatar
  • 66.3k
8 votes

Why is root security enforced but $HOME typically unprotected?

To answer the second part of your question: There are sandbox mechanisms, but they are not enabled by default on most linux distributions. An very old and complicated one is selinux. A more recent and ...
allo's user avatar
  • 3,382
6 votes
Accepted

No password root accounts of an entire laboratory!

Oh dear. Sorry, but you goofed. You made a technical mistake and a legal mistake. You may be in trouble. Act carefully. The legal mistake is that just because you can take control of a machine, doesn'...
Gilles 'SO- stop being evil''s user avatar
6 votes

Possible Security threats and mitigations while accessing `/root` through any browser?

The issues are that anyone on your system will be able to maliciously elevate themselves to root privileges. Doing either of these things is a very bad idea. To address your specific scenarios: ...
forest's user avatar
  • 66.3k
5 votes

Are most Linux systems that allow non-root users to execute code straightforwardly rootable?

I think "straightforwardly" means "without human tricks and other social engineering". So the answer is - Yes, if the systems contain unpatched 0-day that leads to privileges escalation. It could be ...
odo's user avatar
  • 692
4 votes
Accepted

Root access without password

can I enable root access just by using ssh keys and be safe This depends on how well you protect the private key belonging to the authorized public key. I see no problem that somebody might brute-...
Steffen Ullrich's user avatar
4 votes

How to properly protect /home with separate user accounts on Linux

If you gave the program root access, you can't prevent it from accessing your account. (By “root access”, I mean “the highest level of privileges”. It's possible to run programs as the user root ...
Gilles 'SO- stop being evil''s user avatar
4 votes

Why do companies not give root access to employees on their desktop machines?

AFAIK, there are 4 main reasons not to give administrator access to standard users on their desktops: protect the machine itself (not always very efficient) and the other machines on the network from ...
Serge Ballesta's user avatar
4 votes

Why is it not recommended to permanently use the root account for all tasks?

You can consider this recommendation as a road sign that warns you about icy road. It does not prohibit you from driving fast. It just warns you that many people who drove fast had accidents. If you ...
mentallurg's user avatar
  • 12.2k
4 votes

Root detection can be bypassed using Magisk hide: how to mitigate?

SafetyNet's hardware-backed attestation hasn't been defeated yet and the way it works, it is infeasible to defeat it by software. Universal SafetyNet Fix Magisk module downgrades evaluation type to ...
defalt's user avatar
  • 6,731
4 votes

Security implications of rooting a SmartTV (LG)

but a TV has a limited functionality. A SmartTV is not so much different from a normal computer or smartphone. The limits of the TV are mostly based on the software and on the hardware. Especially it ...
Steffen Ullrich's user avatar
4 votes
Accepted

Privilege escalation through arbitrary file delete

A great candidate is anything in a directory with the "sticky" bit (typically /tmp and /var/tmp). The sticky bit on a directory causes files to only be renamable or deletable by their owner (...
CBHacking's user avatar
  • 45.4k
3 votes
Accepted

Prevent program from switching to user without password

...su -c ... theuser asks for teuser's password which is strange,... There is nothing strange about this but this is exactly how su is supposed to work. It might be useful to make yourself more ...
Steffen Ullrich's user avatar
3 votes

Why is root security enforced but $HOME typically unprotected?

The presumption that the wrong data is being protected is false. Protecting root activities does protect your vacation pictures from 2011. And mine, and your brothers', and everyone else's who uses ...
Aaron's user avatar
  • 178
3 votes

Preventing users from bypassing root/jailbreak detection measures

Some of the methods in this project -- https://github.com/scottyab/rootbeer -- are advanced-enough for most needs. However, r2frida and many other reversing methods will likely find a way around even ...
atdre's user avatar
  • 19k
3 votes

How do I create an invisible and persistent user on linux?

It rather depends what you mean by "invisible". It's not really possible to change the behaviour of the system and leave no detectable trace. All you can do is make it harder to find those traces. ...
symcbean's user avatar
  • 18.5k

Only top scored, non community-wiki answers of a minimum length are eligible