When using System.Diagnostics.Process in C#/.NET, the Process HANDLE you receive is PROCESS_ALL_ACCESS. This can allow an external application to steal the HANDLE and have full access rights to the target process and abusing the trust relationship.
As seen here, .NET just defaults to full access: https://referencesource.microsoft.com/#system/services/monitoring/system/diagnosticts/Process.cs,167
How can the permissions be reduced on the Process HANDLE? Is creating a new Process class using unmanaged code using calls to openprocess() how it should be done? Or reflection?
Thanks!