Git Product home page Git Product logo

viewinjectedthread's Introduction

ViewInjectedThread

Project for CSEC464. Get Injected threads of a process on a system that have been injected with the metasploit framework.

Usage

./injectview PID

Injectview will then display if there are any threads that have been injected with along with a count displayed at the end.

Explanation

Injected view uses the Windows native API to query information about threads that cannot be obtained through the normal API. The API call that is being used is NtQueryInformationThread. Because this is a native function, it is not exported, and we must manually export it. To do this, we can use a function called GetPRocAddress. This will do the dirty work of searching through the Dll and grabbing the address of the function. We can then use this with a custom function to call the function directly.

From using this function, we can grab important information about each thread in a process such as start address, name, and so on. The vital thing here is the start address, as when using the "migrate" tool in the Metasploit framework, we see that start address is out of range of each of the loaded modules with the process. It is important to note that the loaded modules for each process are essentially the externally linked libraries, or the Dlls that are used with the process. For whatever reason, Metasploit's migrate function does not properly set the start address of the thread and therefore, it can be easily detected.

This tool was written in C++, as it allows for the direct access to the all-powerful WINAPI and the native API. This, in combination with my own familiarity with the language is the biggest reason for it being the chosen language of this program. Hopefully this tool will help people see that there are different ways to detect thread injection and that a little bit of creativity can go a long way. It should also be helpful to forensics investigators such that they can better get an idea of how to use the powerful Windows API to detect these sorts of attacks on an operating system.

viewinjectedthread's People

Contributors

landyy avatar

Stargazers

 avatar Matt avatar Jon Myers avatar Duc Phan avatar Bill Stackpole avatar olly avatar  avatar  avatar

Watchers

James Cloos avatar Bill Stackpole avatar  avatar

viewinjectedthread's Issues

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.