Git Product home page Git Product logo

pidinspector's Introduction

pidInspector

dll/exe Hijack easy verification tool.

Summary

pidInspector makes dll/exe hijack verification easy. Aids in vulnerability research by identifying the immediate executing application commonly used in dll/exe hijacking.

Features

pidInspector.exe and pidInspector_dll.dll log the executing DateTime, userID, it's path, it's PID, parent application fullPath, parentPID and if the process has writeAccess to the system folder. The appendable log file is created in the public writable documents folder C:\Users\Public\Documents\pidInspector.txt

pidInspector makes for a nice rapid way of verifying hijack conditions without having to generate Metasploit, CobaltStrike, other payloads and virtual environments, etc.

Usage

Find your suspect hijack using Process Monitor or your tool of preference. Here are two great blogs on dll hijacking.
https://hacknpentest.com/windows-privilege-escalation-dll-hijacking/
https://pentestlab.blog/2017/03/27/dll-hijacking/

Rename pidInspector to the missing dll/exe name and place in the search path. You can download pidInspector precompiled binaries here. The dllLoad.exe application is for testing the pidInspector_dll.dll without preforming a hijack.

I strongly suggest limiting pidInspector to the applications folder/path and not using Windows, Windows\System, Windows\System32 folders. You may have a hard time removing pidInspector if its a shared dll.

Log output:

dll or exe date/time user pidInspector path pidInspector PID PPID path PPID Write to System32
dll Sun Sep 21 19:20:14 2020 Inigo C:\pidInspector\x64\Release\dllLoad.exe 14416 C:\Windows\System32\cmd.exe 10080 YES
exe Sun Sep 21 19:21:07 2020 Inigo C:\pidInspector\x64\Release\pidInspector.exe 17728 C:\Windows\explorer.exe 9064 NO

Disclaimer

pidInspector shouldn't cause any issues, there is nothing inherently destructive in this code but I suggest limiting it to testing environments. Please forgive the butchering of C/C++. However use at your own risk. This code is provided for educational purposes ONLY. Developer assume no liability and shall not be held responsible for any damage that may result from use or misuse of the provided code. It's the end users responsibility to obey all applicable local, state, federal and country specific laws.

Changelog

v1.0

  • Initial release.

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.