Coder Social home page Coder Social logo

mylifeismyhome / tinjector Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 29.51 MB

Windows Injector examples in c/pp

License: MIT License

C++ 100.00%
beginner cpp example injector windows manual-mapping thread-hijacking remote-loadlibrary x64 setwindowshookex

tinjector's Introduction

tInjector
Collection of simple methods to inject a dll into a process

Autor: Tobias Staack


Methods

  • RemoteLoadLibrary

    • CreateRemoteThread
    • ThreadHijacking
  • ManualMapping

    • CreateRemoteThread
    • ThreadHijacking
  • SetWindowsHookEx

tinjector's People

Contributors

mylifeismyhome avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

narumiii

tinjector's Issues

Process Crash after successfull injection

Hello, first of all thank you for your contribution with this project im here to report an issue when you map.

The dll with Manual Map ThreadHijacking inject successfully and no issues if you just call a message box or something like that, hoewer if you create a thread or hook a function on the injected process this one will freeze and crash, to make things clear if you don't do anything more than calling a simple messagebox or AllocConole everything will be fine but you can't do anything more, no createthread and no hooks (no matter what kind of hooks if detours or not)

Here ill leave an example code im doing to test it.

// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"
#include <stdio.h>

void thstuff()//if this get called by createthread will crash the process
{
    AllocConsole();
    FILE* pFile = nullptr;
    freopen_s(&pFile, "CONOUT$", "w", stdout);

    printf("testest\r\n");

    while (true)
    {
        printf("loop\r\n");
        Sleep(100);
    }
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)thstuff, 0, 0, 0);//if we create a thread will crash once called otherwise no crash.
        break;
    }
    return TRUE;
}



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.