Questions tagged [openprocess]
50 questions
25
votes
1 answer
Windows Vista/Windows 7 privilege: SeDebugPrivilege & OpenProcess
Everything I've been able to find about escalating to the appropriate privileges for my needs has agreed with my current methods, but the problem exists. I'm hoping maybe someone has some Windows Vista/Windows 7 internals experience that might shine…

KevenK
- 2,975
- 3
- 26
- 33
6
votes
0 answers
Why do I need to acquire the debug privilege to use OpenProcess with minimal permissions when running as an admin?
One of my programs attempts to call OpenProcess on another of my programs, which is a service. The first program is running either as the local Administrator account or as another member of the Administrators group, and the service is running as the…

Rob Kennedy
- 161,384
- 21
- 275
- 467
6
votes
3 answers
OpenProcess: access denied error only on Windows 8.1
I have a program which adjusts SeDebugPrivilege and then starts to iterate through system processes and calls OpenProcess for them (and does other stuff, but it's not important now). Also the program runs in administrator mode of course. On Windows…

Zoltán Várnagy
- 137
- 2
- 11
4
votes
1 answer
C# ReadProcessMemory alternative
I'm trying to ReadProcessMemory on a certain process but it uses ObRegisterCallbacks to prevent another process to create a handle on it (OpenProcess). I have heard of people creating their own memory reading utilites in C# without ReadProcessMemory…

Joshe 343
- 41
- 3
3
votes
1 answer
Access Denied Calling OpenProcess From Process Running As IIS APPPOOL Account on Windows Server 2019
A tool for collecting diagnostic info, running under an account IIS APPPOOL\Content Server is attempting to make the following call:
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, false, );
Process ID refers to a process running…

Malcolm McCaffery
- 2,468
- 1
- 22
- 43
3
votes
1 answer
WinAPI: OpenProcess() returns error 5 with SeDebugPrivilege enabled for host process
I've got a routine where I process-walk to obtain the HANDLE of each process as I 'walk' down the list (which works fine), but my issue lies when I do:
HANDLE h = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID) where PROCESS_ALL_ACCESS is…

David S.
- 730
- 1
- 7
- 23
3
votes
3 answers
VC++ 2008, OpenProcess always returning error 5 (Access Denied)
Would anyone know why MSVC++ 2008 always returns error 5 on GetLastError() when I try to call OpenProcess with PROCESS_ALL_ACCESS as my desired access? PROCESS_VM_READ works just fine. I'm an administrator on this computer and it is working fine in…
Daniel
3
votes
2 answers
how GetExitCodeProcess get exit code when the process is not there anymore
I first get handle to a process by using OpenProcess.
Then I call GetExitCodeProcess in a loop to see if the process is running.
But how does GetExitCodeProcess get exit code? Does Windows store exit code of all processes that ran in the past 30…

user156144
- 2,215
- 4
- 29
- 40
2
votes
1 answer
Process access rights seem to differ when run from the compiler and as a standalone exe
I am using WINAPI for a program that I am writing. The program has the ProcessId of another process and needs to get a handle of it (to be able to terminate it later, and also to periodically check if the process is alive and responding by using…

Fy Zn
- 151
- 7
2
votes
3 answers
OpenProcess error 87 invalid parameter
I'm trying to write a program which executes make.exe from MinGW distribution in the current directory and makes use of its STDOUT data and exit code. I have a handle to process STDOUT where I fetch data from, created with CreatePipe. When I get an…

user389419
- 243
- 1
- 2
- 8
2
votes
1 answer
Check (as normal user) if admin process is running (C, Windows)
I'm trying to check if the process, started from the service, is running.
The problem is, that we migrate our app from Windows XP to Windows 7. One part of this app is the service, which starts some processes. Another part is a dialog app. This…

michalp
- 83
- 5
2
votes
0 answers
Overflow Issue with VirtualQueryEx in C# compiled for x64
I've been trying to create my own memory reader in C# based on a couple of articles I've seen on CodeProject. I got everything working as I would have liked when compiled for 32-bit Windows, but the issues began when I tried to convert over to a…

Oblag
- 21
- 1
- 2
2
votes
1 answer
OpenProcess iexplore.exe on other user accounts fails with Access Denied
I'm working on enumerating instances of iexplore.exe across all users. I'm able to get a list of the matching processes on the machine, but to identify the user, I need to use OpenProcess. This works on my own instances, but even with Run as…

tofutim
- 22,664
- 20
- 87
- 148
2
votes
1 answer
internet explorer, google chrome injection
I wrote code that injects a function in Internet Explorer/Chrome but it doesn't work with these processes. Basically, it fills one big structure with all the APIs my function needs, strings, and other data, then it opens a process to get a handle,…

Volim Te
- 21
- 2
1
vote
1 answer
Get full executable path of SYSTEM process without full admin rights/elevation on Windows?
On Windows, it is possible to enumerate all running processes on the system, e.g. via the CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS...) API.
However, this will directly only report the executable name and the process ID without further info.
To…

Martin Ba
- 37,187
- 33
- 183
- 337