wr
hn
Top
New
Best
Ask
Show
Jobs
Back
p
program9
Joined 8 years ago
Karma
9
Submissions
3
Member since
Nov 26
View on Hacker News
Recent submissions
Comment · 5 years ago
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 · 5 years ago
People will pay for that
Comment · 8 years ago
No -- downstream devs are responsible for the safety of their own apps, users, and org.