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 


[Page Problem] ReadWrite still contains EXECUTE

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Mar 22, 2009 9:21 am    Post subject: [Page Problem] ReadWrite still contains EXECUTE Reply with quote

I want to protect a piece of memory that contains PAGE_READWRITE but not PAGE_EXECUTE.

So I do this:
VirtualProtect(pointer($00401000),5,PAGE_READWRITE,op);

But it still has the PAGE_EXECUTE flag on it. Is it possible to remove the EXECUTE flag while keeping the READWRITE flag?
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Mar 22, 2009 12:23 pm    Post subject: Reply with quote

It's actually because, without PAE, or DEP enabled on the process, there are only two memory types: READ/EXECUTE and WRITE/EXECUTE. If you want to be able to remove the EXECUTE flag, launch the program under DEP, or go into your boot.ini file and change /noexecute=optin (the default) to /noexecute=optout.

Alternatively you could just use PAGE_NOACCESS, but then you'd have to handle all the reads/writes as well.

Granted, I just woke up, so I probably missed something here.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Mar 22, 2009 12:31 pm    Post subject: Reply with quote

So is there a way of launching a program with DEP w/o changing Boot.ini.

Google won't give me an answer...
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Sun Mar 22, 2009 4:32 pm    Post subject: Reply with quote

Right click on 'My Computer'.
Click on 'Change Settings'.
Click on the 'Advanced' tab.
Click on the 'Settings' button under 'Performance.'
Click on the 'Data Execution Prevention' tab.
Choose the second radio button.
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Mar 22, 2009 4:53 pm    Post subject: Reply with quote

I know that... But is it possible to enable it for 1 program. Though code? Not manual user settings?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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