| View previous topic :: View next topic |
| Author |
Message |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Tue Nov 24, 2015 5:10 am Post subject: {SCRIPT PROBLEM}CodeCave |
|
|
| is created code cave in several forms?
|
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Tue Nov 24, 2015 8:55 pm Post subject: |
|
|
| please help me in making code cave scripts.
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Nov 24, 2015 10:27 pm Post subject: |
|
|
In the Auto Assemble window,
Template > AOB Injection
Click OK twice
Code cave created
|
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Wed Nov 25, 2015 9:25 pm Post subject: |
|
|
| In some game such as castle crashers when making simple script and use it game crashed.why?
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4717
|
Posted: Wed Nov 25, 2015 9:37 pm Post subject: |
|
|
You probably made the script wrong. If you post it we might be able to help fix it.
It might also be some sort of anti-cheat.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Wed Nov 25, 2015 9:47 pm Post subject: |
|
|
| no I'm not probaly in making script.but what code cave work?
|
|
| Back to top |
|
 |
akumakuja28 Master Cheater
Reputation: 16
Joined: 28 Jun 2015 Posts: 432
|
Posted: Thu Nov 26, 2015 2:45 pm Post subject: |
|
|
| sjl002 wrote: | | no I'm not probaly in making script.but what code cave work? |
Code caves are old school spot in memory you can write to. These things are a relic nowdays. Use an injection and alloc newmem if need space for new.codel
_________________
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4717
|
Posted: Thu Nov 26, 2015 4:51 pm Post subject: |
|
|
| akumakuja28 wrote: | | Code caves are old school spot in memory you can write to. These things are a relic nowdays. Use an injection and alloc newmem if need space for new.codel |
What's the difference between a code cave and a code injection? In terms of what CE does, it's pretty much the same thing from my understanding. A code cave is a spot in memory the real application jumps to then jumps right back from after the code cave is done running. A code injection more or less refers to the same process.
I'm not sure on this, though, so anyone feel free to correct me if I'm wrong.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Gniarf Grandmaster Cheater Supreme
Reputation: 43
Joined: 12 Mar 2012 Posts: 1285
|
|
| Back to top |
|
 |
