Well, the title sumarizes my question, but I will elaborate. I have always thought that any process runing with no admin rights shouldn't be able to access the memory space of any other process, and of course shouldnt be able to halt it's execution.
However, with visual studio running under a non-privileged account, I am able to attach to some processes runing under the same account and debug them. Why is this possible? Shouldn't the operative system prevent this?
Thanks in advance and cheers
for access say memory space of any other process we need open process with
PROCESS_VM_READ|PROCESS_VM_OPERATION|PROCESS_VM_WRITE
.. for this not mandatory need haveSE_DEBUG_PRIVILEGE
- if process running in same session as debugger, have the same token - usually it security descriptor (DACL
) let open it for this debugger. this is absolutely expected. so question here - are we can open process with full access for debugging ? if this "peer" process (running under same user, with same privileges) - why not ?and from DebugActiveProcess function
and remark from yourself - except protected processes, if only your debugger when called DebugActiveProcess also protected process (with not less level of protection) (yes this is possible debug protected processes also)