Results 1 to 5 of 5

Thread: DLL creation.

  1. #1
    Icystormx
    Icystormx is offline
    Guest
    Join Date
    2011 Jan
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    DLL creation.

    Hi, can someone guide me on creating a DLL that will inject a value into a program's address after pressing a hotkey?
    Example, After pressing the key 's' it changes the address from a certain digit to the digit i want.

  2. #2
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0
    I think this is the code for that what you want to achieve. When injected it runs MyThread.

    #include <windows.h>

    void WINAPI MyThread ( )
    {
    MessageBox(NULL, "DLL is injected!", "Injected!", MB_OK);
    }

    BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpvReserved )
    {
    switch ( dwReason ) {
    case DLL_PROCESS_ATTACH:
    DisableThreadLibraryCalls(hModule);
    if ( CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MyThread, NULL, 0, NULL) == NULL ) {
    return FALSE;
    }

    break;
    case DLL_PROCESS_DETACH:
    break;

    case DLL_THREAD_ATTACH:
    break;

    case DLL_THREAD_DETACH:
    break;
    }

    return TRUE;
    }

    External processes can use WriteProcessMemory to edit values but i don´t know if that works here too. For the hotkeys u can use GetAsyncKeyState. MSDN has some good guides about that.

    P.S. Correct me if I'm wrong. I'm nub.
    Last edited by Cõins; 2011-01-19 at 03:08 PM.

  3. #3
    Icystormx
    Icystormx is offline
    Guest
    Join Date
    2011 Jan
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0
    Perharps you can tell me, which is the line that allow me to attach the the specify "...".exe?
    I'm also a noob in such things.

  4. #4
    remka
    remka is offline
    Member-in-training remka's Avatar
    Join Date
    2010 Oct
    Location
    Moscow
    Posts
    161
    Thanks Thanks Given 
    17
    Thanks Thanks Received 
    31
    Thanked in
    6 Posts
    Rep Power
    15
    Please write to the PM only at the right issues.
    or if you know what 0x90)))
    P.s.
    it's NOT NOP

  5. #5
    Cõins
    Cõins is offline
    New member
    Join Date
    2011 Jan
    Posts
    7
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    4
    Thanked in
    1 Post
    Rep Power
    0
    Quote Originally Posted by Icystormx View Post
    Perharps you can tell me, which is the line that allow me to attach the the specify "...".exe?
    I'm also a noob in such things.
    What do you mean with that? Your DLL can't specify the process. The injector does.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •