frida-python
frida-python copied to clipboard
Frida fails attaching to a process in session 0
Hello, I have a Windows service that spawns a new process. All of them runs under Windows Session 0. Attempting to attach to this process fails with the error: Failed to attach: unexpected error allocating memory in target process (VirtualAlloc returned 0x00000005) I think that is due mainly to the isolation of Session 0. (I'm running Frida with a system token). Any help ? correct me if I'm wrong.
I did test attaching to other processes in Session 0 using Frida and it works ! I don't see the reason why I have this issue.
I'm guessing you moved on a long time ago, but I had this error and couldn't see any info on it. I found that it was because I was trying to attach to a 32-bit process with a 64-bit python install. Once I installed 32-bit python and frida-tools in that instance it worked ok.
I think the VirtualAlloc error is because the address provided is being coerced (?) into a 32-bit integer which is then not valid in the target process' address space.