Giter Site home page Giter Site logo

.Net bin parsing issue about exe-rs HOT 6 CLOSED

frank2 avatar frank2 commented on August 28, 2024
.Net bin parsing issue

from exe-rs.

Comments (6)

frank2 avatar frank2 commented on August 28, 2024

Really happy you found it useful! Means a lot!

Yeah the versioning setup in the resource directory is a pain in the ass. There's a bug in CFF Explorer with parsing VS_VERSION and a bunch of other stuff. The code is ugly so I'm not surprised there's an issue.

Is the .NET binary malware? Do you have a hash I can search to run it against exe-rs and see what the bug is? If it's not malware, do you have somewhere I can download it to run against the crate? I've been working on a bunch of C++ lately and I'd love to get back to this project if people are working on it!

Thanks again for reporting this!

from exe-rs.

theflakes avatar theflakes commented on August 28, 2024

Nice and thanks!

The one binary I can share with you is found here: https://github.com/BloodHoundAD/SharpHound/releases/tag/v1.1.0

It's the zip file and is the SharpHound.exe .Net binary.

Thanks again

from exe-rs.

frank2 avatar frank2 commented on August 28, 2024

Figured out the problem. exe-rs is expecting there to be a VSStringFileInfo structure immediately after a VSFixedFileInfo structure. In the executable you linked me, VSVarFileInfo comes before VSStringFileInfo, which is either nonstandard or is documented and I just missed it in the godawful documentation that exists for this format.

It should be an easy fix-- detect which structure is actually there in the file first instead of assuming. I'll have a fix soon. Thanks for reporting this-- the parsing of these structures is undoubtedly riddled with bugs like this.

from exe-rs.

theflakes avatar theflakes commented on August 28, 2024

Nice work! I've started digging into the work you're doing on this. Not easy going through all the docs for sure so thanks again.

from exe-rs.

frank2 avatar frank2 commented on August 28, 2024

This is now fixed as of 4c76891! The official release with this fix will be 0.5.5. Thanks again for reporting!

from exe-rs.

frank2 avatar frank2 commented on August 28, 2024

This is live in 0.5.6 (not 0.5.5, that was a mistake).

from exe-rs.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.