Net Core Linux Vulnerability: Windows User Impersonation

There are several useful resources available for ASP.NET Core app deployment, including dotnet publish, hosting on Windows with IIS, the ASP.NET Core Module (ANCM), and Visual Studio publish profiles (.pubxml).
Moreover, Windows Authentication (which includes Negotiate, Kerberos, and NTLM authentication) can be configured for ASP.NET Core apps hosted on IIS, Kestrel, or HTTP.sys. This type of authentication is particularly useful for servers running on a corporate network, where Active Directory domain identities or Windows accounts are used to identify users.


Solution 1:

By using unconventional thinking, I found a solution that involved utilizing SharpCifs.Core for CIFS access and the Microsoft PowerShell SDK to establish a remote PowerShell session and retrieve environment variables. It would be beneficial if Microsoft developed more robust cross-platform tools.


Solution 2:


The Mono project offers a wrapper for various Linux commands, including seteuid, which is used for impersonation. You might want to check out the Mono.Posix.NETStandard NuGet package, which is expected to be updated in the upcoming .Net 5 version. I’m uncertain if it will meet your requirements though.

Frequently Asked Questions

Posted in Uncategorized