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

update create-process-suspended to include DEBUG_ONLY_THIS_PROCESS #978

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

mike-hunhoff
Copy link
Collaborator

@mike-hunhoff mike-hunhoff commented Jan 6, 2025

With the Debug Injection method, the ransomware first uses the function “CreateProcessW” with the “DEBUG_ONLY_THIS_PROCESS” creation flag. Creating the “Explorer.exe” process in this state allows the ransomware to suspend the process and modify its memory. This is when then ransomware calls “NtMapViewOfSection” to copy itself to the process and fix its relocations. Afterward, it calls “NtGetContextThread” to receive the thread context of the main thread for “Explorer.exe”. It then sets the instruction pointer (EIP) to the mapped ransomware’s selected entry point. “ContinueDebugEvent” is then called to continue the execution of “Explorer.exe” and the following call is to “DebugActiveProcessStop” which finally detaches the ransomware’s debugger from the process.

source: https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/an-in-depth-look-at-mailto-ransomware-part-two-of-three/

DEBUG_ONLY_THIS_PROCESS (0x00000002)
The calling thread starts and debugs the new process. It can receive all related debug events using the WaitForDebugEvent function.

@mike-hunhoff
Copy link
Collaborator Author

The source sample from my analysis is not public.

@williballenthin
Copy link
Collaborator

would you please add the documentation/reference links from this issue into the rule?

@mike-hunhoff mike-hunhoff merged commit ff9db74 into master Jan 7, 2025
3 checks passed
@mike-hunhoff mike-hunhoff deleted the update/create/process/suspended branch January 7, 2025 20:02
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