Dll's

This is a discussion on Dll's within the C Programming forums, part of the General Programming Boards category; hey, can you modify a dll without having to recompile it? like, you can open it up in ResHack, modify ...

  1. #1
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378

    Dll's

    hey, can you modify a dll without having to recompile it?
    like, you can open it up in ResHack, modify something and it'll probably work. is there other ways to do the same thing without having to manually open reshack, etc.? thanks
    Registered Linux User #380033. Be counted: http://counter.li.org

  2. #2
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    868
    What has this got to do with C? Shouldn't you post this in Windows programming?

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Well he should have posted it in Windows programming. Now, what he should do is wait for a moderator to move it and not double post. Anyway, I don't think you can modify a DLL without recompiling it. Otherwise hackers would have a field day.
    Sent from my iPadŽ

  4. #4
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    What has this got to do with C? Shouldn't you post this in Windows programming?
    yeaa i wasn't thinking. sry

    Anyway, I don't think you can modify a DLL without recompiling it. Otherwise hackers would have a field day.
    yea..makes sense.

    but hackers do have field days, just not as big of ones.


    so then how do programs modify programs? like i installed deadaim, but when i run the aim executable it still runs everything that deadaim adds on and has a modified menu, etc.
    Registered Linux User #380033. Be counted: http://counter.li.org

  5. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Many modifications on programs like that are seperate DLLs completely. They're designed in a way so that they can call a specific DLL (or all DLLs) when opening, and the path of that DLL can most likely be found in an ini, cfg or something similar. Consider an app like Firefox. If you have it installed on your computer, go to the plugins folder. See all the DLLs? All of that is either loaded when Firefox opens or when a webpage requests it (for instance a Flash movie). Which is why programs that load DLLs in such a manner are so prone to attack.
    Sent from my iPadŽ

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    A much better approach is to use import libraries and force the users to recompile everything to use the DLL. You can modify a DLL and game companies do it all the time. It's called a patch but you will probably need a third party program to do it correctly. It's not impossible, but I hope you know quite a bit of assembly.

    1. Load DLL or portion into a buffer.
    2. Translate the binary result in the buffer to assembly instructions
    3. Find the area you wish to modify and make changes.
    4. Write the buffer to disk at the correct offset in the file, or write the entire buffer (if using the entire DLL) to disk.

    A DLL is really an EXE except the first byte is different.

  7. #7
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Quote Originally Posted by Bubba
    You can modify a DLL and game companies do it all the time. It's called a patch but you will probably need a third party program to do it correctly.
    I always imagined patches were simply replacement DLLs. But I believe you.
    Sent from my iPadŽ

  8. #8
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Some of them are and today most patches are since most people have broadband connections. But back in the day, patches literally patched binary files and these programs still have this ability even if it isn't used that often.

  9. #9
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Hmmm... well then is it possible (perhaps with a digital signature) to remove that edittable functionality from your DLLs so noone can mess with them and any changes you need to make simply replaces the DLL?
    Sent from my iPadŽ

  10. #10
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    Quote Originally Posted by Bubba
    A much better approach is to use import libraries and force the users to recompile everything to use the DLL. You can modify a DLL and game companies do it all the time. It's called a patch but you will probably need a third party program to do it correctly. It's not impossible, but I hope you know quite a bit of assembly.

    1. Load DLL or portion into a buffer.
    2. Translate the binary result in the buffer to assembly instructions
    3. Find the area you wish to modify and make changes.
    4. Write the buffer to disk at the correct offset in the file, or write the entire buffer (if using the entire DLL) to disk.

    A DLL is really an EXE except the first byte is different.
    i have very little assembly knowledge.


    k so do you know how to tell if a program is running? like when you go to upgrade aim or go to install deadaim, it can tell if aim is running and asks you to close it.
    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Some doubts on DLLs
    By BrownB in forum Windows Programming
    Replies: 1
    Last Post: 05-30-2007, 02:25 AM
  2. standart dlls
    By keeper in forum C++ Programming
    Replies: 3
    Last Post: 07-05-2006, 07:32 PM
  3. Can't load string from resource DLL's string table
    By s_k in forum Windows Programming
    Replies: 4
    Last Post: 07-15-2003, 06:43 AM
  4. question about DLL's and class functions
    By btq in forum Windows Programming
    Replies: 2
    Last Post: 02-25-2003, 05:08 AM
  5. DLLs <- sound files, and nesting.
    By sean in forum C++ Programming
    Replies: 2
    Last Post: 10-28-2002, 04:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21