I'm currently working on getting my malware removal tool FreeFixer up and running on
the Windows Vista platform. FreeFixer woks by scanning the registry and the file system to find unwanted software.
It is also enumerating
processes, their file names and their modules. This is were I ran into some minor problem. On Windows XP I had previously
obtained the SeDebugPrivilege privilege (defined as SE_DEBUG_NAME) and then opened
all processes with the OpenProcess system call and passing PROCESS_QUERY_INFORMATION | PROCESS_VM_READ as the
requested access.
However, on Windows Vista OpenProcess failed on Audiodg.exe, with the ERROR_ACCESS_DENIED
error code.
Windows Vista introduced a new type of process, the
protected process. Protected processes are there
to enhance support for digital rights management functionality in Windows Vista
.
[1]
A typical protected process does not allow
injecting a thread into the process,
accessing virtual memory of process,
debugging the process,
duplicate handles of the process,
changing the quota or working set of a process.
You cannot open a typical protected process with PROCESS_QUERY_INFORMATION nor PROCESS_VM_READ.
Luckily Vista introduced the PROCESS_QUERY_LIMITED_INFORMATION, which is a limited version of the
PROCESS_QUERY_INFORMATION access right. This will allow you to open the process with OpenProcess
and at least get the full path of the protected process. I think - please correct me if I'm wrong - that
it's not possible to enumerate the modules of audiodg.exe from without the help of a kernel-mode component?
your suggestion does well in other process such as csriss ...
but it dose't work on augiodg.exe.
# 13 Oct 2009, 0:32
Agree with @guoyafeng. You can't get the full path of audiod.exe using the PROCESS_QUERY_LIMITED_INFORMATION flag. You can only get the process handle with OpenProcess() but EnumProcessModules() returns NULL for hModule. That's why you can't proceed to get the full path with GetModuleFileNameEx().
You can easily try this out by following the sample at
http://msdn.microsoft.com/en-us/library/ms682623(VS.85).aspx
and setting the priviledge to SE_DEBUG_NAME.
# 29 Oct 2009, 9:03
When I take my speakers jack out of the back of the computer, & plug the headphone jack in, the "Windows Media Player & or "Winamp" applications have distorted audio, sounding like a person who has swallowed Helium".
# 23 Dec 2009, 14:37
guoyafeng writes