Git Product home page Git Product logo

Comments (10)

struppigel avatar struppigel commented on May 22, 2024 1

I used PortEx: https://github.com/katjahahn/PortEx/tree/master/src/main/java/com/github/katjahahn/parser/sections/rsrc
However, it seems the resource_shuffled.exe is not in the corkami project anymore, so I cannot confirm that it works with the current version.

from readpe.

jweyrich avatar jweyrich commented on May 22, 2024

This seems a bit tricky. The resources of this file don't seem to be placed in the resources directory, but somewhere else. I don't remember whether the spec allows this, but if it does, I think we can figure this out using a RVA. Will have to invest some time on this though.

from readpe.

struppigel avatar struppigel commented on May 22, 2024

Thank you for your fast replies.
Even if the specification does not allow it (I am sure it doesn't), the windows loader does. It does not care about the size given in the data directory table, nor if the resource tree nodes are all in the same section.

from readpe.

merces avatar merces commented on May 22, 2024

Corkami files are in our TODO for a while now. It is a nice set of binaries that don't follow the specs yet run perfectly under Windows loader. Thanks for this, @katjahahn. We'll take some time to fix this, but we'll do that. ;)

from readpe.

jweyrich avatar jweyrich commented on May 22, 2024

I don't see an easy way to identify which directory is in which position since that is defined/guaranteed by their order/index.

We could traverse all directories, but IMAGE_DATA_DIRECTORY gives us only VirtualAddress and Size before we access the VirtualAddress (translated to an offset) to read an specific directory structure.

That would require a brute-force detection, or maybe I'm missing something.

from readpe.

merces avatar merces commented on May 22, 2024

Hum... @katjahahn do you know a tool that can read it correctly? I'd like to see its source code. 🙂

from readpe.

lacostej avatar lacostej commented on May 22, 2024

Does this help?
http://pedump.me/401ed03adc85aa46708994cb5dbb7a89/ ?

It looks one could recreate the exe from http://pedump.me/401ed03adc85aa46708994cb5dbb7a89/#hexdump

from readpe.

merces avatar merces commented on May 22, 2024

It should still be available here from this archive. 😉

from readpe.

struppigel avatar struppigel commented on May 22, 2024

PortEx does work with that file.

from readpe.

GoGoOtaku avatar GoGoOtaku commented on May 22, 2024

PortEx ignores the directory table size entry all together. It seems like Windows also ignores it for at least resources which isn't too weird as it is sort of redundant. Commenting out the early return in pe_resource_base_ptr makes it work correctly and overall seems to not break anything from what I could tell.

from readpe.

Related Issues (20)

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.