Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 16:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C# DLL Injecting/Hooking ?

Discussion on C# DLL Injecting/Hooking ? within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old 10/05/2013, 22:27   #16
 
elite*gold: 0
Join Date: Sep 2006
Posts: 774
Received Thanks: 8,576
Quote:
Originally Posted by Fehmt View Post
Sorry for bumping the topic, but I cant find "WinHookManager" class. Even google can't find it
If you had looked through the code you would notice that it's just a class he uses for storing/managing hooks. Just write your own.
phize is offline  
Old 10/06/2013, 00:06   #17
 
elite*gold: 0
Join Date: Oct 2012
Posts: 42
Received Thanks: 3
how to find SendPacket and RecvPacketAddress
perfect0 is offline  
Old 04/07/2014, 16:29   #18
 
elite*gold: 0
Join Date: Apr 2014
Posts: 1
Received Thanks: 0
can you upload the entire project :/ ? i didn't quite understand
Thexunknown is offline  
Old 06/14/2015, 22:57   #19
 
elite*gold: 0
Join Date: Oct 2011
Posts: 4
Received Thanks: 1
Bit late to the party,
But im trying to get this semi working for some packet inspecting.

PHP Code:
Address   Hex dump          Command                                  Comments
007633EA  
/$ /56            PUSH ESI                                 Conquer.007633EA(guessed void)
007633EB  |. |8BF1          MOV ESI,ECX
007633ED  
|. |E8 7B5ED6FF   CALL 004C926D                            ; [Conquer.004C926D
007633F2  
|. |68 4C040000   PUSH 44C                                 ; /Arg1 44C
007633F7  
|. |8BC8          MOV ECX,EAX                              ; |
007633F9  |. |E8 E8FAE6FF   CALL 005D2EE6                            ; \Conquer.005D2EE6
007633FE  
|. |84C0          TEST AL,AL
00763400  
|. |75 34         JNZ SHORT 00763436
00763402  
|. |E8 2C21E2FF   CALL 00585533                            ; [Conquer.00585533
00763407  
|. |0FB74E 06     MOVZX ECX,WORD PTR DS:[ESI+6]
0076340B  |. |51            PUSH ECX                                 ; /Arg1
0076340C  
|. |8BC8          MOV ECX,EAX                              ; |
0076340E  |. |E8 D0AFF0FF   CALL 0066E3E3                            ; \Conquer.0066E3E3
00763413  
|. |E8 1E25EBFF   CALL 00615936
00763418  
|. |0FB74E 06     MOVZX ECX,WORD PTR DS:[ESI+6]
0076341C  |. |51            PUSH ECX                                 ; /Arg1
0076341D  
|. |8BC8          MOV ECX,EAX                              ; |
0076341F  |. |E8 4857F5FF   CALL 006B8B6C                            ; \Conquer.006B8B6C
00763424  
|. |8D46 04       LEA EAX,[ESI+4]
00763427  |. |0FB708        MOVZX ECX,WORD PTR DS:[EAX]
0076342A  |. |51            PUSH ECX                                 ; /Arg2
0076342B  
|. |50            PUSH EAX                                 ; |Arg1
0076342C  
|. |B9 386BA500   MOV ECX,OFFSET 00A56B38                  ; |PTR to ASCII "$.v"
00763431  |. |E8 2DFFFFFF   CALL 00763363                            ; \Conquer.00763363
00763436  
|> |5E            POP ESI
00763437  
\. |C3            RETN 
Using OllyDbg i found this function.

Now "Correct me if im wrong" the function we are trying to detour is the call @ 00763431.

Then why does the detour init replace it with 0x68 (Push ???) and a pointer to the C# function and returns after it (0xC3)

PHP Code:
public DetourHook(Delegate targetFuncDelegate hookFunc)
        {
            
this.TargetPtr Marshal.GetFunctionPointerForDelegate(targetFunc);
            
this.TargetFunc targetFunc;
            
this.HookPtr Marshal.GetFunctionPointerForDelegate(hookFunc);

            
originalBytes = new byte[6];
            
Marshal.Copy(TargetPtroriginalBytes06);

            var 
hookPointerBytes BitConverter.GetBytes(HookPtr.ToInt32());
            
//newBytes = new byte[] { 0x68, hookPointerBytes[0], hookPointerBytes[1], hookPointerBytes[2], hookPointerBytes[3], 0xC3 };
            
newBytes = new byte[] { 0x68hookPointerBytes[0], hookPointerBytes[1], hookPointerBytes[2], hookPointerBytes[3], 0xC3 };
        } 
Forced1988 is offline  
Old 06/15/2015, 08:47   #20


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
Quote:
Originally Posted by Forced1988 View Post
Bit late to the party,
...
Then why does the detour init replace it with 0x68 (Push ???) and a pointer to the C# function and returns after it (0xC3)
...
JMP replaces the call itself, since we do not want to return to the original call (hence why we use JMP). RETN on the other hand is needed to return from the outer function (2 lines before the call). Make sure to be aware of what happens with the stack/stackframe, since this RETN won't clean it up afterwards.
KraHen is offline  
Reply


Similar Threads Similar Threads
Need help with injecting
09/04/2011 - Wolfteam - 6 Replies
Hello people, i know im not german but i have a question, i looked on manny sites for an injector only no 1 worked for me:( i have windows vista home premium 64 bits. can some1 help me? thanks
Help by injecting
10/01/2010 - Combat Arms Hacks, Bots, Cheats & Exploits - 3 Replies
Some people say their hacks dont work but you always can use Gordon 1.4.0 You dont need to have an account for it. Just download gordonsys loader, open it and than u see login screen. But above login screen there are some tabs, click on injector, type by process Engine.exe click on pick library, choose your .dll file fill in by delay 0 (or 1000) click on stealth injection, (If u want to keep this settings click on Add library) click inject, And enjoy playing, (srry for my bad english)...
Packet injecting...
03/05/2009 - S4 League - 3 Replies
Alright people. lets figure something out. I want to know if I'm at a dead end before I release anything. (and no I don't really have anything yet). My friends and I have gotten around hackshield, and it still thinks it's running. I've gotten the S4Client to show up in WPE pro's process list. but it doesn't find any packets besides this: 00000000 0A:00:F0:0A:00:00:00:00:00:00 .......... That's the only packet it gets, which is weird because I didn't get the cannot inject dll error....



All times are GMT +2. The time now is 16:46.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.