I'm trying to find all applications that rely on outdated.NET Framework versions. For instance, on a client environment, they have .NET Framework version 1.0 enabled in their registry. This is from 2002 and is horribly vulnerable with multiple CVEs of 9.3, security-wise. Same for .NET Framework 2.0., possibly 3.0.
.NET is one of the most vulnerable applications via CISA, and this issue consistently pops up across multiple clients. I want to remove these outdated Framework versions, but I've read that applications built using those older versions may not be able to switch to newer versions, so it could break very important applications that are needed to save lives and require 100% uptime.
I've tried tasklist /m "mscore*" as a cmd command to return applications currently being executed via the .dll engine. So it only returns running applications, and it also doesn't tell me which versions of .NET Framework are used on the running applications. There is also no mscorlib.dll version in either the 3.0 or 3.5 directories.
I can also do this simply with ProcMon, but I face the same issue: this will only tell me the active and running processes
I've tried using a C# script using ICorPublish interface, but this also just returns PIDs, so it also relies on the application running.
ICorPublishProcess process;
process = publish.GetProcess(PidToCheck);
if (process == null || !process.IsManaged)
{
return "Process managed by .NET"
}
else
{
return "Process not managed by .NET."
}
I can find all installed versions of .NET Framework easily enough via: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
However, I can't find anything regarding how to find all applications--with running processes or not running--that have dependencies on specific .NET Framework versions.
Is there a way to find applications that aren't currently running that are reliant on older .NET Framework versions to function?