Thread: Implementing .dll files...

  1. #1
    Registered User
    Join Date
    Nov 2004

    Implementing .dll files...

    Hi, i could use a comprehensive tut or guide for this. I want to have an encryption algorithm contained in the file, that way you need the .dll and the exe to complete a login or encryption. Thanks!

  2. #2
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    I don't know where you got the idea for implementing a DLL in this factor but let me say that a DLL is more of a threat to security than a blessing in this situation.

    First off you hinder the application you are using because it will need that DLL when it could have just as easily put it in the binary itself. Nobody likes external parts if they don't need them. Putting it inside the .rsrc section of the binary won't work either, because thanks to things like Process Explorer and PEiD you can edit all of that to your hearts content.

    Another thing wrong here is that by using a DLL you are opening yourself to API hooking, through both Inline hooking (see: The Detours Win32 API library) and IAT hooking (see: Programming Applications for Microsoft Windows, 4th edition by Jeffrey Richter, Chapter 22: DLL Injection and API hooking.) Anybody with a little bit of experiance can hook this external function to always return TRUE for example and always log you in.

    Aside from the fact that DLL also makes runtime decrease a lot (loading DLLs does take a preformance hit), anybody with a simple copy of OllyDBG or preferably IDA Pro can simply open up that DLL file, look at the exports and find that encryption function. This will be a lot easier because that DLL file will only contain that export while you will have to look through a lot of code in the actual executable file in which you will have to set breakpoints and such to find the call to it and then examine it.

    A rule of thumb I try to follow is that if I don't NEED a DLL then I will try to avoid using one. Yes yes, they may be great for interoperability between two languages, they may enhance feature and ease the versioning process of an application, but do you really need an entire DLL simply related to an encryption function used for logins and such?
    Last edited by Mad_guy; 10-01-2005 at 08:38 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git


  3. #3
    Registered User
    Join Date
    Nov 2004
    Well the purpose was say the user has one and only one copy of that .dll file on, say, a USB flash drive. They hook-up the drive then run the program. If they have the .dll file, the login will go smoothely, if not then it wont work. I have heard of people using this before. Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 07:53 AM
  2. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  3. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 06:55 AM
  4. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 08:36 AM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM