You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): support .NET Standard library obfuscation (#31)
* Add types in referencing assembly to netstandard DLL.
Types defined in AssemblyRefs of netstandard (e.g. mscorlib) will be moved to netstandard. Therefore, subsequence ModuleDef.Find will return AssemblyRef to netstandard. As a result, the confused module will only reference to netstandard.
* Remove AssemblyAttributes.PA_NoPlatform from assembly.
Net standard project may refer to NuGet package (e.g. System.ComponentModel.Composition) in order to use the Framework libraries. However, DLL in NuGet may have this attribute set but the actual Framework DLL does not. As a result, dnlib treats them as different assemblies and confused DLL will reference to two identical assemblies.
* Fix assembly reference to assemblies that hidden by netstandard assembly.
TargetModule.GetAssemblyRef returns null if type is defined in assembly hidden by netstandard. This change searches assemblies hidden by netstandard and returns the fixed type reference.
* Returns the method from CorLib of module to be confused instead from runtime.
MSBuild may runs on .net framework and runtime help will reference to mscorlib instead of netstandard. This change try resolve it from CorLib before from runtime type.
---------
Co-authored-by: KC Ip <kamchuen.ip@hidglobal.com>
0 commit comments