View previous topic :: View next topic |
Author |
Message |
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Thu Jun 07, 2007 19:15 Post subject: Hook in the client? |
|
|
I know this is off topic for these forums, but since nwnx successfully hooks into the server, I wanted to know how hard it would be to write a plug-in hook for the client?
Specifically, I want to write a hook for decrypting encrypted .haks.
Thanks for any advice.
Morph |
|
Back to top |
|
|
chaoslink
Joined: 23 Aug 2006 Posts: 37
|
Posted: Thu Jun 07, 2007 20:38 Post subject: Re: Hook in the client? |
|
|
Morpheus wrote: | I know this is off topic for these forums, but since nwnx successfully hooks into the server, I wanted to know how hard it would be to write a plug-in hook for the client?
Specifically, I want to write a hook for decrypting encrypted .haks.
Thanks for any advice.
Morph |
Just as hard as writing for the server, I'm sure. I've been interested in doing this to distribute custom content from a PW, but I won't be looking at it until I've finished my server plug-ins. |
|
Back to top |
|
|
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Thu Jun 07, 2007 20:47 Post subject: |
|
|
Yeah, I'm reading up on .dll injection now. But not being able to protect copyrighted content on the client is holding back a lot of cool PW's and an aftermarket for NWN2 content, so I'm 100% committed to helping make this happen.
It wouldn't technically be difficult. A public/private key cipher will encrypt the .haks. The public key is distributed inside the client injector and it can only unencrypt haks from its private key.
The injector would need to intercept the appropriate NWN2.exe class/method that reads .haks from a stream (file). It could interpose the stream and supply a new stream with the deciphered file data. I've done this before, but I'm not a windows programmer, so right now, the hard part seems to be finding where to attach the hook.
Morph |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Jun 07, 2007 21:00 Post subject: |
|
|
Nope, it's not possible with NWN2 since it has an advanced copy protection system. |
|
Back to top |
|
|
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Thu Jun 07, 2007 22:20 Post subject: |
|
|
So I assume that this copy protection prohibits in-memory hooks? I wonder how it does that... |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jun 08, 2007 0:09 Post subject: |
|
|
The main game executable is encrypted. You can't easily disassemble or debug it: the protection prevents both. |
|
Back to top |
|
|
chaoslink
Joined: 23 Aug 2006 Posts: 37
|
Posted: Fri Jun 08, 2007 0:51 Post subject: |
|
|
bah, NWN2, not interested |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Fri Jun 08, 2007 9:34 Post subject: |
|
|
virusman wrote: | The main game executable is encrypted. You can't easily disassemble or debug it: the protection prevents both. |
Any idea why it's like that? |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jun 08, 2007 10:10 Post subject: |
|
|
TroveLord wrote: | virusman wrote: | The main game executable is encrypted. You can't easily disassemble or debug it: the protection prevents both. |
Any idea why it's like that? | SecuROM. |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Fri Jun 08, 2007 10:43 Post subject: |
|
|
Still off-topic...
It comes down to this: "Intellectual Property".
The corporate world is going to extreme lengths to protect their Intellectual property...
The Gaming industry is an interesting case, somehow they get excluded from "Sarbanes-Oxley" legislation (might be country-of-origin) where 'should they go bust' people/companies can get the source-code for applications they rely upon.
That aside, IP is why YOU (and me) pay the $$$. We are not paying for a "computer game" we are paying for "THIS computer game".
A new technology emerged .NET, and Obi took a chance on this for the tool-set. It inherently enables (and simplifies) reverse-engineering of code. Awaken the Hacker within.
So in plugging up the obvious gaps to protect .NET technology, why not go the whole-hog and do it for all your code.
Yes, it might be inconvenient (for a pirate ) but it's there to STOP other people from making cash from Obi's hard work.
Cheers
Gryphyn |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Jun 08, 2007 11:23 Post subject: |
|
|
Gryphyn wrote: | Still off-topic...
It comes down to this: "Intellectual Property".
The corporate world is going to extreme lengths to protect their Intellectual property...
The Gaming industry is an interesting case, somehow they get excluded from "Sarbanes-Oxley" legislation (might be country-of-origin) where 'should they go bust' people/companies can get the source-code for applications they rely upon.
That aside, IP is why YOU (and me) pay the $$$. We are not paying for a "computer game" we are paying for "THIS computer game".
A new technology emerged .NET, and Obi took a chance on this for the tool-set. It inherently enables (and simplifies) reverse-engineering of code. Awaken the Hacker within.
So in plugging up the obvious gaps to protect .NET technology, why not go the whole-hog and do it for all your code.
Yes, it might be inconvenient (for a pirate ) but it's there to STOP other people from making cash from Obi's hard work.
Cheers
Gryphyn | As far as I know, hooking and modifying .NET code is harder. And the game was written in C++.
Besides, nothing can stop crackers. |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Fri Jun 08, 2007 12:03 Post subject: |
|
|
virusman wrote: | TroveLord wrote: | virusman wrote: | The main game executable is encrypted. You can't easily disassemble or debug it: the protection prevents both. |
Any idea why it's like that? | SecuROM. |
So if we were all dreaming and Atari took out SecuROM it would be possible to hook the game client? Does "game client" include "DM client"? |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Fri Jun 08, 2007 12:05 Post subject: |
|
|
virusman wrote: | As far as I know, hooking and modifying .NET code is harder. And the game was written in C++.
Besides, nothing can stop crackers. |
C# (and .NET) is only missing the 'Injection' bit. PInvoke & Marshalling cover the rest of the 'talking' bits.
-Yep, but we can make it harder for them
Cheers
Gryphyn |
|
Back to top |
|
|
Morpheus
Joined: 18 Oct 2006 Posts: 39
|
Posted: Fri Jun 08, 2007 14:31 Post subject: |
|
|
My aim to plug into the client is less about piracy, resale or compromising IP and more about, ironically, protecting IP. Namely, custom content that is not public domain. Maybe its easier to raise that as a need and see what OE says.
Well, I guess I doubt OE will provide a client plug-in api ever. Guess its time to start my own mini RPG using .NET/XNA. Anyone interested?!? :p
Morph |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Fri Jun 08, 2007 14:46 Post subject: |
|
|
Morpheus wrote: | My aim to plug into the client is less about piracy, resale or compromising IP and more about, ironically, protecting IP. Namely, custom content that is not public domain. Maybe its easier to raise that as a need and see what OE says.
Well, I guess I doubt OE will provide a client plug-in api ever. Guess its time to start my own mini RPG using .NET/XNA. Anyone interested?!? :p
Morph |
LOL, read the EULA it states that any IP (for/in the game) belongs unto them, encrypted or not. You ain't gonna get a thing unless you fork over mega-bucks (ask Obi)
Or as you say create your own, where you're doing the protecting
Sort of a catch-22.
Cheers
Gryphyn |
|
Back to top |
|
|
|