Studio80 Advanced Cheater
Reputation: 2
Joined: 12 Sep 2012 Posts: 83
|
Posted: Sun Dec 13, 2015 6:21 pm Post subject: |
|
|
I can understand your frustration I was in the same boat as you. One my of first games I wanted to train drove me crazy because my code injection always crashed the game.
It's very simple. What we want is to manipulate the code, we do this by jumping from the adress where the instruction is to an empty space. We inject our hacked code, we restore the original code and we jump back to after where the original code was. A code cave is just an empty space in the file.
Lets say you have the following code below:
| Code: | [b]100030142 - FF 8B 88 07 00 00 - dec [rbx+00000788][/b]
100030148 - 48 8D 4D 88 - lea rcx,[rbp-78] |
Every time I click the button some value gets decreased. The value is stored in [rbx+00000788]. So DEC [rbx+00000788] makes sense right?
So now we want to inject our code. How do we do this? We need to jump from the adress (which is 100030142) to an empty space (the cave), write our instruction. After we write our instruction we also need to write the original instruction which is DEC [rbx+00000788]. And then we need to jump back to the next instruction after the jump to the cave which is 100030148. I'm going to try to explain it more. Lets inject our codes.
| Code: | 100030142 - E9 B9 FE FB FF - jmp FFFF0000
100030147 - 90 - nop
FFFF0000 - C7 83 88 07 00 00 64 00 00 00 - mov [rbx+00000788],00000064
FFFF000A - FF 8B 88 07 00 00 - dec [rbx+00000788]
FFFF0010 - E9 33 01 04 00 - jmp 100030148 |
Now I'm going to explain you every line in details.
| Code: | 100030142 - E9 B9 FE FB FF - jmp FFFF0000 <---- JUMPS TO CAVE
100030147 - 90 - nop <- NOPS THE LAST BYTE |
We make the jump to the cave which is located at FFFF0000. And you have noticed the NOP. We nop this byte because the original code uses 6 bytes (which are FF 8B 88 07 00 00) and the JMP uses only 5 bytes (which are E9 B9 FE FB FF). So thats why we need to NOP the last byte. Else it might crash.
Lets move to the next part.
| Code: | | FFFF0000 - C7 83 88 07 00 00 64 00 00 00 - mov [rbx+00000788],00000064 <---- It puts 100 into [rbx+00000788] 64 in hex is 100 in decimals |
FFFF0000 is the adress of our cave aka empty space. Here we write our modified code. We move our new value into the pointer [rbx+00000788]. We write our new values always in hex. 64 in hex is 100 in decimals.
Lets move to the next line
| Code: | | FFFF000A - FF 8B 88 07 00 00 - dec [rbx+00000788] <----- Restores the original code |
This is our original code. We need to include this else the game might crash.
| Code: | | FFFF0010 - E9 33 01 04 00 - jmp 100030148 <---- Jumps back to the adress that comes after the jump of the jump to the cave |
We need to jump back to the line that comes after the first jump we made so the game can continue else it will crash. Which is the jump to the cave. 100030148 comes after the JUMP TO CAVE instruction. Just check this:
| Code: | 100030142 - E9 B9 FE FB FF - jmp FFFF0000 <--- Jump to cave
100030147 - 90 - nop
[b]100030148 [/b]- 48 8D 4D 88 - lea rcx,[rbp-78] <---- the adress that comes after the jump to cave |
The reason why your game crashes is because you're doing it wrong. I never was a script guy I started with trainer maker kit and it drove me crazy because I had to write the code manually and I made the mistake of not nopping one byte. Maybe you are doing the same. An another possible scenario is that you aren't restoring the original instruction. Or you are writing a wrong code.
I just use Ollydbg to write my code injections and these I implement in my trainer. If you're going to write your own trainers then its better to use Olly and just use the caves located around 10ABF. If you have any other questions just ask.
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
Posted: Sun Dec 13, 2015 6:43 pm Post subject: |
|
|
Castle crashes isn't a simple game. You are making it crash because it accesses several different functions from one single instruction.
Look in the table section for tables for this game and learn what you are doing wrong. Or read the previous replies to your earlier threads, they already answer your questions.
_________________
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun Dec 13, 2015 11:35 pm Post subject: |
|
|
| Gniarf wrote: | | I'm not sure many people beside me do hardcodable hacks... | -I do. But not for cheats.
It's important to note, also, that, codecaves are also used in rare cases that the desired, hard-coded modification is different in size, and all original code that follows be kept intact.
|
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Mon Dec 14, 2015 6:27 am Post subject: |
|
|
in total . games like castle crashers ghost recon advanced warfighter2 should be how to build script that the game suffers trouble.
GH*master can help me in making script for ammo in ghost recon advanced warfighter2.
|
|
| Back to top |
|
 |
sjl002 Master Cheater
Reputation: 0
Joined: 31 Aug 2013 Posts: 305
|
Posted: Tue Dec 15, 2015 6:18 am Post subject: |
|
|
| Please help me.
|
|
| Back to top |
|
 |
Studio80 Advanced Cheater
Reputation: 2
Joined: 12 Sep 2012 Posts: 83
|
Posted: Tue Dec 15, 2015 10:33 pm Post subject: |
|
|
| sjl002 wrote: | | Please help me. |
People can help you if you explain more. If it is an online game than there is a chance that there is some kind of anti cheat program. You need to tackle that one but thats a complicated process.
I havent checked the game out but I assume that its an online game. Many online games store their data on their servers, so it's kinda impossible to make a trainer for them because you need to hack their servers in order to change the data which is stored on their servers.
With cheatengine you could possibly only change the numbers on your screen but they won't be saved on the server.
|
|
| Back to top |
|
 |
|