Getting Specific Memory Locations...

SephirothSephiroth Fayetteville, NC, USA
Well, I haven't coded anything except my Linux MUD for a while, and I had an idea for a game I play. I want to write a program that will somehow find the game's area in memory when it is running and then copy specific variables out of that memory and dump them to a file. I am trying to write a program that will allow a user to keep track of his inventory for up to five of his players. I have the basic program deisgn done, but HOW can I find the game's memory location, and after that, how could I search through for the variables with the inventory to dump to file or to display in the program? Thanks for the help, I know this is a bit mroe advanced than before.

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Comments

  • : Well, I haven't coded anything except my Linux MUD for a while, and I had an idea for a game I play. I want to write a program that will somehow find the game's area in memory when it is running and then copy specific variables out of that memory and dump them to a file. I am trying to write a program that will allow a user to keep track of his inventory for up to five of his players. I have the basic program deisgn done, but HOW can I find the game's memory location, and after that, how could I search through for the variables with the inventory to dump to file or to display in the program? Thanks for the help, I know this is a bit mroe advanced than before.
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :

    Use the Debug API. Finding the values you want will require knowing how the program you're examining works. If you do then it should be fairly easy, if you don't then... get ready to know your debugger VERY well and if you don't know assembly yet, get ready to learn. Basically, run the game, and look at what happens when in the debugger. See what variables get changed when you change the inventory. Set a watch on them, and do some inventory stuff to see if you were right. Once you figure out what is what, then you can figure out how to get the info at runtime from another program.

    What game or type of game is it, anyways?

    "No Bad Religion song can make your life complete."
    -No Direction, Bad Religion


  • SephirothSephiroth Fayetteville, NC, USA
    It is a game that I have been beta-testing for 3DO for ages. It is called "Jumpgate: The Reconstruction Initiative". It just shut down for good until the release about ten minutes ago. As soon as I post this I am ordering it online. Damn I'm addicted :P.


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • : It is a game that I have been beta-testing for 3DO for ages. It is called "Jumpgate: The Reconstruction Initiative". It just shut down for good until the release about ten minutes ago. As soon as I post this I am ordering it online. Damn I'm addicted :P.
    :
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :
    :
    Well, I was kind of worried about this. In an online multiplayer game, the statistics and what not of your characters are almost guaranteedly maintained on the server to prevent abuse. Most likely the program you use only keeps track of the inventory long enough to display it when you ask for it. It probably asks the server for a list of your inventory everytime you send the command. Though, I could be wrong and the program keeps track of your inventory and the server just verifies that you actually have something whenever you try to use it or sell it. Basically, what I'm getting at is that you may not be able to find the variable you're looking for because it may not be there.

    However, instead of reverse engineering the program to find where they stick the inventory data, why not reverse engineer the network protocol to find how they tell you what your inventory is. Basically, you would have a program that looks at what all the server sends you. Whenever you got a message that said "+5 item" the program would add 5 to that item, when it got a message that said "-2 otheritem" it would subtract two. You could initialize it either by sending a command to list your inventory, or by just initializing it manually. Since, the protocol will probably make a whole lot more sense than the programs code it will probably be easier to do it this way. Also, you avoid a lot of issues this way. The only way I can see a problem is if there is a compression algorithm or encryption algorithm that the unique to the game, as opposed to a standard one. Most likely, the encryption algorithm would be standard and you'd just need to find the key which shouldn't be that hard since you (as in the client, not necessarily you the person) should know it. You may just need to rip apart an IPSec packet. A compression algorithm still has a good chance of being standard, but it has more of a chance of being specific to this game than the encryption algorithm. If it's standard then just get some code to decompress it, if it isn't standard then you have a problem. However, neither of these last two are too likely. (The encryption one might be, but it's almost guaranteed to be standard.)

    "No Bad Religion song can make your life complete."
    -No Direction, Bad Religion


  • SephirothSephiroth Fayetteville, NC, USA
    Two problems with that.
    1) The debugger locks my whole system when launching the program
    2) I know nothing of networking beyond null-modems

    This game is also very different from most others in the sense that a lot of stuff IS run client-side. Such things include the inventory (for transport between stations or other important stuff), shields, armor, weapon types, mounting locations, energy useage, etc. Another plus is that when fighting the computer controlled opponents, the "Conflux", they are run client-side to whoever they are after, that way the user doesn't have to account for lag. Now with ships (players), if I score a hit on playerx, even if he is lagged and passed me ten minutes ago, it WILL score the hit. This way no lag cheating can be used, I suppose (I hated those in TF!!!). There is one program out already that does this, but mine will have a few extra features, such as loan tracking, ship value, etc.


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • : Two problems with that.
    : 1) The debugger locks my whole system when launching the program
    : 2) I know nothing of networking beyond null-modems
    :
    : This game is also very different from most others in the sense that a lot of stuff IS run client-side. Such things include the inventory (for transport between stations or other important stuff), shields, armor, weapon types, mounting locations, energy useage, etc. Another plus is that when fighting the computer controlled opponents, the "Conflux", they are run client-side to whoever they are after, that way the user doesn't have to account for lag. Now with ships (players), if I score a hit on playerx, even if he is lagged and passed me ten minutes ago, it WILL score the hit. This way no lag cheating can be used, I suppose (I hated those in TF!!!). There is one program out already that does this, but mine will have a few extra features, such as loan tracking, ship value, etc.
    :
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :
    :

    Heh. So you want to cheat in a game. :)

    I was once thinking this in game called Classis Odyssey Online. I think that best way would be intercept IP packet coming from / going to server and find out what they contain. Just monitoring this traffic for awhile you should get the idea what the packets looks like. Then just create packets by yourself and send them to server. If server doesn't have any checking everything should go well and you will be able to cheat.

    Packet intercepting can be done with NDIS intermediate driver. Just filter packets going to server and do whatever you like to do and pass them on.

  • SephirothSephiroth Fayetteville, NC, USA
    : Heh. So you want to cheat in a game. :)
    :
    : I was once thinking this in game called Classis Odyssey Online. I think that best way would be intercept IP packet coming from / going to server and find out what they contain. Just monitoring this traffic for awhile you should get the idea what the packets looks like. Then just create packets by yourself and send them to server. If server doesn't have any checking everything should go well and you will be able to cheat.
    :
    : Packet intercepting can be done with NDIS intermediate driver. Just filter packets going to server and do whatever you like to do and pass them on.
    :
    I don't want to cheat. The game has a HUGE number of objects (guns, commodities, shields, radars, etc) that no one pilot account could hold, so what a bunch of players do is create one account and get to the level where they can use their tow (a huge ship that has 500 units of space in it!). What we do then is start transferring our excess stuff into that tow for holding until we need it or want to sell it. With two or three tows, each holding 500 units, it would be a PAIN to log in with one account and go through 500 things to find your object isn't in that tow, then have to shutdown the game, restart it, and repeat until you find your object. That's what the program is for. There's already one out that only tracks inventory, but I want mine to also track loans players make to eachother. As for monitoring packets, I am totally lost on where to start. I don't even know how to catch a packet, much less read from it.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories