View previous topic :: View next topic |
Author |
Message |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Wed Sep 28, 2016 2:52 am Post subject: |
|
|
Is that really all of your source code?
|
|
Back to top |
|
 |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Sep 29, 2016 9:33 pm Post subject: |
|
|
You don't seem to understand what you are doing at all. You should stop and actually learn what you are doing and learn the language you are coding in rather than get spoonfed things you don't understand in general. It will just lead to you posting more questions because you are unfamiliar with what you are doing.
_________________
- Retired. |
|
Back to top |
|
 |
hhhuut Grandmaster Cheater
Reputation: 6
Joined: 08 Feb 2015 Posts: 607
|
Posted: Fri Sep 30, 2016 2:55 am Post subject: |
|
|
Well, I can give you some pseudo-code to get the order in which to do things, but as atom0s said, you need to understand what you're doing.
1) Obtain a handle to the target process (using OpenProcess)
2) Get your desired address (if it's static, better use the module+offset combo instead of an absolute hex address, else follow a pointer or something)
3) Call the WriteProcessMemory function with all the arguments and also pay attention to the value size (because if the value you want to change is a 0/1 byte flag, then you don't want to write the whole integer size of 4 bytes)
4) Close the handle to the target process
In addition, I'd always recommend to do some basic exception handling, so i.e. analyze the function results, do some basic checks yourself (address=0), use try-except/finally blocks, etc.
Fun fact: All the above doesn't even require you to inject a complete dll into other processes.
|
|
Back to top |
|
 |
|