DeathSleep - A PoC Implementation For An Evasion Technique To Terminate The Current Thread And Restore It Before Resuming Execution, While Implementing Page Protection Changes During No Execution
A PoC implementation for an evasion technique to terminate the current thread and restore it before resuming execution, while implementing page protection changes during no execution.
Intro
Sleep and obfuscation methods are well known in the maldev community, with different implementations, they have the objective of hiding from memory scanners while sleeping, usually changing page protections and even adding cool features like encrypting the shellcode, but there is another important point to hide our shellcode, and is hiding the current execution thread. Spoofing the stack is cool, but after thinking a little about it I thought that there is no need to spoof the stack… if there is no stack :)
The usability of this technique is left to the reader to assess, but in any case, I think it is a cool way to review some topics, and learn some maldev for those who, like me, are starting in this world.
The main implementation showed here holds everything that we need to take out of the stack in the data section, as global variables, but an impletementation moving everything to the heap will be published soon. It aims to show some key modifications that needs to be done to make this code pic and injectable.
This repository is mirrored between GitHub and GitLab.
Source: www.kitploit.com
![DeathSleep - A PoC Implementation For An Evasion Technique To Terminate The Current Thread And Restore It Before Resuming Execution, While Implementing Page Protection Changes During No Execution](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEierHTTP4Pj3H2xPVCaKwYvLXRxzGts64sX47BNeX88REEulwHtQVOV9tP0GIGYQ5RkPO9sy1O172BhIqgr0E6ssx3Echh1P5njQjeaRMdFpq76zdammU0m2lbOUlFsS3lXvvl7Z5C6kFGfCcGKyjKbprM5yMcYJYrHkbXKf8TuT3_4rxzyYfUFM-HAqw/s72-w640-c-h360/DeathSleep_1_ezgif-5-ee95c9b3b0.gif)