Skip to content
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

FYI Your handle hijacking doesn't work. #125

Open
SigmaSkid opened this issue Dec 19, 2023 · 4 comments
Open

FYI Your handle hijacking doesn't work. #125

SigmaSkid opened this issue Dec 19, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@SigmaSkid
Copy link

NtQuerySystemInformation finds the open handle, with the path to the cheats .exe,
instead of the process whose handle we're trying to hijack.
Hope this helps <3

@ifBars
Copy link
Collaborator

ifBars commented Dec 19, 2023

Care to elaborate? In my tests it seemed like the program was reading and writing to the memory of the hijacked handle just fine, and if the cheats are working, which they were during my testing, then it's obviously writing and reading memory from the right process, correct me if I am wrong.

Of course just because the cheats work doesn't mean the handle is hijacked successfully, but the program does output whether it is using the hijacked handle or open process to read and write memory, therefore if it's outputting that it is using said hijacked handle, then I would assume that reading/writing to memory would not work, aka the cheats would not work, due to the fact that the hijacked handle is not correct (in your theory). Sorry if this is a bit unclear.

@SigmaSkid
Copy link
Author

What I'm saying, is that it's detected by this old vac module:
https://github.com/danielkrupinski/VAC/blob/master/VAC/Modules/ProcessHandleList/ProcessHandleList.c
A vac dummy I'm using for testing successfully detects and blocks the handle, then prints the path to the cheats.exe.
One of the recent windows updates seems to have made changes to https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-zwduplicateobject
image

@ifBars
Copy link
Collaborator

ifBars commented Dec 19, 2023

What I'm saying, is that it's detected by this old vac module:

https://github.com/danielkrupinski/VAC/blob/master/VAC/Modules/ProcessHandleList/ProcessHandleList.c

A vac dummy I'm using for testing successfully detects and blocks the handle, then prints the path to the cheats.exe.

One of the recent windows updates seems to have made changes to https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-zwduplicateobject

image

That makes more sense now. Even though it is detected, VAC doesn't do anything with it in CS2 currently. It falls between that fine line of detected but not bannable, for now at least. If anyone doesn't believe me feel free to try it yourself, hijacking a handle doesn't result in a ban or lowered trust, even though VAC can detect it with no problems at all.

@IMXNOOBX
Copy link
Owner

IMXNOOBX commented Dec 19, 2023

Thanks for explaining this issue clearly, i will try to investigate it further more. Also take into account that if the handle hijack fails to get a handle, it will fall back to the normal open handle, this is done to make it simpler for the user as many are inexperienced, they just want it to work right away, and as @ifBars said it doesn't affect the tf or causing bans in cs2.

handle_ = hj::HijackExistingHandle(pid_);
if (!hj::IsHandleValid(handle_))
{
std::cout << "[cheat] Handle Hijack failed, falling back to OpenProcess method." << std::endl;
return pProcess::AttachProcess(ProcessName); // Handle hijacking failed, so we fall back to the normal OpenProcess method
}

@IMXNOOBX IMXNOOBX added bug Something isn't working help wanted Extra attention is needed labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants