Skip to content

Releases: Washi1337/AsmResolver

4.7.0

01 Oct 21:36
23b8143

Choose a tag to compare

New Features

  • C#9.0 Nullable Reference Type (NRT) Annotations for all main packages of AsmResolver (#132, #185, #186, #188, #189).
  • Add implementations for ImpHash and TypeRefHash, which are used by many AV companies and other vendors to identify malware families based on imported symbols and type references (#195, #199, thanks @evandrix).
  • Preservation of names with invalid UTF-8 byte sequences in .NET metadata (#200, #201).
  • String folding in #Strings stream, resulting in smaller output files (#192, #204).
  • Metadata tables and rows are now fully mutable. Rows in a table can now be accessed and updated by reference using the new MetadataTable<TRow>.GetRowRef method.
  • Memory consumption reduced for some of the core reader methods.
  • DefaultMethodBodyReader.ReadMethodBody is now marked virtual (#190, thanks @CursedLand).
  • Add MethodSignature.ReturnsValue convenience property (#183, thanks @CursedLand).
  • Add AssemblyDefinition.HasManifestModule convenience property (b925d5b).

Bug fixes

  • Fixed an issue where an invalid FieldRVA value would crash AsmResolver's metadata parser, regardless of whether EmptyErrorListener was provided in the module reader parameters (#184).
  • Fixed an issue where the TokenAllocator would incorrectly assign tokens to members, resulting in conflicting RIDs being used in the final assembly (#187).
  • Fixed an issue where stack behavior would be computed incorrectly for method calls with a modreq or modopt modifier added to their return type (#193, thanks @zsr2531).
  • Fixed an issue where both the file offset and RVA were incorrectly set to zero for the metadata directory and structures within this data directory (#194).
  • Fixed various custom attribute type name parsing issues regarding whitespaces (af36ad8).
  • Fixed an issue where RVAs in base relocation blocks were not calculated properly (5f07707)
  • Fixed an issue where incorrect GetHashCode implementations were used in SignatureComparer, resulting in random hash codes for some types of metadata members (706f5b0).
  • Fixed an issue where an empty exports directory with zero exported symbols would let AsmResolver believe it is an invalid export directory (b2dde79)
  • Various null checks added and overall stability improvements.

4.6.0

26 May 15:31
c27eb8b

Choose a tag to compare

New Features:

  • Replace IBinaryStreamReader classes with stack allocated BinaryStreamReader structs, reducing memory consumption by up to 40% (#136, #166).
  • Added concept of IFileServices and IInputFiles. This allows for memory mapped I/O on input binaries as well as caching of previously read PE files. This vastly reduces the memory consumption on reading large PE files and resolving dependent dll files (#115, #174).
  • Revisited representation of raw CIL method bodies, which reduces the memory consumption of the reader significantly when dealing with large method bodies that have megabytes worth of code in them (#171, #180)
  • Add rich read/write support for VTable entries in the .NET data directory (#63, #173, thanks @Anonym0ose)
  • Add support for reading PEs and modules from a HINSTANCE / module base address (#177).
  • Add read/write support for function pointer (FnPtr) type signatures (#167, #172)
  • Add shortcut method MethodSignature.MakeFunctionPointerType (655adc8)
  • Add shortcut method BlobSignature.MakeStandAloneSignature (08e510e)
  • Add ManifestResource.GetReader method (#161, thanks @JPaja).
  • Add PropertyAttributes.None (#170, thanks @oSumAtrIX)
  • Add support for unmanaged calling convention method signatures (a58b4c9)
  • Add support for managed entrypoints defined in a separate child module (975bda9)
  • Various improvements in reader and writer diagnostics.

Bug Fixes:

  • Importing corlib TypeDefinitions as signature now properly converts to CorLibTypeSignature instances instead of TypeDefOrRefSignature (#160)
  • Fixed a bug where a NullReferenceException would be thrown when trying to resolve .NET Core dependencies, while running AsmResolver using a .NET Framework host (695235e).
  • Set default hash algorithm for assemblies to SHA1, preventing all kinds of problems with invalid / incomplete metadata (a9f5eda)
  • Fixed incorrect column type in MethodSpec's Method column (afcb7a1).
  • Fixed an error where the scope of a parsed type from string was not set properly if the type refers to a type in the same module (d18fa67).
  • Fixed a bug where OptimizeMacros would crash if the unaligned prefix opcode was present in the method body (7b8e269).
  • Fixed a bug where ldc.i4.s and similar instructions would have the wrong operand set after calling Add(CilOpCode, int) (ad77103)
  • Fixed a bug where certain new metadata members (e.g. type references) that were manually assigned a metadata token using the TokenAllocator would not appear in the final binary (#175, #176).
  • Fixed a bug where assembly linked resources would be parsed incorrectly and throw exceptions on writing (7fe14d5)

Hotfix 4.5.1

05 Apr 15:16
90b4045

Choose a tag to compare

Removes the redundent xunit dependency from AsmResolver.DotNet (Thanks @holly-hacker)

For full change log of 4.5.x, check the change log of 4.5.0.

4.5.0

29 Mar 20:03
04b1b79

Choose a tag to compare

New Features

  • Automatic detection of .NET Core / .NET 5+ installation folders (#105)
  • Add support for .NET Core / .NET 5+ runtimeconfig.json file parsing and interpretation (#137).
  • Significant improvements in assembly and member resolution (#104)
  • Add RSDS CodeView Debug Data read/write support (#140, thanks @dr4k0nia)
  • Add final token mapping as an artifact of the module serialization. This allows for easy lookup of members in the constructed PEImage for post processing (#121 #148).
  • Add TypeMemoryLayout.IsPlatformDependent flag to easily determine whether a memory layout is dependent on the bitness of the environment (#143 #153)
  • Add better CIL assembler/disassembler diagnostics, allowing for better support of invalid instruction streams without crashing the main readers/writers of AsmResolver (fb31c42)
  • Add ICilOperandResolver to CilDisassembler.
  • Significant performance improvements in CIL disassembling, making it possible to easily parse 100k+ instructions per method body with less memory usage (7662a41).
  • Add CIL label verification, providing writer diagnostics when invalid labels exist in the method body (#146)
  • Improved CIL instruction formatting with escaped strings literals (55c81cd)
  • Add ITypeSignatureVisitor<in TSTate, out TResult> variant (#147, thanks @JPaja)
  • Add read support for x64 SEH PE data directory (#139)

Bug Fixes

  • Fixed a thread safety issue regarding reading metadata tables (#135)
  • Fixed a bug where System.Type CustomAttribute arguments with = in their full name would result in an incorrect parsing of the CA signature (460bcf2)
  • Fixed a bug where System.Type and enum typed CustomAttribute arguments that don't have a resolution scope explicitly defined, would not be looked up correctly (31fc864)
  • Fixed a bug where TryLookupString returned false even if the string was found successfully (5fcc4d2)
  • Fixed a bug where GenericParameter.Index would not be updated before serialization to PEImage (#145, thanks @Charterino)
  • Fixed a bug where cloning instance methods with ldarg would result in the wrong operand being selected (#155, thanks @oSumAtrIX)
  • Fixed a bug with token preservation where methods and parameter list tokens were incorrectly assigned, resulting in methods (re)defining parameter definitions incorrectly (#150)