If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Grabbing info from Java game

Howdy,

I've been trying to "hack" into a game called Darkfall for quite some time but I always hit a wall.
I'm not trying to do anything illegal within the game itself like speedhacking, wallhacking or anything like that. I just want to be able to retrieve information, not write anything and according to the Devs they don't really care about 3rd party tools as long as they aren't hacks.

I have tried doing it two ways using several methods.
First I tried getting a DirectX api hook because I figured most of the information I wanted was being drawn on screen at some point, therefore reading the parameters for the functions that DirectX uses could work but I couldn't really get this method to work and realised that there's a lot more information hidden so decided to move on to another way.

Second attempt was trying out to get inside the Java, I decompiled the class loader but couldn't really get anything useful out of it. I tried using VisualVM and checking the heap dump and found out most classes are obfuscated with names like Fbd Agv.
I have tried with JVMTI but without any success. I can't seem to get what I want.

So basically what I'm trying to ask is how should I go in order to just hook a dll into the game and grab some info? My objective would be to retrieve the string right after the program decrypts it and then I could do whatever I wanted with it.

Googling around I have found 0 tutorials or helpful links regarding to Java game hooking which is why I'm asking here.

Re: Grabbing info from Java game

You will need to decompile the all the classes and figure out how it works. There are a few problems with this, such as: the code has been obfuscated making it hard to work out what is happening and decompilers can struggle to generate re-compilable code especially when the code contains inner classes etc.

But all is not lost, a while ago I went through a similar exercise with decompiling a scrabble game and adding a new feature. Now I can't promise to be able to give the same level of support this time but I will help where I can.

Firstly you need to decompile the code and fix any decompilation errors so you can recompile a working version.

Then, because you are looking for data that is displayed on the screen the starting point is to find the components that display to the screen. If you can't easily work out what a component does change the code to display something obvious such as "HERE" and run the program to see where the known value appears.

As you find each component rename it to something sensible. Using an IDE such as Eclipse or Netbeans allows you auto rename all reference to it. It is vital that everything you discover you give a sensible name to, whether it appear to be of relevance to your problem or not. Over time the classes will become less and less obfuscated and you be able to understand some of the code - make sure you add lots of comments. Eventually you will be able identify the variables you need. Then it is case of adding code to allow you to hook into the class.

Be aware that this is not an easy thing to do and can be extremely frustrating a times but with a good debugger (Eclipse and Netbeans both come with debuggers) you should be able to work it out.

Re: Grabbing info from Java game

An edit button appears on the bottom of the post when you are logged in, but this mechanism only activates once your first post has been moderated. If you try to edit your post now, the 'Edit' button should be available.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.