Coder Social home page Coder Social logo

re-expoc / detect-keattachprocess Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kankoshev/detect-keattachprocess

0.0 0.0 0.0 11 KB

Detect-KeAttachProcess by iterating through all processes as well as checking the context of the thread.

C++ 3.59% C 96.41%

detect-keattachprocess's Introduction

Detect-KeAttachProcess

Detect-KeAttachProcess - by iterating through all processes as well as checking the context of the thread.

Recently I started studying the KeAttachProcess system. And to be more specific, how exactly can you find out that your process is attached. And so, as soon as we start looking at the function, we see that it first gets the current context of the thread from which Keattachprocess was called.

Alt text

Also note that the PROCESS is passed to the "v2" variable from the argument, respectively, this is the target process to which the function is attached in the future.

The current thread of the process from which the function is called, as well as the PROCESS from the argument, are passed to the "KiAttachProcess" function.

Alt text

We switch to this function, and after studying it a little, we see that the target process (v2) is written to offset "0xB8" the current thread context.

Alt text

The further plan is as follows:

  1. Go through all the processes
  2. Go through all the threads of each process in the system
  3. Look in the context of each thread, what is the offset "0xB8".

If the current process is not attached to anything, usually the current "PEPROCESS" of the process itself is stored in the offset "0xB8", and if the current process was attached to any process, then the "PEPROCESS" target process will be written to the offset "0xB8".

I have implemented a check for this for every process in the system, and here is my result:

Alt Text

detect-keattachprocess's People

Contributors

kankoshev avatar

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.