Giter Club home page Giter Club logo

injectory's Introduction

injectory

A command-line interface DLL injector for injecting/ejecting DLL libraries into running/new processes. Uses LoadLibrary (or alternatively a manual version) and CreateRemoteThread.

  • The target process is suspended during injection
  • Can map a PE file into the remote adress space of a process (without calling LoadLibrary)
  • Inject x86 code into a x86 process

Usage

usage: injectory TARGET [OPTION]...
inject DLL:s into processes

Examples:
  injectory --launch a.exe --map b.dll --args "1 2 3"
  injectory --pid 12345 --inject b.dll --wait-for-exit

Targets:
  -p [ --pid ] PID         find process by id
  -n [ --procname ] NAME   find process by name
  -t [ --wndtitle ] TITLE  find process by window title
  -c [ --wndclass ] CLASS  find process by window class, can be combined with
                           --wndtitle
  -l [ --launch ] EXE      launches the target in a new process
  -a [ --args ] STRING     arguments for --launch:ed process

Options:
  -i [ --inject ] DLL...   inject libraries before main
  -I [ --injectw ] DLL...  inject libraries when input idle
  -m [ --map ] DLL...      map file into target before main
  -M [ --mapw ] DLL...     map file into target when input idle
  -e [ --eject ] DLL...    eject libraries before main
  -E [ --ejectw ] DLL...   eject libraries when input idle
  --set-flags FLAG...      see --list-flags
  --unset-flags FLAG...    see --list-flags

  --print-own-pid          print the pid of this process
  --print-pid              print the pid of the target process
  --rethrow                rethrow exceptions
  --vs-debug-workaround    workaround for threads left suspended when debugging
                           with visual studio by resuming all threads for 2
                           seconds
  --wait-for-exit          wait for the target to exit before exiting
  --kill-on-exit           kill the target when exiting

  -v [ --verbose ]
  --list-flags             list supported flags and exit
  --version                display version information and exit
  --help                   display help message and exit

Credits

Imported from https://code.google.com/p/injector/

injectory's People

Contributors

blole avatar wdmegrv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

injectory's Issues

Injection not working

When injecting with -I option i got this

injectory: at process.cpp(175) Process::runInHiddenThread()
[struct errinfo_text_ ] = call to function in remote process failed

And after application crashes.
I am using 32bit version of injector

Error with Forcebindip

Im attempting to use injectory with a script to use the dll based script to run programs under a specified adapter and am receiving this error: injectory: C:\Dropbox\kth\ex\injectory\injectory/library.hpp(18): Throw in function __thiscall Library::Library(const class boost::filesystem::path &)
Dynamic exception type: class boost::exception_detail::clone_impl

injectory: Throw location unknown

I'm trying to use injectory with ForceBindIP's DLL:

$ "C:\BindIP\injectory.x86.exe" --launch "C:\Program Files\Mozilla Firefox 4.0 Beta 12\firefox.exe" --inject "C:\BindIP\BindIp.dll" --args ""C:\Program Files\Mozilla Firefox 4.0 Beta 12\firefox.exe""

And I'm getting the following error:

injectory: Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: class boost::exception_detail::clone_impl<struct boost::exception_detail::error_info_injector<class boost::program_options::invalid_option_value> >

Any ideas on how to fix it?

Feature Request: No Crash Dialogue

Hello! We are going to be using Injectory for the Starcraft AI Tournament Manager project as a replacement for Chaoslauncher, which cannot be run without a GUI, and I have a feature request that you may consider for your project.

Currently, when we use Injectory to inject a BWAPI bot DLL into Starcraft, if that bot crashes, an application error dialogue pops up which does not go away after the process has terminated. Since that error message is part of a system service, it cannot easily be closed automatically by our software.

We found that you can use the following code (on windows) to disable error message dialogues:

#ifdef WIN32
DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX);
#endif

My feature request for Injectory would be to add this code as a command-line flag so that you can disable error message dialogues from appearing if you want to. We have tested it with your code and it works simply by inserting that code snippet at the beginning of main()

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.