Code Monkey home page Code Monkey logo

process-hallowing's Introduction

Process Hallowing Shellcode Injection with UAC Bypass


Attackers can exploit the technique of inserting harmful code into dormant processes that have been emptied of their original content, as a means to bypass defenses aimed at monitoring processes. This tactic, known as process hollowing, involves executing unauthorized code within the memory space of another running process.

Typically, process hollowing is executed by starting a new process in a paused state, then clearing or "hollowing" out its memory, which is subsequently filled with malicious code. This is achieved through the use of native Windows API functions such as CreateProcess, which can initiate a process with its primary thread suspended. Following this, the process's memory can be cleared using functions like ZwUnmapViewOfSection or NtUnmapViewOfSection, and then modified to incorporate the harmful code. The steps include reallocating memory with VirtualAllocEx, writing the new code with WriteProcessMemory, adjusting the thread context with SetThreadContext, and finally resuming the thread with ResumeThread.

This method is somewhat akin to manipulating Thread Local Storage, with the key difference being that it generates a new process instead of hijacking an existing one. While this approach does not typically grant the attacker higher privileges—since the new process inherits the security context of the process that created it—it can still escape detection by security tools because the malicious activity appears to occur within a legitimate process.


The implementation of the KernelCallbackTable njection is incomplete.

process-hallowing's People

Contributors

0xagil avatar

Stargazers

 avatar

Watchers

 avatar

process-hallowing's Issues

how to

how you use it ?

image

any options to compile in linux ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.