logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Hook in the client?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Morpheus



Joined: 18 Oct 2006
Posts: 39

PostPosted: Thu Jun 07, 2007 19:15    Post subject: Hook in the client? Reply with quote

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
View user's profile Send private message
chaoslink



Joined: 23 Aug 2006
Posts: 37

PostPosted: Thu Jun 07, 2007 20:38    Post subject: Re: Hook in the client? Reply with quote

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
View user's profile Send private message
Morpheus



Joined: 18 Oct 2006
Posts: 39

PostPosted: Thu Jun 07, 2007 20:47    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Thu Jun 07, 2007 21:00    Post subject: Reply with quote

Nope, it's not possible with NWN2 since it has an advanced copy protection system.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Morpheus



Joined: 18 Oct 2006
Posts: 39

PostPosted: Thu Jun 07, 2007 22:20    Post subject: Reply with quote

So I assume that this copy protection prohibits in-memory hooks? I wonder how it does that...
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jun 08, 2007 0:09    Post subject: Reply with quote

The main game executable is encrypted. You can't easily disassemble or debug it: the protection prevents both.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
chaoslink



Joined: 23 Aug 2006
Posts: 37

PostPosted: Fri Jun 08, 2007 0:51    Post subject: Reply with quote

bah, NWN2, not interested Smile
Back to top
View user's profile Send private message
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Fri Jun 08, 2007 9:34    Post subject: Reply with quote

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
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jun 08, 2007 10:10    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Fri Jun 08, 2007 10:43    Post subject: Reply with quote

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 Wink ) but it's there to STOP other people from making cash from Obi's hard work.

Cheers
Gryphyn
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Jun 08, 2007 11:23    Post subject: Reply with quote

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 Wink ) 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
View user's profile Send private message Visit poster's website Yahoo Messenger
TroveLord



Joined: 22 Nov 2006
Posts: 136
Location: Italy

PostPosted: Fri Jun 08, 2007 12:03    Post subject: Reply with quote

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
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Fri Jun 08, 2007 12:05    Post subject: Reply with quote

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

Wink

Cheers
Gryphyn
Back to top
View user's profile Send private message
Morpheus



Joined: 18 Oct 2006
Posts: 39

PostPosted: Fri Jun 08, 2007 14:31    Post subject: Reply with quote

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
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Fri Jun 08, 2007 14:46    Post subject: Reply with quote

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 Twisted Evil

Sort of a catch-22.

Cheers
Gryphyn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group