Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Memory writing/reading protection - VirtualProtect

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
itsoqrappy
Advanced Cheater
Reputation: 0

Joined: 24 Mar 2016
Posts: 67

PostPosted: Fri Apr 22, 2016 12:36 pm    Post subject: Memory writing/reading protection - VirtualProtect Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Apr 22, 2016 2:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
itsoqrappy
Advanced Cheater
Reputation: 0

Joined: 24 Mar 2016
Posts: 67

PostPosted: Fri Apr 22, 2016 2:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Apr 22, 2016 8:53 pm    Post subject: Reply with quote

Check the return of VirtualProtect, make sure it didn't fail.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
itsoqrappy
Advanced Cheater
Reputation: 0

Joined: 24 Mar 2016
Posts: 67

PostPosted: Sat Apr 23, 2016 4:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites