Results 1 to 6 of 6

Thread: Static addresses to Dynamic

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Location
    Belgium
    Posts
    156

    Static addresses to Dynamic

    Using ReadProcessMemory/WriteProcessMemory APIs you can change variable values in memory.

    I am developing an application that I do not want to be hacked.

    Static address is 1 address, it never changes (ex: &H1005FD1)
    But Dynamic address constantly changes( With everystartup it changes. (ex: &H100000 can change into &H2641949)

    Right now im using code:
    Code:
    Module 1:
    public Usage as integer
    public Money(32768) as integer
    
    Form1:
    
    Private sub Form_Load()
    Randomize
    usage = rnd * 32769
    End Sub
    
    Private sub Command1_Click()
    Money(usage) = text1.text
    End Sub
    But are there any other ways?

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Static addresses to Dynamic

    That sample code would fail: one only needed to know the memory pointer of "usage" variable and they'd know where to find the information. The information would be available from Text1 and contents of it are rather easy to find out simply by finding the correct hWnd. You'd need greater and far more complex solutions.

    To protect your application very well you'd need a lot more low level knowledge of how things work; more than I know; possibly more than anyone who posts regularly on these forums these days. In the end it comes down to a few questions:

    Why in the world would anyone want to hack your application?
    What needs to be protected? Who are the people you want to prevent getting into your application?

    Crypting is what you could do to data, basically you'd keep the important data crypted with a strong method all the time, only making it usable (decrypting) when you need it. And immediately when you don't need it anymore you should put it away. This would be much easier and it would still be rather effective. CVMichael has done a lot on this front. It doesn't protect against the best, but it would be a very good protection against a majority of people who might want to try out some low level of hacking attempts, such a directly reading the memory.


    Not to say I'd be an expert of any kind on this subject, but I know enough to know that it is something hard to achieve; depending on what you really need, of course.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Location
    Belgium
    Posts
    156

    Re: Static addresses to Dynamic

    The textbox was just an example.
    it was for testing.
    Lets say that application is a game, people can cheat it by writeprocessmemory API.
    People can then create trainers for the game.
    But it would be alot harder to make a trainer for the game if all the addresses are dynamic.

    also, how can people get the address of Usage when they dont know the value of it.

  4. #4
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Static addresses to Dynamic

    Some people are able to read machine code that the program consists of, thus being able to simply read what your code is doing. For someone with some experience on the subject it wouldn't take long to figure out the trick.

    One clever solution would be to make a class module to hold the important data. You could optionally store it encrypted there. Then you could simply clone the class, thus creating a new class, and destroy the old one. Suddenly your data is in a new location. This ought to be hard enough to figure out quickly and may give safety for a long time. Depends on how skilled people there are.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Location
    Belgium
    Posts
    156

    Re: Static addresses to Dynamic

    How could i "clone" a class and destory the old class?

  6. #6
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: Static addresses to Dynamic

    Quote Originally Posted by masterkert3
    How could i "clone" a class and destory the old class?
    A thread popped up on this a few days ago

    A Form is also a class which can be cloned and set to nothing.

    Be aware that it is practically impossible to make something unhackable, if a machine can read it then others can too, all you can do is make it difficult.

    Also be aware that for every dynamically positioned piece of data, there is something static which points to it.
    Last edited by Milk; Jul 24th, 2008 at 05:57 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width