Better HN
topnewbestaskshowjobs
Log inSign up

program9

9 karma · joined Nov 26, 2018 (8y ago) · 3 submissions

Submissions

comment 5y ago · link · parent

I've worked on apps like this, and I didn't know or care which user was going to use the features requiring elevation. So I couldn't manage permissions per user. My approach to security was to simply limit the input (method parameters usually) from the unprivileged process. For example, not letting the client send arbitrary commands to execute, use filesystem path whitelists, only elevate when required, etc. If the privileged code uses a resource, and that resource can be changed/replaced by an unprivileged user, then the privileged code can be manipulated. Like a Registry key in HKCU for example, or a file in a user's AppData folder. Using enums as method parameters for privileged code helped me avoid some obvious vulns I might've otherwise created. I've definitely done it the wrong way before. It can be tough.

comment 5y ago · link · parent

People will pay for that

comment 8y ago · link · parent

No -- downstream devs are responsible for the safety of their own apps, users, and org.