Commit graph

52 commits

Author SHA1 Message Date
Matthijs Lavrijsen
baa5c8e853
Anti-attach: increase function buffer sizes
Fixes #155
2023-07-30 01:07:02 +02:00
Matthijs Lavrijsen
2276f14771
Add NtUserGetForegroundWindow hook
Fixes #116
2021-01-26 03:47:19 +01:00
Sam Russell
75fde06ac9
Enable OSBuildVersion in plugin menus (#109) 2020-09-09 16:50:28 +02:00
Mattiwatti
265940d076
Process suspend/resume: deal with threads at the max suspend count 2020-05-05 02:01:12 +02:00
Mattiwatti
acb15bbde0
Patch OS build numbers
Ref: #83
2019-12-24 01:33:35 +01:00
Mattiwatti
ad2e52013d
Don't leave RWX pages around after hooking (change to RX) 2019-05-22 01:21:33 +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
6817d32581
Remove NtApiCollection.ini
- Get rid of NtApiLoader and replace it with a syscall lookup table (Windows XP through early 10) or win32u.dll addresses (later Windows 10 versions)
- Remove NtApiTool/PDBReader project since the NtApiCollection.ini file it generates is no longer used
- Rename BlockInput hook to NtUserBlockInput since they are the same function. The INI setting "BlockInputHook" is now also NtUserBlockInputHook
- Merge ApplyUser32Hook and ApplyWin32uHook into ApplyUserHook
2019-05-17 01:10:42 +02:00
Mattiwatti
1bd5c5c8fe
Remove unused ntdll, kernel32/base and user32 handles from DLL data 2019-05-17 00:58:18 +02:00
Mattiwatti
562e201e23
Make it possible to create profiles that do not cause DLL injection 2019-05-16 16:25:55 +02:00
Mattiwatti
79a69ad694
Write hook DLL data inside the process suspend/resume block (#75) 2019-05-08 12:58:38 +02:00
Mattiwatti
97b09f1b97
Make HookXxx functions return bool; false if DetourCreateRemote fails 2019-05-07 21:06:07 +02:00
Mattiwatti
f209f1c2a6
Suspend process when applying and restoring hooks 2019-05-07 21:00:28 +02:00
Mattiwatti
0490dfedfa
Validate bitness of DLL files before injecting them
DLL injection: turn error messages into LogError() calls instead of LogInfo()
2019-04-28 22:24:29 +02:00
Mattiwatti
59e6d23bf8
Don't pass THREAD_CREATE_FLAGS_SUPPRESS_DLLMAINS when injecting a DLL 2019-04-28 20:25:43 +02:00
Mattiwatti
66ec9ad514
Add x64 instrumentation callback hook 2019-04-05 13:00:11 +02:00
Mattiwatti
7dfe524ef2
Dead code removal 2019-03-11 20:29:04 +01:00
Mattiwatti
141c5f18be
ApplyAntiAntiAttach: make sure page is RWX before writing to it 2019-03-06 19:22:57 +01:00
Mattiwatti
2b8025e254
ApplyAntiAntiAttach: remove unneeded check of ntdll image base
Ntdll is in \KnownDLLs, it always has the same image base in all processes. Note/TODO: this does not prevent a process from manually mapping ntdll at more than one address, but this was never detected in the first place
2019-03-06 19:17:08 +01:00
Mattiwatti
7cb474c1d9
DLL injection: replace 'DoThreadMagic' with NtCreateThreadEx-using version 2019-03-06 18:43:30 +01:00
Mattiwatti
00070a089a
Show a messagebox if the hook DLL does not exist, in case of AVs deleting it. #67 2019-03-06 16:08:50 +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
b3cd7589dc
Fix double free in StealthDllInjection() 2017-10-12 21:00:49 +02:00
Mattiwatti
fb3887d1b3
Do not copy the hook DLL image headers to the target process after mapping sections.
This stops my 5 year old niece's "MZ" scanner from finding HookLibrary.dll. The headers were never needed by HookLibrary itself, as evidenced by the fact that we were copying the headers with the wrong (non-relocated) base address anyway.

Wiping the headers in MapModuleToProcess() is optional so as to not further break injection of other DLLs than HookLibrary (which should theoretically be possible according to legends)
2017-10-11 20:20:25 +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
Aleksey Katargin
661905914c
move global HookDllData from Injector to each plugin 2017-03-03 19:26:11 +05:00
Aleksey Katargin
c403b88ddc
fix process leak 2017-03-03 19:25:31 +05:00
Aleksey Katargin
ab6d866511
rename HOOK_DLL_EXCHANGE -> HOOK_DLL_DATA 2017-03-03 18:58:52 +05:00
Aleksey Katargin
45e359e4dc
cleanup wow64 code 2017-03-03 11:46:25 +05:00
Aleksey Katargin
7419330d6a
refactored PEB hider 2017-03-03 11:30:28 +05:00
mrexodia
a229546d28
remove annoying message boxes when NtApi* is missing (now logged as ERROR instead) 2017-03-02 23:03:32 +01:00
Aleksey Katargin
2567a3de9a
move RemotePebHider to Scylla/PebHider 2017-03-02 17:46:01 +05:00
Aleksey Katargin
a2436ef6e8
add logging prefix in plugins and remove it in file logging 2017-02-25 17:28:46 +05:00
Aleksey Katargin
4e896f26f6
new global logging 2017-02-25 16:19:53 +05:00
Aleksey Katargin
73982c7f6c refactor nt api collection stuff 2017-01-25 09:44:32 +05:00
Aleksey Katargin
ac440be909
rename internal option names 2017-01-07 21:09:50 +05:00
Aleksey Katargin
9f03e35da3
rename namespace Scylla -> scl 2017-01-07 13:30:47 +05:00
Aleksey Katargin
40e26c4d6f
moved settings to new settings class 2017-01-05 12:44:06 +05:00
Aleksey Katargin
b5c3673876
plugin/x64dbg: reformat sources 2017-01-04 14:28:31 +05:00
Aleksey Katargin
60e957b398 move hide settings to scylla lib (#20) 2017-01-04 12:41:33 +05:00
Aleksey Katargin
035e5909dc
move and refactor os info functions 2016-11-29 10:51:39 +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
mrexodia
7405d2f2f7 compiling under vs13 2016-01-27 06:24:21 +01:00
dfgdfgdfg
957afc0a63 removed useless message 2014-09-14 11:53:29 +02:00
dfgdfgdfg
381644268c better injector 2014-09-06 15:51:28 +02:00
dfgdfgdfg
1a73c87787 new anti-attach for olly2 and x64dbg 2014-08-30 11:38:43 +02:00
dfgdfgdfg
b3456cb552 better anti-anti-attach for olly1 2014-08-29 21:31:00 +02:00
dfgdfgdfg
48575f839c kill anti-attach not available for x64 2014-08-16 17:31:49 +02:00
dfgdfgdfg
77e15c7c68 fixed 2 bugs 2014-05-13 19:10:29 +02:00
cypherpunk
a260237512 added kill anti-attach hook 2014-05-13 14:36:50 +02:00