66 Commits

Author SHA1 Message Date
Matthijs Lavrijsen 37b35ddcb1 Add Cheat Engine to hidden process/window lists
Reference: #154
2023-05-11 23:23:54 +02:00
Matthijs Lavrijsen 74d928f6a2 Add API monitor and new WinDBG to hidden process/window lists
Closes #154
2023-05-11 22:38:55 +02:00
rise a0e5b8f2b1 Add Process Monitor blacklisted processes (#142) 2022-04-26 11:22:19 +02:00
Matthijs Lavrijsen 7e648fb29e Update default Themida settings profile
Support for the latest Themida is incomplete, see #127
2021-08-23 15:27:50 +02:00
Mattiwatti 684af33c46 Instrumentation callback improvements and fixes
- Fix "initialization error 1" on Windows 7/8/8.1 and supported (= with known syscall tables) versions of Windows 10
- Zero extend the value of RAX on x64 when returning an NTSTATUS
- Fix access violation on instrumentation callback removal on Windows 7/8/8.1
2019-06-03 03:14:45 +02:00
Mattiwatti 956fea4e6d Improve NtUserBuildHwndList hook
- Query NtUserGetClassName and NtUserInternalGetWindowText addresses using the new syscall lookup magic
- Add IsWindowBad() helper function which determines for a given HWND not only whether it belongs to the debugger process by PID, but also whether is has a forbidden class name or window text
- FilterHwndList: instead of only comparing against the protected PID, use IsWindowBad() both to determine which HWNDs to overwrite and which ones are good replacements. This allows you to have e.g. IDA and x64dbg open and both will be hidden, even if only x64dbg is actively debugging
2019-05-18 03:25:07 +02:00
Mattiwatti 0a03ffd378 Add Windows 10 WOW64 instrumentation callback hook 2019-05-03 23:23:07 +02:00
Mattiwatti d16ca2d1c2 Move RealGetSystemTime and RealGetLocalTime to HookHelper.cpp 2019-05-03 23:22:18 +02:00
Mattiwatti d26e4dde45 Update ntdll.h 2019-04-05 00:18:39 +02:00
Mattiwatti a88c9695ad The code was dead 2017-11-11 23:28:27 +01:00
Mattiwatti e4baef943c GetExplorerProcessId() really only has to exist in one place 2017-11-11 23:25:08 +01:00
Mattiwatti daefbae3bb Change wcsistr to RtlUnicodeStringContains and make IsWindow[Class]NameBad use this to save pointless string copying 2017-11-11 22:57:25 +01:00
Mattiwatti 51ed290240 GetProcessIdByName():
- Take a PUNICODE_STRING and use RtlEqualUnicodeString instead of _wcsicmp
- Fix off-by-one error in SystemProcessInformation enumeration
2017-11-11 18:31:01 +01:00
Mattiwatti 4c1d62f47f Add IDA 7.0 process names. You're welcome Hex-Rays SA 2017-11-09 21:00:15 +01:00
Mattiwatti 1100da8b60 IsProcessBad(): we already have a length counted string. No need to throw away the length, allocate 800 bytes, zero them, copy the string, then do an equality comparison which requires length counting anyway. Instead just call RtlEqualUnicodeString
IsWindowClassBad and IsWindowNameBad still require 'wcsistr'. Added TODO note to wcsistr to rename it and make it take a PUNICODE_STRING in order to increase sanity levels
ScyllaTest: call FreeConsole before exiting
2017-11-09 20:56:00 +01:00
Mattiwatti 4dd48ed40f HookHelper fixes/cleanup:
- Remove _wcslen, _strlen and _wcscat which are already provided as compiler intrinsics and as ntdll exports
- wcsistr (1): fix off-by-one error by changing < to <=, and remove 'if (l1 == l2)' check because the for loop already does the same thing
- wcsistr (2): fix bug introduced by me causing wcsistr(L"asdf", L"asd") to return false. Now we're back to using _wcsicmp and _wcsnicmp together
- Misc dead code removal/variable naming
2017-11-09 19:45:52 +01:00
Mattiwatti 36617dde6e NtQuerySystemInformation hook: add SystemHandleInformation and SystemExtendedHandleInformation. Handles to objects of types DebugObject, Process and Thread are filtered out.
Currently this is done by PID *for the debugger process only* (i.e., it does not work when using the CLI, and it does not hide a process handle from windbg.exe to the debuggee if ScyllaHide is running as an x64dbg plugin)
2017-10-26 21:48:02 +02:00
Mattiwatti 16cdecfcc3 Remove duplicate "WinDbg" array entry and fix capitalisation 2017-10-11 19:55:43 +02:00
mrexodia 51601ab291 added some more blacklisted processed from CodeMeter 2017-06-28 14:03:16 +02:00
Mattiwatti a77aa2e9e3 Update ntdll.h 2017-06-14 22:10:58 +02:00
Mattiwatti 88a0a3b36f "explorer.exe" is an immutable string, no need to have it taking up space in .data and no need to length count it either. Use string literals and turn on the magic of /GF to fold them into one string
Do the same with functions and /Gy
2017-06-04 22:41:48 +02:00
Mattiwatti 289ba72610 _wcsicmp and _wcsnicmp: two come in, one comes out 2017-06-04 22:40:30 +02:00
Mattiwatti 14b20be466 20/20: ReadProcessMemory 2017-06-04 21:42:52 +02:00
Mattiwatti 8826fed22f 19/20: VirtualFree 2017-06-04 21:36:10 +02:00
Mattiwatti 75805ccaf9 18/20: VirtualAlloc 2017-06-04 21:33:55 +02:00
Mattiwatti c5d2c7e7a7 17/20: TerminateProcess 2017-06-04 21:19:29 +02:00
Mattiwatti 7715ebc23a 16/20: OpenProcess 2017-06-04 21:17:08 +02:00
Mattiwatti 18bc17c022 12/20: GetCurrentThreadId 2017-06-04 20:56:12 +02:00
Mattiwatti 4d3a46e7c7 10/20: WriteFile 2017-06-04 20:49:44 +02:00
Mattiwatti d737775c9b 9/20: CreateFile 2017-06-04 20:43:43 +02:00
Mattiwatti c215fd00e5 6-8/20: CreateToolhelp32Snapshot, Process32First, Process32Next 2017-06-04 20:30:55 +02:00
Mattiwatti 93f3a5ac5e 5/20: GetModuleFileNameW 2017-06-04 20:12:43 +02:00
Mattiwatti bc509eb87e 4/20: lstrcmpiW 2017-06-04 19:40:11 +02:00
Mattiwatti 9ed23f08e6 3/20: CloseHandle 2017-06-04 19:33:08 +02:00
Mattiwatti 6561db2838 2/20: GetVersionExW 2017-06-04 19:29:13 +02:00
Mattiwatti 391e4612e5 Dead code removal 2017-06-04 18:27:22 +02:00
Mattiwatti b77430f4dd Update ntdll.h. A lot (#26)
Some minor type cast and include changes in as part of the fallout of the ntdll change
2017-06-04 17:30:59 +02:00
Mattiwatti 0949ab4a48 Fix VS2017 pointer truncation warnings (all PIDs, ie false positives)
Remove unused GetCsrssProcessId() which was totally wrong anyway :P
2017-06-03 21:43:09 +02:00
Matthijs Lavrijsen fa6d02f31b Don't load advapi32.dll into injected processes (#28)
Replace HasDebugPrivileges() with a native version that doesn't cause advapi32.dll to be loaded into the hooked process
2017-06-01 04:07:19 +02:00
Mattiwatti f512ff2ef3 Merge most of d349efa ('update ntdll lib') from https://github.com/x64dbg/ScyllaHide/compare/devel/gureedo to ease a future branch merge. The import libs are the same XP ones from the Windows 7 DDK but edited to fix compilation in VS2015/VS2017 with the Windows 10 SDK 2017-06-01 02:50:04 +02:00
Aleksey Katargin ab6d866511 rename HOOK_DLL_EXCHANGE -> HOOK_DLL_DATA 2017-03-03 18:58:52 +05:00
gureedo 5b2007e269 new solution layout 2016-11-20 13:15:25 +05:00
Aleksey Katargin 2aab7f2cf0 improve win10 wow64 support (#10)
* remove useless size check of struct HOOK_DLL

* improved win10 wow64 support
2016-11-06 17:37:55 +01:00
Mattiwatti af4342ef1f Fix a minor mistake in HasDebugPrivileges(): it's possible to have default enabled privileges that have been removed during the lifetime of a process. In this case the privileges are NOT held 2016-10-21 04:02:47 +02:00
Mattiwatti db4f1634a7 Several fixes to improve the accuracy of the NtSetInformationProcess hook behaviour
- For ProcessInformationClass == ProcessHandleTracing, turned ProcessInformationLength == 0 into a valid case. This disables tracing and causes all other parameter checks to be skipped, so passing e.g. a bogus pointer with ProcessInformationLength 0 will still succeed. This is as per the real function
- For ProcessInformationClass == ProcessHandleTracing, ValueProcessBreakOnTermination can now be set to false (in the case that length is 0 as noted above). Previously calling the function would always 'enable' the flag, even when called with parameters that should disable it
- Moved 'ProcessInformation != 0' checks for ProcessHandleTracing and ProcessBreakOnTermination cases further down and turned them into faux access violations. We can let the real NtSetInformationProcess take the AVs, but the problem with this is that the order of parameter checks would be subtly changed.
- Test whether the struct passed in for ProcessHandleTracing (PROCESS_HANDLE_TRACING_ENABLE/PROCESS_HANDLE_TRACING_ENABLE_EX) has Flags set to 0, the only allowed value. Other values now cause STATUS_INVALID_PARAMETER instead of success
- The ProcessBreakOnTermination flag may only be set by a process that has debug privileges enabled. This is now enforced by querying the process token privileges and returning STATUS_PRIVILEGE_NOT_HELD if it doesn't have debug privileges. Because this check occurs fairly deep within the real NtSetInformationProcess, I've also had to add length and null pointer checks before the privilege check to preserve the order of parameter validation
2016-10-21 03:09:44 +02:00
mrexodia 867bb2a920 more fixes for x64dbg 2016-03-22 03:57:57 +01:00
dfgdfgdfg b7e59ddccd removed debug comment 2014-05-12 19:36:51 +02:00
dfgdfgdfg cdf6b7a13a fixed 64bit alignment 2014-05-10 18:47:56 +02:00
dfgdfgdfg a4012fff52 fixed runpe unpacker 2014-05-08 21:32:11 +02:00
dfgdfgdfg e03b7e3730 improved malware unpacker 2014-05-07 20:59:08 +02:00