Comments (10)
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.
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.
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.
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.
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.
Hum... @katjahahn do you know a tool that can read it correctly? I'd like to see its source code. 🙂
from readpe.
Does this help?
http://pedump.me/401ed03adc85aa46708994cb5dbb7a89/ ?
It looks one could recreate the exe from http://pedump.me/401ed03adc85aa46708994cb5dbb7a89/#hexdump
from readpe.
It should still be available here from this archive. 😉
from readpe.
PortEx does work with that file.
from readpe.
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)
- Segmentation fault with "-f csv" HOT 3
- PEREAD.EXE Does not work on Windows 10 64 bit HOT 4
- Crud in sourceforge tarball HOT 12
- Peres -v shows a lot of useless (debug) info. Is this intentional? HOT 4
- readpe crashed when I use -e HOT 6
- build failed in windows HOT 2
- Compiling with flat namespace causes build for Homebrew to fail HOT 6
- It occurred ERROR when I make pev in Linux. HOT 4
- AVX / AVX2 / AVX512 support HOT 1
- Project name change? HOT 6
- readpe: garbage in Date/time stamp output HOT 1
- Update list of known machine types HOT 3
- Truncated section names HOT 3
- lib/libpe/hashes.c: `pe_err_e get_headers_optional_hash()` calls `exit()` instead of returning a proper return value.
- pesec: fails to properly read PE file on s390x HOT 3
- readpe: symbol lookup error: /usr/lib/libpe.so.1: undefined symbol: _ZGVdN4v_log2 HOT 12
- Support for NE files HOT 3
- _FORTIFY_SOURCE level downgrading HOT 1
- Broken tests HOT 1
- Version bump HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from readpe.