WhyNot?

root means suid

Category: Software
Responses: 2 (1 in support, 0 neutral, 1 in opposition)
Number of views: 502
Tracking: Track this idea
Community Rating:Average AverageYour Rating:

One of the gotchas of computer security for (corporate) networks is the risk of privilege elevation from running someone else's code.

Let's say you have a user, Malice. Malice is a pleasant and knowledgable user who writes small programs for their own use. You might try a program under an ordinary user account, just to see what it does, and it doesn't misbehave. No attempts to do anything suspicious. It looks safe. Sucker!

As soon as you run the code as root, it detects the uid and adds a backdoor into the system, then covers it's tracks. Bait-and-switch!

Of course, you'd never trust a user like that, would you? Or a supplier, or a consultant, or a boss, or ... You get my point. Whenever you run code belonging to a lower-privileged user, you risk a privilege elevation. Trust no-one.

Unfortunately, life being what it is, you will let your guard down and run something when you shouldn't. What you need is a bit of safety built into the computer.

The idea: Whenever root - and only root - runs a program or script, the program/script is treated as if it were suid. This way, if you run someone else's code as root, your godhood is revoked while the code is run. No mess, no fuss.

This idea can be extended to more complicated (e.g. MS) schemes by substituting the rule "If the user has a higher privilege level than the code-owner, then suid." or "If the user has a higher privilege level than the lowest-privilege user who can/did write to the file, then suid.".

nihil, Aug 06 2005

What do you think of this idea or comment?
(You can change your vote at any time)

agree I agree no opinion No opinion disagree I disagree

Users who liked this idea also liked:

Other ideas in category (Software):

Vector Datatype (2 votes) Average
Software Formula for 2000 Years (2 votes) Average
Attachment Notation (124 votes) Very strong
Fight Recognition Software (2 votes) Average
Triangular Pixels (3 votes) Average
Forwarding sent email message (3 votes) Average
Compiler Security Optimization (3 votes) Average
mute a web page (8 votes) Strong
Organise the Start menu (6 votes) Average
Simple Shared Key Setup (1 votes) Average
DDR-style piano software (4 votes) Average
root means suid (2 votes) Average
Scorchware (2 votes) Average
Six Degrees of Computation (2 votes) Average
X-drive ==> 2 physical drives (3 votes) Average
Fast parallel secure hashing (1 votes) Average
Cascading search (1 votes) Average
Standardized EULA (2 votes) Average
Make Photo Slideshow yourself (2 votes) Average
Searching for images (3 votes) Average
Description field for email (3 votes) Average
Honeypot feedback/automation (1 votes) Average
Audio bass and treble (3 votes) Average
Extension that highlights tags (1 votes) Average
Upper-lower case (2 votes) Average
New image file format (2 votes) Average
Encryption (2 votes) Average
dual scroll bars (6 votes) Average
Tabbed Working (3 votes) Average
Temporary file highlight (5 votes) Strong
Better Search Engine Links (2 votes) Average
Smarter Programming (5 votes) Strong
Linux Distro for Business (2 votes) Average
File multiple rev eliminator (3 votes) Average
Mech. Design Software (2 votes) Average
Checking email addresses (3 votes) Average
Why Powerpoint? Be nonlinear (6 votes) Strong
Chat with iTunes Listeners (2 votes) Average
Studying leaf patterns (2 votes) Average
Ebay database (2 votes) Average
Encrypts the whole OS (2 votes) Average
Wind offset for car (3 votes) Weak
Collaborative License Rating (4 votes) Average
Multiscopic image modeler (2 votes) Average
Simple fix for posting here (1 votes) Average
Torrent-based podcasting (2 votes) Average
Browser Preloads Next Page (4 votes) Average
Officepets (3 votes) Average
Salty encryption (1 votes) Average
Self Authentication & Decryptn (1 votes) Average
Ductile disk encryption (2 votes) Average
Invention Management Software (3 votes) Average
Printing Cost per Page (1 votes) Average
Community Font Classification (1 votes) Average
Ubiquitous virtual honeypots (7 votes) Strong
MS Outlook spouses (1 votes) Average
MS Outlook Contacts updates (1 votes) Average
One card for the wallet (11 votes) Strong
Camera as A4 Scanner (6 votes) Strong
Ogg/PCM (3 votes) Average
Keyboard equivalents (1 votes) Average
OS for visually impaired (4 votes) Average
Window Size Limiter (1 votes) Average
Print Police (1 votes) Average
MS Outlook Highlighter (1 votes) Average
Eye-Tracking Video Drivers (2 votes) Average
Linipedea (3 votes) Weak
MS Word Bookmarks & Summaries (3 votes) Average
anti-virus T-cells (2 votes) Average
savable scroll bars (2 votes) Average
save changes dialog options (3 votes) Average
Viral Marketing in Open Source (7 votes) Weak
Microsoft CD Bug Fixes (4 votes) Average
Virtual Scanner Software (5 votes) Average
Economics Simulation (6 votes) Average
Better Shrink Wrapped License (3 votes) Average
Bayesian learning for (4 votes) Average
enclosures (2 votes) Average
Chat Prog & Problem Solving (2 votes) Average
Comments from other members:

Add your comment

I guess I don't understand the terminology being used here, but I thought that "suid" stood for "super-user ID"-- in other words, "root". So, is this a Unix command, or is it general computing terminology?

Anyway, it sounds like a reasonable precaution.

dumllama, Aug 08 2005

dumllama: suid = set user id

First off, this wouldn't help. It'd be trivial for the program to seteuid() back to its real user id — that is, root. Unprivileged processes are allowed to set the effective user id back to the real user id.

Second, it'd cause problems --- assumably, you ran the program as root for a reason. Maybe to listen on a port < 1024, maybe to access a file only root can, whatever. That'd break.

Third, it seems rather pointless. How do you accidentally run a program owned by someone else? No one else should be allowed to modify directories in root's PATH, so they can't put it there in the first place. If other have write access to those directories, you have bigger problems.

derobert, Apr 15 2007

This already exists and any good system administrator can implement it on code that you never want to run as root.

Take any service account like foouser

And take any program like foobar

Make the service account own the program

chown foouser foobar

Now set the UID bit for execution on foobar (and the execute permissions)

chmod 4755 foobar

Your idea was great, but it was originally introduced in Unix over 35 years ago. The people who normally have root dont necessarily know how to use it. So the real idea is educate system administors to do things like you recommend to proactively avoid problems .. like that is ever gonna happen ...

zenmaster, Dec 29 2007