Results 1 to 15 of 15
  1. #1
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow

    DLL injection...?

    Yo, me again.

    I havn't made a DLL in such a long time now, and I wanted to try and make a hack now but i'm having some troubles.

    I'm using Dev C++.

    Code:
    #include <windows.h>   
    
    BOOL APIENTRY DllMain (HINSTANCE hInst     ,
                           DWORD reason        ,
                           LPVOID reserved     )
    {
        switch (reason)
        {
          case DLL_PROCESS_ATTACH:
               MessageBox(NULL,"Test","Test",MB_OK);
            break;
    
          case DLL_PROCESS_DETACH:
            break;
    
          case DLL_THREAD_ATTACH:
            break;
    
          case DLL_THREAD_DETACH:
            break;
        }
        return TRUE;
    }
    I'm testing this on Minesweeper, i'm using Valkyrie injector. It's just supposed to open a messagebox when it's injected but nothing comes up when it's injected. I can't even find any problems with this.

    All help appreciated, thanks.

  2. #2
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,321
    My Mood
    Cheeky
    Try placing it in DLL_THREAD_ATTACH, see if that works. is Valkyrie a stealth injector(does it remove your DLL from the PEB linked list etc?)

    try using another injector(google for TatniumInjector or s1nject)
    Ah we-a blaze the fyah, make it bun dem!

  3. #3
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Try placing it in DLL_THREAD_ATTACH, see if that works. is Valkyrie a stealth injector(does it remove your DLL from the PEB linked list etc?)
    Tryed that already.

    try using another injector(google for TatniumInjector or s1nject)
    I can't find those injectors, no other injector will work for this?
    Or are you just suggesting those?

  4. #4
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,204
    My Mood
    Flirty
    Ummm... I think you have to inject it while the executable is loading, but not sure. Lately I've been failing so I won't say to much. =/

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  5. #5
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by why06 View Post
    Ummm... I think you have to inject it while the executable is loading, but not sure. Lately I've been failing so I won't say to much. =/
    I dunno, any DLL i've ever written can be injected any time.

  6. #6
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    I used MSVC++'s DLL template thing and now it works fine.

  7. #7
    Anddos's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    44
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by Davidm44 View Post
    I used MSVC++'s DLL template thing and now it works fine.
    what is this template thing you speak of?, i am having troubles injecting a dll in to a process on win7 as well , cheers

  8. #8
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by Anddos View Post
    what is this template thing you speak of?, i am having troubles injecting a dll in to a process on win7 as well , cheers
    When you create a DLL project in MSVC++ it gives you kind of like a base DLL skeleton to work with. That's what I meant.

  9. #9
    Anddos's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    44
    Reputation
    10
    Thanks
    5
    would you be able to share the injection code , the samples i try dont work for some reason

    this is the sample , https://www.dreamincode.net/code/snippet407.htm
    Last edited by Anddos; 11-30-2009 at 09:27 PM.

  10. #10
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by Anddos View Post
    would you be able to share the injection code , the samples i try dont work for some reason

    this is the sample , Dll Injection - C++ - Source Code | DreamInCode.net
    That isn't a DLL, that's a DLL injector.

  11. #11
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,204
    My Mood
    Flirty
    Quote Originally Posted by Davidm44 View Post
    That isn't a DLL, that's a DLL injector.
    Wow... fail. So your still having trouble?

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  12. #12
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by why06 View Post
    Wow... fail. So your still having trouble?
    No I fixed it.

  13. #13
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,204
    My Mood
    Flirty
    Quote Originally Posted by Davidm44 View Post
    No I fixed it.
    Well... tell us what the problem was.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  14. #14
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Bleh, I just switched computers, I don't have anything on this. It's not even Windows.
    I'll update you on that tomorrow.

  15. #15
    Anddos's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    44
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by Davidm44 View Post
    That isn't a DLL, that's a DLL injector.
    i know its a dll injector , thats what i am asking for ....this dosent seem to work ...

Similar Threads

  1. DLL injection
    By Lynie in forum C++/C Programming
    Replies: 3
    Last Post: 10-30-2008, 11:44 AM
  2. [HELP] - DLL Injection
    By pelonzudo in forum C++/C Programming
    Replies: 1
    Last Post: 09-10-2008, 02:27 AM
  3. Crash at Dll inject
    By CyberStriker in forum WarRock - International Hacks
    Replies: 1
    Last Post: 08-13-2008, 06:51 AM
  4. [Help!] CA crash on dll inject
    By CyberStriker in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 08-12-2008, 09:23 PM
  5. DLL injection Failled
    By aynal in forum WarRock - International Hacks
    Replies: 1
    Last Post: 01-15-2006, 09:41 PM

Tags for this Thread