Results 1 to 8 of 8

Thread: Unable To Locate Data In Executable File

  1. #1
    Perkele
    Guest

    Unable To Locate Data In Executable File

    The topic's name was the error I got when I was trying to patch a simple application and tried to copy my modifications to the executable file. I was wondering if there is any way to get it working even though this error seems to be hard to avoid.
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  2. #2
    Super Moderator
    Join Date
    Dec 2004
    Posts
    1,486
    Blog Entries
    15
    who is reporting that error ? windows, billgates's seceratary ? your cat ?

    if it was ollydbg reporting that error then that means you are modifying your executable over and above your raw size

    raw size will be in installments of 0x200 bytes while virtual size will be in installments of 0x1000 bytes
    while mapping the windows loader will map all sections to the size of 0x1000
    so there will be lot of space available to modify in memory
    but when writing back there isnt enough space

    so ollydbg will report that error try dumping your memory with ollydump with all the changes intact
    or try adding a section at the end big enough to hold your modifications
    and trampoline there

    btw you could have searched this forum and could have found out all of this by yourself there are atleast 4 posts that return back if you tried searching
    "unable to locate data"

    of course google returns > 20,000 hits

    Results 1 - 10 of about 25,200 for unable to locate data ollydbg. (0.37 seconds

  3. #3
    Perkele
    Guest
    You're right, I was a bit in a hurry last time but I did a search and found out that it could easily be done through OllyDump (which I did then).
    The only problem now is that (after making the RAW size equal the virtual size) the executable no longer works
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  4. #4
    you not only need raw size = virtual size you need add the bytes with a hex editor, the file is needed be increased , not only changin a value in the header the file grow, in a hex editor look the end of the section and add zeros, to complete till the size nedded.

    Ricardo Narvaja

  5. #5
    Perkele
    Guest
    I did that and it worked
    Poorly the application however has a protection system which checks its (I think filesize or hash) and overwrites itself when it's not the correct value
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  6. #6
    Administrator dELTA's Avatar
    Join Date
    Oct 2000
    Location
    Ring -1
    Posts
    4,206
    Blog Entries
    5
    Well, I guess you know what your next step is then...

  7. #7
    Perkele
    Guest
    I do yes, at least I've gotten further and on the way I even learned something
    I promise that I have read the FAQ and tried to use the Search to answer my question.

  8. #8
    Administrator dELTA's Avatar
    Join Date
    Oct 2000
    Location
    Ring -1
    Posts
    4,206
    Blog Entries
    5
    Sounds good. And if you get stuck, simply give a good presentation of your work so far and your problem, and you can get more good assistance here.

Similar Threads

  1. Unable to copy to Executable File.
    By GiblratersHand in forum The Newbie Forum
    Replies: 0
    Last Post: December 20th, 2012, 02:37
  2. Embedded Portable Executable File
    By OpenRCE_Saphex in forum Blogs Forum
    Replies: 0
    Last Post: November 24th, 2007, 18:50
  3. Need Help With Masm Dialog Resource File Data
    By kittmaster in forum The Newbie Forum
    Replies: 6
    Last Post: February 18th, 2006, 12:04
  4. PE File Virtual Size > Size Of Raw Data
    By 4543 in forum The Newbie Forum
    Replies: 6
    Last Post: June 7th, 2004, 14:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •