How to guess in which address is located a variable
Hi, my question is simple, there’s any way of guessing the address in which a variable of a program is located??
For example, if I have this program.
```
include
include <conio.h>
int main(){
int x = 6;
getch();
return 0;
}
```
How can I guess where is x located (Without modifying this program)?
I could just use cheat engine, but in some applications, like for instance, the Windows 10 calculator, you just can’t guess the address with Cheat Engine.
Any help? :)
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
No videos but this link
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
Hi, after learning something about RE and learning to use ollydbg, I’ve been trying to do what I was asking at the beggining of the thread, but I found another problem:
0x008D245E | C745 F8 05000000 | [MOC DWORD PTR SS:[EBP-8],6
If you modify the number at the end, the number it displays when you run the program, will change.
The problem is that I can’t read nor modify this number with C++, as is not really stored in the memory; is just part of the program…. isn’t it?
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
I could, but I want to do it with c++ so I can automatize that.
Imagine I had a game, and I wanted to have infinite life, I would need to guess where’s the address of the life and then create a program with c++ that attached to the process read the memory etc.
The problem is that, at least in this program, which is much more simple than a game, the variable isn’t really stored in memory, but is inside the asm code!!
And I can’t modify the asm code from c++!
Human Stupidity , thats why Hackers always win.
? Med Amine Khelifi
i know this two site, it’s for me interresting site with a lot of tuto
http://opensecuritytraining.info/Training.html
good hacking :)