logoalt Hacker News

orangeatoday at 3:36 AM3 repliesview on HN

Why would an adversary being able to execute code as root on a personal computer be a bigger threat than their being able to execute code as non-root? Surely just about any of the stuff that a malicious hacker might want to do to someone's personal computer can be done without root... right?


Replies

HarlequinHairtoday at 3:44 AM

There are substantial differences.

For one, as non-root user you are tied to the permissions system and can't access most of the data. If one of your services (let's say sql) get hacked, they are tied to sql user, and unless the achieve privilege escalation, they can't mangle with other services data (eg webserver).

Also network wide, a non-root user can't use different protocol than tcp and udp. The only reason you can ping as a regular user is because of the setuid on the ping program, otherwise icmp is not allowed to non-root users.

There are of course other reasons, but these are some examples on how it would be different.

show 1 reply
SmasherEpileptitoday at 3:52 AM

With a user shell, I can grab their browser data, personal documents, and try to set up persistent background daemons that listen on programs and do keylogging/screenshotting (harder on Wayland than it was on X11).

With root, I can read all program memory, try to extract decryption keys for encrypted filesystems, modify the kernel, punch open backdoors, modify any arbitrary program, read all user files, etc.

A notable extra issue is the rise of AI agents, which often eagerly test the boundaries of every sandbox they are placed within. I would not run an AI agent as root, nor would I give it full access to a rootful container runtime.

show 1 reply
myaccountonhntoday at 3:45 AM

I run all agents as a different user for this reason.