Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Broderick's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    Basement.
    Posts
    100
    Reputation
    42
    Thanks
    30
    Quote Originally Posted by Jetamay View Post
    Lies, especially about code relocation. There are so many undocumented code relocation types and even more data structures. I had to go around to tons of windows REing communities to figure out how some of these structures worked.

    At least relative to how MSDN documents their other APIs, the documentation of the PE format is poor.
    What are you talking about relocations? From the v8 pecoff manual:



    Doesn't get much more clear than that. And what else was I lying about?
    The fish trap exists because of the fish.
    Once you've gotten the fish you can forget the trap.
    The rabbit snare exists because of the rabbit.
    Once you've gotten the rabbit, you can forget the snare.
    Words exist because of meaning.
    Once you've gotten the meaning, you can forget the words.
    Where can I find a man who has forgotten words so I can talk with him?

  2. #17
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad
    Quote Originally Posted by Broderick View Post


    What are you talking about relocations? From the v8 pecoff manual:



    Doesn't get much more clear than that. And what else was I lying about?
    /dayum, that would've saved me tons of time. A lot of that isn't on the MSDN website. Thanks for pointing me to the manual though.



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  3. The Following User Says Thank You to radnomguywfq3 For This Useful Post:

    Jabberwock (08-29-2012)

  4. #18
    Broderick's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Location
    Basement.
    Posts
    100
    Reputation
    42
    Thanks
    30
    Quote Originally Posted by Jetamay View Post
    /dayum, that would've saved me tons of time. A lot of that isn't on the MSDN website. Thanks for pointing me to the manual though.
    Yeah MSDN itself doesn't deal overly much with the nitty-gritty of the PE/COFF specification, but to their credit, Microsoft did provide one hell of a document detailing pretty much everything about the PE/COFF specification. Of course, you're likely to need other sources to clarify a few issues and also to dumb-down some of the overwhelming amount of knowledge present in that document (Matt Pietrek is a life saver, basically strips out all the important parts of the PE that you need to know about).
    The fish trap exists because of the fish.
    Once you've gotten the fish you can forget the trap.
    The rabbit snare exists because of the rabbit.
    Once you've gotten the rabbit, you can forget the snare.
    Words exist because of meaning.
    Once you've gotten the meaning, you can forget the words.
    Where can I find a man who has forgotten words so I can talk with him?

  5. #19
    Jabberwock's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    1,735
    Reputation
    191
    Thanks
    15,701
    My Mood
    Relaxed
    Quote Originally Posted by Jetamay View Post
    Right now, it just loads the library in to the local process. Making it do otherwise, is a simple manner of replacing memcpy with writeprocessmemory, virtualalloc with VirtualAllocEx, and the call with CreateRemoteThread, etc...
    First, I did like to thank you, I'm really thankful you are helping me.

    From my point it isn't simple as you say, although I'm too nooby to say that.

    The things I understand now are:

    1. With your code I don't need to write the file to the hard disk, that's because I can take the resource and write it to the current process memory, from that point PE Loader will do his work.
    I do that with these functions: FindResource, LoadResource, CreateFile, CreateFileMapping, MapViewOfFile. With these to just close: UnmapViewOfFile, CloseHandle.
    2. I need to change things in your code to make it write to a remote process cause now it just load the dll to the current process.

    ------------

    I think I got it wrong in 1. Which functions do I actually need to use?
    Last edited by Jabberwock; 08-28-2012 at 11:15 AM.
    Even familiar landscapes will
    reveal a different kind of beauty
    if you change your viewpoint.
    Where these new encounters
    and new bonds will lead you...
    Such dazzling golden days.
    I, too, look forward to
    what I might behold.

  6. #20
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad
    Quote Originally Posted by Jabberwo0ck View Post
    First, I did like to thank you, I'm really thankful you are helping me.

    From my point it isn't simple as you say, although I'm too nooby to say that.

    The things I understand now are:

    1. With your code I don't need to write the file to the hard disk, that's because I can take the resource and write it to the current process memory, from that point PE Loader will do his work.
    I do that with these functions: FindResource, LoadResource, CreateFile, CreateFileMapping, MapViewOfFile. With these to just close: UnmapViewOfFile, CloseHandle.
    2. I need to change things in your code to make it write to a remote process cause now it just load the dll to the current process.

    ------------

    I think I got it wrong in 1. Which functions do I actually need to use?
    I just woke up, I haven't released the final revision :X But its coming along.



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  7. The Following User Says Thank You to radnomguywfq3 For This Useful Post:

    Jabberwock (08-29-2012)

  8. #21
    Jabberwock's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    1,735
    Reputation
    191
    Thanks
    15,701
    My Mood
    Relaxed
    Lol, at time you wake up I'm going to sleep... That's sad.

    You already writed most of the code, and I only have to change a part of it, but it saddens me that I'm unable to do even that.

    The problem is that when I use google to find information it seem irrelevant, and MSDN isn't really user friendly.
    What are your main websites you use to search for info?
    Last edited by Jabberwock; 08-28-2012 at 04:13 PM.
    Even familiar landscapes will
    reveal a different kind of beauty
    if you change your viewpoint.
    Where these new encounters
    and new bonds will lead you...
    Such dazzling golden days.
    I, too, look forward to
    what I might behold.

  9. #22
    radnomguywfq3's Avatar
    Join Date
    Jan 2007
    Gender
    male
    Location
    J:\E\T\A\M\A\Y.exe
    Posts
    8,858
    Reputation
    381
    Thanks
    1,823
    My Mood
    Sad
    Quote Originally Posted by Jabberwo0ck View Post
    Lol, at time you wake up I'm going to sleep... That's sad.

    You already writed most of the code, and I only have to change a part of it, but it saddens me that I'm unable to do even that.

    The problem is that when I use google to find information it seem irrelevant, and MSDN isn't really user friendly.
    What are your main websites you use to search for info?
    No worries, here is the download to the later version (should work with remote injection from memory, what you need):
    https://www.mpgh.net/forum/31-c-c-pro...ule-final.html

    Most of my soures are from Peering Inside the PE: A Tour of the Win32 Portable Executable File Format and other articles I found around MSDN. As Jason suggested, you can also refer to the manual.



    There are two types of tragedies in life. One is not getting what you want, the other is getting it.

    If you wake up at a different time in a different place, could you wake up as a different person?


  10. The Following User Says Thank You to radnomguywfq3 For This Useful Post:

    Jabberwock (08-29-2012)

  11. #23
    Jabberwock's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    1,735
    Reputation
    191
    Thanks
    15,701
    My Mood
    Relaxed
    Works perfectly fine and really well made!

    Thanks a bunch. That's really awesome bro.
    Last edited by Jabberwock; 08-29-2012 at 07:56 AM.
    Even familiar landscapes will
    reveal a different kind of beauty
    if you change your viewpoint.
    Where these new encounters
    and new bonds will lead you...
    Such dazzling golden days.
    I, too, look forward to
    what I might behold.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Tutorial] How To : { Pack " DLL " File to Anti HeX Editing. }
    By Dark Side in forum CrossFire Tutorials
    Replies: 3
    Last Post: 09-22-2011, 12:27 PM
  2. Packed dlls
    By harpreet10 in forum Combat Arms Coding Help & Discussion
    Replies: 5
    Last Post: 05-06-2011, 07:10 PM
  3. [Help] How to pack .dll
    By PashaAmd in forum Combat Arms Coding Help & Discussion
    Replies: 5
    Last Post: 03-20-2011, 02:59 PM
  4. Packing .Dll Files into a Loader.exe
    By Dreamcast in forum Combat Arms Coding Help & Discussion
    Replies: 13
    Last Post: 10-28-2010, 10:54 AM
  5. How to Pack dll with UPX?
    By HackFail in forum Combat Arms Help
    Replies: 8
    Last Post: 08-19-2010, 08:29 AM