0

I am trying to P/invoke some method from my C# code.

The main process is running in user/system context, but I have some unsafe external code running (using P/Invoke) which might be insecure.

Is there a way to run those method in low integrity mode?

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
Assaf Sapir
  • 154
  • 2
  • 13

1 Answers1

1

Run that code in a different process. You can't use Process.Start(), since that will take the privileges of the current process.

A suggestion is done in this post how to circumvent the Process.Start() issue: How to start a new process without administrator privileges from a process with administrator privileges?

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
  • The process is running user context, but I want the methods run in even lower privileges - low integrity mode - https://msdn.microsoft.com/en-us/library/bb625957.aspx so I don't think your topic edit is also correct – Assaf Sapir Nov 28 '17 at 17:14