| View previous topic :: View next topic |
| Author |
Message |
justicar How do I cheat?
Reputation: 0
Joined: 22 Mar 2012 Posts: 2
|
Posted: Thu Mar 22, 2012 4:22 am Post subject: Negative Hex Offset |
|
|
I've followed several tutorials showing how to find a pointer to a memory location that will persist after restarting the target app. However, when manually adding a pointer/offset, the offset I find is negative like this:
| Code: | 012D14EE - 8B 45 F8 - mov eax,[ebp-08]
012D14F1 - 83 C0 01 - add eax,01
012D14F4 - 89 45 F8 - mov [ebp-08],eax <<
012D14F7 - 8B F4 - mov esi,esp
012D14F9 - A1 34A32D01 - mov eax,[_imp_?endlstdYAAAV?$basic_ostreamDU?$char_traitsDstd]
EAX=0000303E
EBX=7EFDE000
ECX=26FAF52D
EDX=5151F498
ESI=001FF758
EDI=001FF754
ESP=001FF758
EBP=001FF83C
EIP=012D14F7 |
I am on Win7 x64, trying CE against a tiny cpp program I wrote. How can I enter this offset value into the textbox?
The program source follows:
| Code: | #include <iostream>
using namespace std;
int main()
{
int zz = 12345;
int test;
while (true) {
zz++;
cout << "The value is " << zz << endl;
cin >> test;
}
return 1;
}
|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Thu Mar 22, 2012 4:41 am Post subject: |
|
|
fffffff8 is -8
Anyhow, this is not a pointer but a local stack value (temporary value that will be destroyed as soon as the function returns)
Try this code instead:
| Code: |
#include <iostream>
using namespace std;
int zz = 12345;
int test;
int main()
{
while (true) {
zz++;
cout << "The value is " << zz << endl;
cin >> test;
}
return 1;
}
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
justicar How do I cheat?
Reputation: 0
Joined: 22 Mar 2012 Posts: 2
|
Posted: Thu Mar 22, 2012 4:51 am Post subject: |
|
|
Comes up green, thank you!
P.S. If the code were written as the original, is there a way to manufacture a pointer that can be used in future invocations of the program?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25831 Location: The netherlands
|
Posted: Thu Mar 22, 2012 9:53 am Post subject: |
|
|
no, not unless another piece of code stores that address, or a relative address in a static address
There has to be a link to the address. (e.g direct3d might keep a static pointer to your variable, or a physics engine, etc...)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|