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

Added process job anti-debug check. #88

Merged
merged 2 commits into from
Nov 24, 2017

Conversation

gsuberland
Copy link
Collaborator

@gsuberland gsuberland commented Nov 21, 2017

Debugging applications commonly place debugees into a job object for various reasons, e.g. so that the child processes are closed if the parent crashes. We can exploit this to identify cases where the al-khaser process is part of a job, excluding some edge cases (e.g. console hosting). This new check identifies if the current process is part of a job and, if so, enumerates the job objects to see if any of them are outside a whitelist.

You can test this check by running the al-khaser process from within Visual Studio via Debug -> Start Without Debugging.

Debugging applications commonly place debugees into a job object for various reasons, e.g. so that the child processes are closed if the parent crashes. We can exploit this to identify cases where the al-khaser process is part of a job, excluding some edge cases (e.g. console hosting).
@ayoubfaouzi
Copy link
Owner

Hey gsuberland ! Thanks a lot for your contribution. I checked the trick, neat one.

If the application have more than one process, like a parent spawning a child, this will also trigger. This remember me like that IsParentExplorer() trick which check if the parent process is not explorer and if so it will show that it is being debugged. For a malware author, this trick could be reliable as he knows which process and how much should be in their and he can make a whitelist if needed. I will merge it and will added you in the contribitors list,

@ayoubfaouzi ayoubfaouzi merged commit 0b184b2 into ayoubfaouzi:master Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants