summaryrefslogtreecommitdiff
path: root/inject
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-07-15 16:10:39 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-07-15 16:17:10 +0100
commitadf4f979d0c0da219186413caf7a7f440ab55a6d (patch)
tree254544cb6188a90ee67c3451ab325295c0120eeb /inject
parent498710d4c9fe6f3b432ac7a7acd69b70d6a32bd3 (diff)
inject: Don't intercept CreateProcessAsUserA.
Given it's implemented by advapi32.dll, not kernel32.dll.
Diffstat (limited to 'inject')
-rw-r--r--inject/injectee.cpp40
1 files changed, 1 insertions, 39 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp
index 60d2b4e0..620da112 100644
--- a/inject/injectee.cpp
+++ b/inject/injectee.cpp
@@ -210,44 +210,6 @@ MyCreateProcessW(LPCWSTR lpApplicationName,
}
static BOOL WINAPI
-MyCreateProcessAsUserA(HANDLE hToken,
- LPCSTR lpApplicationName,
- LPSTR lpCommandLine,
- LPSECURITY_ATTRIBUTES lpProcessAttributes,
- LPSECURITY_ATTRIBUTES lpThreadAttributes,
- BOOL bInheritHandles,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCSTR lpCurrentDirectory,
- LPSTARTUPINFOA lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation)
-{
- if (VERBOSITY >= 2) {
- debugPrintf("inject: intercepting %s(\"%s\", \"%s\", ...)\n",
- __FUNCTION__,
- lpApplicationName,
- lpCommandLine);
- }
-
- BOOL bRet;
- bRet = CreateProcessAsUserA(hToken,
- lpApplicationName,
- lpCommandLine,
- lpProcessAttributes,
- lpThreadAttributes,
- bInheritHandles,
- dwCreationFlags,
- lpEnvironment,
- lpCurrentDirectory,
- lpStartupInfo,
- lpProcessInformation);
-
- MyCreateProcessCommon(bRet, dwCreationFlags, lpProcessInformation);
-
- return bRet;
-}
-
-static BOOL WINAPI
MyCreateProcessAsUserW(HANDLE hToken,
LPCWSTR lpApplicationName,
LPWSTR lpCommandLine,
@@ -968,7 +930,7 @@ registerProcessThreadsHooks(const char *szMatchModule)
FunctionMap & functionMap = module.functionMap;
functionMap["CreateProcessA"] = (LPVOID)MyCreateProcessA;
functionMap["CreateProcessW"] = (LPVOID)MyCreateProcessW;
- functionMap["CreateProcessAsUserA"] = (LPVOID)MyCreateProcessAsUserA;
+ // NOTE: CreateProcessAsUserA is implemented by advapi32.dll
functionMap["CreateProcessAsUserW"] = (LPVOID)MyCreateProcessAsUserW;
// TODO: CreateProcessWithTokenW
}