Results 1 to 6 of 6
  1. #1
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default Changing values in different programs...

    Tell me if this is a no no and I will stop asking for info about this stuff on this forum... I'd like to make a simple cheat for an old game that's offline... It has no type of anti-cheat and I'd like to make a program that changes how much money you have... I think the first thing I have to do is get the data address or something like that by using cheat engine... How do I do that? :P After that how do I start using that info in my program and then send back a new value? Are there any classes that I should be importing and what methods do I use to do this? thanks!

  2. #2
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Changing values in different programs...

    Hi,

    if the game session can be saved then I would check the format of that file.
    Just try to get 2 sessions which should differ as less as possible - but the money changed. Then compare the files to see which parts was changed.

    Modifying the memory of anothet application is much harder in my eyes. I think I would attach a debuger and disassembler for that task.

    But all this has nothing to do with Java....

  3. #3
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default Re: Changing values in different programs...

    Quote Originally Posted by kneitzel View Post
    Hi,

    if the game session can be saved then I would check the format of that file.
    Just try to get 2 sessions which should differ as less as possible - but the money changed. Then compare the files to see which parts was changed.

    Modifying the memory of anothet application is much harder in my eyes. I think I would attach a debuger and disassembler for that task.

    But all this has nothing to do with Java....
    could you link me to a tutorial/guide that teaches the basics of this? thanks

  4. #4
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Changing values in different programs...

    I don't know any tutorials about these items.

    The first item is straight forward: Just look for files that might contain the saved state and then open them in a binary/hex editor. Compare different version till you find places that might contain the money. (You could check the amount of money you have and translate it to hex values. Then you could search for these values, too)

    The second needs deeper knowledge. Learn assembler, read about disassembler, read about debugger. And modifying memory of another thread is also nothing straight forward because memory of one application is normally protected against changes from other applications. But all these things can be looked up in google.

    Konrad

  5. #5
    mbschultz97 is offline Super OP Noob
    Join Date
    May 2014
    Location
    Virginia
    Posts
    65
    Rep Power
    0

    Default Re: Changing values in different programs...

    Quote Originally Posted by kneitzel View Post
    I don't know any tutorials about these items.

    The first item is straight forward: Just look for files that might contain the saved state and then open them in a binary/hex editor. Compare different version till you find places that might contain the money. (You could check the amount of money you have and translate it to hex values. Then you could search for these values, too)

    The second needs deeper knowledge. Learn assembler, read about disassembler, read about debugger. And modifying memory of another thread is also nothing straight forward because memory of one application is normally protected against changes from other applications. But all these things can be looked up in google.

    Konrad
    Are there any small programs I can make that will teach me bits and peaces of what I need to know about assemblers and disassemblers? thanks again :P

  6. #6
    kneitzel is offline Senior Member
    Join Date
    Feb 2014
    Posts
    447
    Rep Power
    1

    Default Re: Changing values in different programs...

    Ohh ... seems that I have to explain the words that I am using - Sorry that I didn't recognize it first.

    Let me describe the core basics first (sorry if it gets a little bit longer now but maybe it will help you to understand the big picture):
    - First of all each computer has a so called CPU. This is the central processing unit which is doing all work (The real world got much more complicated because you have multiple processing cores but we ignore that and keep it simple.)
    - This unit is simply working with 0 and 1 signals. They are represented through different voltages - low and high voltage. (That is the reason why it is digital technology).
    - Because a lot of 0 and 1 are unreadable, these was combined to blocks and a block of 4 so called "Bits" is shown as a hexadecimal number (0,1,2...9,A,B,..,F). Two of these (so 8 Bits) are combined to a so called Byte which can be displayed by 2 hecadecimal numbers.
    -> So when you look at these core values, you will see something like AC 07 56 FE 69 ....

    Now the important thing is: A CPU simply requires input in that form. So a CPU has some kind of instruction set. each instruction is such a code. But it is quite hard to read code like that. People do not want to see magic numbers. They want to see something "readable".

    This is the point where the so called Assembler comes into the game. Instead of writing magic numbers, we write command like MOV (move something). The CPU has registers and you have memory areas. So we could think of something like
    MOV dx, #00000000
    Depending on the CPU, that could be a Move content of register (a register is some kind of memory location inside the CPU.) into the memory location. But it could also mean that the content of the memory location is put into dx. (I saw both in the past!)
    And this code is then enhanced. You can have labels which define memory locations or locations inside the code to jump to.
    But the core commands are quite easy. You do not have stuff like loops. You do not have complex if statements. Everything is split up into things like:
    - Get values you need to operate on into registers.
    - Do something with the registers e.g. some calculation or a comparison.
    - Do a conditional jump (So if a check was successful then jump to a label).
    So Assembler is simply a language like Java. But it is really low level.

    So we got to the first point: Assembler. So you should check for an Assembler for your operating system and processor. For Windows you could look up MASM32: MASM32 Home Page

    The next important thing is, what happens when you compile something:
    The text files are read by the compiler and some output is created. The type of output can vary. Real binaries are executables that contain the code for the CPU already. (They can contain much more. Windows has a quite nice executable format which can contain a lot. Systems like Linux are a little more limited but of course have everything that they thought is required. But that might be out of scope right now.) Examples for such compilers are often C / C++ compilers.
    Other compilers generate code that is still on a higher level. That is a great thing because that way the compiled stuff can be run on multiple CPUs. Examples for this are .Net and Java. This simply means, that the code cannot be run directly by the CPU. Instead you have another compiler that translates the code to something that the CPU can do.
    One advantage is, that this code is still quite on a high level so it is quite easy to get Java or .Net code back from these compiled classes. (But there are tools to make it harder. But we do not concentrate on that.) But I will not continue with this. Lets focus on the hard part:

    The binaries from C / C++ source cannot be decompiled into c / C++ code. The main problem is, that there is no clear rule and the compilers are optimizing a lot of stuff which is a "one way route".
    So all you can do is calling a Disassembler. A Disassembler simply reads the Hex-Codes and replaces them with the Assembler codes. So instead of 0A EF 35 67 ... you see something like MOV dx, 0x78679856

    That is really cryptic and it is really hard to understand code like that. There are people who have this as an hobby and they hack applications e.g. disabling a license check or something like that.
    But if you are interested: Disassemblers for x86 systems exist: x86 Disassembly/Disassemblers and Decompilers - Wikibooks, open books for an open world

    ====================================

    What is the result out of this:
    I really DO NOT recommend this at all!

    If you are interested in low level stuff (I know other people are), then I would suggest to start small with simple CPUs. There are cheap and easy to use systems e.g. Arduino. Play around with some simple CPUs and write some software in assembler (if you really want to learn that. But then you really focus on Hardware development / Driver creation / Operating System Development. But even in all these areas, you mainly use C or C++ for the development.)

    But maybe you best concentrate on higher level stuff. Why don't you try to master Java? You could create a game on your own. Just recreate that game you try to fool around with ... or something like that.
    That is what I would do. All this Assembler / Disassembler stuff is really crazy. If you study computer science then there is a big chance that you have to spend enough time on that. At least I had to do that :)

    With kind regards,

    Konrad

Similar Threads

  1. Replies: 0
    Last Post: 07-05-2012, 03:03 PM
  2. Help with changing time values.
    By Johnny2009 in forum New To Java
    Replies: 0
    Last Post: 12-10-2011, 11:24 AM
  3. Replies: 0
    Last Post: 08-14-2010, 10:09 AM
  4. Changing Webpage's Input Values
    By Lawllerskates in forum New To Java
    Replies: 0
    Last Post: 05-16-2010, 02:26 AM
  5. Changing the values of a map.
    By Onra in forum New To Java
    Replies: 1
    Last Post: 02-26-2010, 12:20 AM

Posting Permissions

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