Git Product home page Git Product logo

Comments (4)

xchgrbprsp avatar xchgrbprsp commented on September 21, 2024 1

The missing region turns out to be the entire last section and I got this warning in the output:
"Large section size for section 10 of 0x1649000 being truncated to 0x1648800 to fit within the image size. This could be as a result of a custom code to load a library by means other than LoadLibrary()."

I added some printfs in the function process_disk_image in pe_header.cpp and messed around with the code a bit and found out the problem seemed to be that larger_image_size was not aligned while VirtualSize was, which made larger_image_size smaller than VirtualAddress + SizeOfRawData in the _test_read check for the last section.
I then replaced the line larger_image_size = this->_image_size + new_section_size; with larger_image_size =_section_align((DWORD)_image_size, _header_pe64->OptionalHeader.SectionAlignment) + new_section_size; and everything worked.

I'm not sure if it's the correct way to fix it though.

from process-dump.

glmcdona avatar glmcdona commented on September 21, 2024

from process-dump.

glmcdona avatar glmcdona commented on September 21, 2024

Thanks, great analysis! I think your adjustment is right, I will have a look in detail at the code and think on it before committing it. I'm surprised it left the entire section empty as a result of this as well, I need to review the code surrounding that truncation error.

from process-dump.

glmcdona avatar glmcdona commented on September 21, 2024

Fixed. This will be released in pd v2.1 which I should have built and uploaded shortly. Thanks for finding the root cause and proposing a solution!

from process-dump.

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.