Sysinternals Homepage
Forum Home Forum Home > Windows Discussions > Development
  New Posts New Posts RSS Feed: Changing page permissions
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Changing page permissions

 Post Reply Post Reply Page  <12
Author
Message Reverse Sort Order
ks2d View Drop Down
Newbie
Newbie


Joined: 23 May 2006
Location: India
Online Status: Offline
Posts: 8
Post Options Post Options   Quote ks2d Quote  Post ReplyReply Direct Link To This Post Topic: Changing page permissions
    Posted: 29 May 2006 at 3:07pm

Thanks a lot...but my problem is that my input is not a process handle but a virtual memory range

...and even if we could get the process handle i still dont know how to change the permissions...

"not all who wander r lost"
Back to Top
EP_X0FF View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 March 2006
Location: Russian Federation
Online Status: Offline
Posts: 4753
Post Options Post Options   Quote EP_X0FF Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 10:43am
NtQueryVirtualMemory ...heh...
Ring0 - the source of inspiration
Back to Top
MP_ART View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 March 2006
Location: Russian Federation
Online Status: Offline
Posts: 947
Post Options Post Options   Quote MP_ART Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 10:33am
Back to Top
ks2d View Drop Down
Newbie
Newbie


Joined: 23 May 2006
Location: India
Online Status: Offline
Posts: 8
Post Options Post Options   Quote ks2d Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 8:21am

i am a total newbie...can u tell me which functions will do the trick...

i will just have an absolute address range...like the input parametres to VirtualProtect()...

"not all who wander r lost"
Back to Top
MP_ART View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 March 2006
Location: Russian Federation
Online Status: Offline
Posts: 947
Post Options Post Options   Quote MP_ART Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 7:55am
You can try sequential query on page aligned addresses from given range.
Back to Top
ks2d View Drop Down
Newbie
Newbie


Joined: 23 May 2006
Location: India
Online Status: Offline
Posts: 8
Post Options Post Options   Quote ks2d Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 5:29am

not necessarily the entire working set just a subset of the working set.

but is it possible to change the permissions of the ebtire working set anyways (including code section)

"not all who wander r lost"
Back to Top
EP_X0FF View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 March 2006
Location: Russian Federation
Online Status: Offline
Posts: 4753
Post Options Post Options   Quote EP_X0FF Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 5:23am
QueryWorkingSet?
you want to do this via driver?

Edited by EP_X0FF - 29 May 2006 at 5:27am
Ring0 - the source of inspiration
Back to Top
ks2d View Drop Down
Newbie
Newbie


Joined: 23 May 2006
Location: India
Online Status: Offline
Posts: 8
Post Options Post Options   Quote ks2d Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2006 at 5:10am

Is there a way i can get the PFNs for a given virtual memory range and subsequently change the permissions of those pages to READ-WRITE (using kernel mode priviledges in a device driver)?

N.B.:I cant directly use VirtualProtect() directly as i would have no way of knowing what chunk was allocated using VirtualAlloc()

"not all who wander r lost"
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down