ArgumentOutOfRangeException thrown during computation of TypeRefHash
See original GitHub issueWe frequently see this exception in our processing. I don’t know yet whether this is caused by a bug in PeNet or whether the .NET header is malformed.
Full stack trace:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at PeNet.Header.Net.MetaDataTablesHdr.ParseTableDefinitions()
at PeNet.Header.Net.MetaDataTablesHdr.get_TableDefinitions()
at PeNet.Header.Net.MetaDataTablesHdr.ParseTable[T](MetadataToken token)
at PeNet.Header.Net.MetaDataTablesHdr.ParseMetaDataTables()
at PeNet.Header.Net.TypeRefHash.ComputeHash()
at PeNet.PeFile.get_TypeRefHash()
This malware sample for example leads to the exception: https://www.virustotal.com/gui/file/f88e743fdd410a89b7084076883164120e3abe7f8f08ad65bb0fec05b392d3b1/
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Exception thrown: System.ArgumentOutOfRangeException
Do you understand what the error is and where this error can occur? · Without seeing how RoomsRGV. · @hijinxbassist I don't understand...
Read more >How do i fix error System.ArgumentOutOfRangeException ...
How do i fix error System.ArgumentOutOfRangeException ? get this error after execute calculation with the result of first calculation [duplicate].
Read more >ArgumentOutOfRangeException thrown when posting ...
ArgumentOutOfRangeException thrown when posting Newtonsoft.Json serialized object to System.Text.Json endpoint #29473.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure I can have a look at it when I get the time somewhere next week. I am not too familiar yet with the internals of this library yet, so will have to read up on that first.
I’ve looked into the sample and it seems to be crypted somehow. The data in the metadata tables is broken and cannot be recovered. None the less, PeNet should’t just crash on that, but instead fail to parse the broken parts. I’ll see what I can do about that.