Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Is code in a dynamic link library more secure than code in a program?

dll safe memory edit security

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 tavichh


    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 399 posts

Posted 06 October 2014 - 02:33 PM

Reason I ask, is because I was thinking about how one would see code within the .dll and I believe the only way would be reverse engineering since .dll's in acsii readouts will give you garbage to work with. However, if you open a memedit program with a .exe you can see some "familiar" variables and class names and such with a little bit of work.


If it is safer, then why doesn't all code just go into a .dll? Why should we make the code from within the program?

Send a like my way if I helped you or if you found my post useful or even just enjoyed reading my post.
Thank you :)

#2 Alexander



  • Moderator
  • 3963 posts

Posted 07 October 2014 - 01:19 AM

What program stores familiar class names or variables in memory? Variables are defined by an offset, and all you will see is "garbage" which may possibly be a variable, or some random memory. "FF" is 255 in base 16, which could be image data, a number, you haven't a clue. How do you know if four bytes is an integer, or it is four separate 8-bit numbers?


If a DLL or executable has constants programmed within it, it might be possible to find those, such as a string, an executable icon, or other data in known locations, but there is no difference in this case.


Just think of a DLL as program that can be loaded by an executable, the executable just has code that can allow it to load in the the operating system automatically. Imagine it as an executable without main() or winmain().


You can decompile the executable to bring out a representation in code that performs the same logic as the original code, sometimes in a clear manner, however this falls in to your reverse engineering category.



All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.

#3 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 posts

Posted 07 October 2014 - 04:30 AM

A DLL is no more or less secure than an EXE. In fact, they are essentially the same thing. The difference is that an EXE can be executed, while a DLL contains code that an EXE can execute without containing that code.


The company I work for distributes a lot of DLL's with our product. We have a "program" that actually consists of around 50 .exe's. Many of them use the exact same code over and over, so rather than compiling it into ever EXE, we instead distribute the DLL's. The result is that our installer is about half the size it would be, otherwise: only about 200 MB instead of 400-500.

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download