Netmessages.h

All Helbreath Client Source Discussion here.
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

Well, one of the things that people that use open surce files most fear is having people using modified clients at their server (as everyone can download sources and modify them) to have advantages over other players that use normal clients...

I have a little trick to avoid (or at least make it harder) people using custom-made clients. Here it is:

First of all, centralize your netmessages.h, make all sources use the same file. Then, open it and put the following lines:

Code: Select all


#include "version.h"

#define DEF_VERSIONPLUSMODIFIER    	(DEF_LOWER_VERSION % 5)//that can be whatever number you wish, 1 byte-sized numbers will work fine

#define	DEF_PLUSMSGMODIFIER_1    	0x01 + DEF_VERSIONPLUSMODIFIER
#define	DEF_PLUSMSGMODIFIER_2    	0x03 + DEF_VERSIONPLUSMODIFIER
#define	DEF_PLUSMSGMODIFIER_3    	0x09 + DEF_VERSIONPLUSMODIFIER
#define	DEF_PLUSMSGMODIFIER_4    	0x07 + DEF_VERSIONPLUSMODIFIER
#define	DEF_PLUSMSGMODIFIER_5    	0x05 + DEF_VERSIONPLUSMODIFIER
Then just add the definitions to the messages definitions, like that:

Code: Select all


#define DEF_NOTIFY_FORCEDISCONN    0x0B75  +DEF_PLUSMSGMODIFIER_1

 #define DEF_NOTIFY_FIGHTZONERESERVE    0x0B76  +DEF_PLUSMSGMODIFIER_2
Remember to let messages like DEF_MSGTYPE_CONFIRM, DEF_MSGTYPE_REJECT, and messages that are sent to login server unchanged (like DEF_LOGRESMSGTYPE_CONFIRM) or you will have problems when comunicating with the logserver (unless you are working with the mysql logserver I've released some time ago... in that case you can modify whatever you want).

Explanation: the messages used to comunicate through hgserver/client will have their values based on the version... making diff values every version, so people will have trouble making customized clients to conect to your server.

This is just a little gift to help people to fight against hackers. It won't stop them, but why not make their job harder? ;)
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
rfvtgb
just visiting
Posts: 8
Joined: Wed Apr 05, 2006 5:56 am

Post by rfvtgb »

just a minor bug
even with 100% skill magic
i dont seem to cast faster than not having 100% skill magic
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

rfvtgb wrote: just a minor bug
even with 100% skill magic
i dont seem to cast faster than not having 100% skill magic
WTF YOU SAYING NIGGA!

Good job Aryes B)

Sticked.
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

how to use that trick with SQL server and oryginal 3.51 client ?
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

Drajwer wrote: how to use that trick with SQL server and oryginal 3.51 client ?
You don't.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
Windy
Member
Posts: 157
Joined: Tue Nov 18, 2003 8:31 am
Location: wishing I was somewhere else

Post by Windy »

lol thats the whole point of the changed netmessages so that only YOUR client can connect, ppl cant just grab an original one and mod some stuff in it....if u want to use it then u have to compile a 351 clone client from diuuude and snoopy or make ur own...simple as that
<span style='color:blue'>Coding with Evil Intentions....Evil at its Best....</span>
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

So what when back to TXT is not possible? Any hex packets in client/server ?
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

Drajwer wrote: So what when back to TXT is not possible? Any hex packets in client/server ?
If you hex the same values into client/server, no problem. What is important is to have both with the same values.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
Cleroth
Loyal fan
Posts: 416
Joined: Wed Jun 16, 2004 7:08 pm

Post by Cleroth »

Hexing an hundred of messages? Good luck.
<img src='http://ic1.deviantart.com/fs11/i/2006/1 ... leroth.gif' border='0' alt='user posted image' />
KLKS
Loyal fan
Posts: 218
Joined: Sun Feb 22, 2004 2:32 pm

Post by KLKS »

there is another way of doing this but it takes more skills to do it :P
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

mask the client version
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
KLKS
Loyal fan
Posts: 218
Joined: Sun Feb 22, 2004 2:32 pm

Post by KLKS »

actually no, its complex enough that ppl cant use their clients, they have to use yours :P

it involves an exe packer (Themida/Armadillo) which dosent allow memmory patching. and a modification to the encryption/decryption routine on HG and client side.

the client and server share a 'secret' key and the packet structure also changes a little :). so normal clients will not be able to connect.

its a concept idea and estimated to take abt 4-5 days to implement. the crucial part is the packer. u need a packer which has no unpacker and cannot be memory dumped :)
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

the client and server share a 'secret' key and the packet structure also changes a little . so normal clients will not be able to connect.
I already know 2 servers that use this kind of protection system.

Anyways, coding in, instead of hacking into the client will improve the trick !
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

KLKS wrote: actually no, its complex enough that ppl cant use their clients, they have to use yours :P

it involves an exe packer (Themida/Armadillo) which dosent allow memmory patching. and a modification to the encryption/decryption routine on HG and client side.

the client and server share a 'secret' key and the packet structure also changes a little :). so normal clients will not be able to connect.

its a concept idea and estimated to take abt 4-5 days to implement. the crucial part is the packer. u need a packer which has no unpacker and cannot be memory dumped :)
That's a really better way if you want to keep hackers away, I've messed with crypting/decrypting packets once, I think that encrypting only the messages ID's instead of encrypting the whole packets would still give a good result and a good performance on the server load.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
KLKS
Loyal fan
Posts: 218
Joined: Sun Feb 22, 2004 2:32 pm

Post by KLKS »

well the idea is good enough to stop hackers and hacks. only using 'authorised' clients to connect to the servers. A system like gameguard would be nice.
Post Reply