-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't load advapi32.dll into injected processes #28
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…revent it from being called every time another DLL is (un)loaded
… advapi32.dll to be loaded into the hooked process
ntdll.h: - Add NtOpenProcessToken() - Add NtPrivilegeCheck() - Add LdrDisableThreadCalloutsForDll() - Make DbgBreakPoint() stdcall ntdll_x86.lib/ntdll_x64.lib: - Replaced with Windows 7 DDK versions containing most/all imports
…y set. The illuminati are on to us
Don't clear some rarely used heap force flags
Use https symbol path in PDBReader
…4dbg/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
Update ntdll.h and ntdll.dll import libs
Don't call DllMain on each DLL (un)load
… advapi32.dll to be loaded into the hooked process
…/ScyllaHide into kill-advapi32-imports # Conflicts: # HookLibrary/HookHelper.cpp
Fuck I hate git. |
Git is love, git is life.
…On Thu, 1 Jun 2017 at 04:07, Matthijs Lavrijsen ***@***.***> wrote:
Merged #28 <#28>.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#28 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACWCmX1B6K4CDgoRhCvoHJXHOEwxDu5Kks5r_hzYgaJpZM4NsR_b>
.
|
mrexodia
pushed a commit
that referenced
this pull request
Nov 5, 2017
Replace HasDebugPrivileges() with a native version that doesn't cause advapi32.dll to be loaded into the hooked process
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Once upon a time, some fool made a PR to improve the NtSetInformationProcess hook. It worked, but this had the side effect of adding an extra import descriptor for to HookLibrary.dll for the HasDebugPrivileges() function, inadvertently causing advapi32.dll to be loaded into every hooked process if it wasn't already. It also added a minor allocation that in hindsight wasn't strictly necessary.
I've come to ask forgiveness and rectify mistakes of the past. This PR modifies HasDebugPrivileges() to use only ntdll.dll, allocate no memory and use at least 3 fewer syscalls.