| View previous topic :: View next topic |
| Author |
Message |
itsoqrappy Advanced Cheater
Reputation: 0
Joined: 24 Mar 2016 Posts: 67
|
Posted: Fri Apr 22, 2016 12:36 pm Post subject: Memory writing/reading protection - VirtualProtect |
|
|
I've tested a code to write/read a pointer.
I'm currently writing to the pointer a float value like this:
| Quote: | | *(DWORD*)(thefifth) = (float)0; |
which works to another game for testing purposes, but not on this.
How can I check if there is some memory protections? Thanks in advance.
@ParkourPenguin
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Apr 22, 2016 2:35 pm Post subject: |
|
|
Given the code you posted it looks like you are injected. You can use VirtualProtect to adjust the protection at the given address. If you just want to see what the protections are in the processes memory, you can use VirtualQuery.
_________________
- Retired. |
|
| Back to top |
|
 |
itsoqrappy Advanced Cheater
Reputation: 0
Joined: 24 Mar 2016 Posts: 67
|
Posted: Fri Apr 22, 2016 2:43 pm Post subject: |
|
|
| atom0s wrote: | | Given the code you posted it looks like you are injected. You can use VirtualProtect to adjust the protection at the given address. If you just want to see what the protections are in the processes memory, you can use VirtualQuery. |
Yeah, I know I can use VirtualProtect, but:
| Quote: | DWORD oldProtect;
VirtualProtect((LPVOID)(thefifth), sizeof(DWORD), PAGE_EXECUTE_READWRITE, &oldProtect);
*(DWORD*)(thefifth) = (float)0;
VirtualProtect((LPVOID)(thefifth), sizeof(DWORD), oldProtect, &oldProtect); |
still doesn't work. As without VirtualProtect doesn't work for sure there is some protections. BUT generally in both case it doesn't work.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Apr 22, 2016 8:53 pm Post subject: |
|
|
Check the return of VirtualProtect, make sure it didn't fail.
_________________
- Retired. |
|
| Back to top |
|
 |
itsoqrappy Advanced Cheater
Reputation: 0
Joined: 24 Mar 2016 Posts: 67
|
Posted: Sat Apr 23, 2016 4:33 am Post subject: |
|
|
| atom0s wrote: | | Check the return of VirtualProtect, make sure it didn't fail. |
Solved. It wans't a VirtualProtect probelm, but an addy problem (which i forgot to change) (facepalm).
|
|
| Back to top |
|
 |
|