Author Topic: hacking paths and cheating character creation is too easy.  (Read 1704 times)

Vandel

  • Hydlaa Resident
  • *
  • Posts: 64
    • View Profile
hacking paths and cheating character creation is too easy.
« on: March 30, 2005, 01:58:36 pm »
you can alter the .xml way too easily to exploit pre-chosen paths.

I can load up my advantages, skills, and whatever else by changing the .xml, and it works.  You need to set paths on the server side, client side is idiotic.

Also, there\'s a problem with CP... you should do something server side to recalculate CP on character creation, I was able to easily hack that, and load up all the skills.  Anyone with any programming knowledge, is still going to have a field day with cheating character creation.

If I could get the code to build, I\'d be more than happy to help with coding, but I\'ve been unsuccessful since molecular blue to get sources to build.

I\'ve checked out the latest CVS tree for planeshift.  The code is clean, but there\'s way to many problems with how the message system is implemented.  Someone could easily make a fake client and fraudlently make alterations to messages and post back and force a hack to a character server side.  I know why you did it this way, but it\'s not very effective.

Also there\'s a problem with CP calculating during character creation, there\'s a way to lose CP when altering options.  I\'ve been unable to find the pattern.


-=[Life is Good, RPG\'s are better!]=-

jorrit

  • Developers
  • Hydlaa Citizen
  • *
  • Posts: 497
    • View Profile
(No subject)
« Reply #1 on: March 30, 2005, 03:19:46 pm »
Quote
Originally posted by Vandel
you can alter the .xml way too easily to exploit pre-chosen
I\'ve checked out the latest CVS tree for planeshift.  The code is clean, but there\'s way to many problems with how the message system is implemented.  Someone could easily make a fake client and fraudlently make alterations to messages and post back and force a hack to a character server side.  I know why you did it this way, but it\'s not very effective.


Well since the client is Open Source it is impossible to prevent these kinds of hacks. We try to prevent cheating here by letting the server do all important stuff. i.e. the server can test if movement is allowed. The server can test how fast you move. There is code in the server to do that (Paladin). So you can cheat on the client but if you do something that is impossible then the server CAN detect that.

Greetings,
Project Manager of Crystal Space, CEL, CrystalBlend and Crystal Core. Please support Crystal Space with a donation.

Sarrow

  • Hydlaa Citizen
  • *
  • Posts: 257
    • View Profile
(No subject)
« Reply #2 on: March 30, 2005, 03:48:59 pm »
Cant the server detect when someone has stat levels he is not suppose to? I mean we cant have super levels walking around when they barely did any training.
Sar-row (say-row)  n.  1. A individual or group that protrays discrimination to current society. See synonyms at Revolutionists

jorrit

  • Developers
  • Hydlaa Citizen
  • *
  • Posts: 497
    • View Profile
(No subject)
« Reply #3 on: March 30, 2005, 03:52:00 pm »
Quote
Originally posted by Sarrow
Cant the server detect when someone has stat levels he is not suppose to? I mean we cant have super levels walking around when they barely did any training.


Well that\'s harder. How can the server know if you got your super stat level legally or not? The only thing we can do here is to track suspicious stat increases, mark them and have a human look over them. Note that (provided there are no bugs) it is not possible to artificially increase stats since it is the server that maintains them.

Greetings,
Project Manager of Crystal Space, CEL, CrystalBlend and Crystal Core. Please support Crystal Space with a donation.

Platyna

  • Hydlaa Notable
  • *
  • Posts: 556
    • View Profile
(No subject)
« Reply #4 on: March 30, 2005, 04:31:50 pm »
Simply, values of each character creation option and methods of stats
calculating can be stored on the server database and before the server will
create the userfile it will check if all values sent to it by the client are
calculated correctly. Some kind of stencil stored on the server used to
verify if stats had been calculated correctly by the client.

Regards.
« Last Edit: March 30, 2005, 04:32:42 pm by Platyna »
Zuzanna K. Filutowska
RPG Players Community || Platyna\'s Planeshift Warehouse
\"The only thing necessary for evil to triumph is for good men to do nothing.\" -- Edward Burke

Seytra

  • Forum Addict
  • *
  • Posts: 2052
  • No system can compensate lack of common sense.
    • View Profile
(No subject)
« Reply #5 on: March 30, 2005, 05:59:23 pm »
And here was thinking it\'d be already done that way!

I imagined the system to work like this:

1) Client gets database of char creation choices from server upon entering of char creation, or from update
2) Client lets user choose whatever they like within CP requirements
3) Client sends list of selections (and only selections, no effects or other things, not even the CP\'s used / reamaining) to server, this would be either strings (like \"father_archer_famous\" ) or list numbers (like table 2 option 54)
4) Server verifies the list against it\'s own database, simply by summing up the received items of it\'s own list. This step can be merged with step 5)

5) If OK, server generates char according to the list, otherwise the client is notified

After all, the server will have the database, and thus it should be easy to verify?
Does the validation really just check if the CP are below zero?

This way, users can cheat the hell out of the client, but since the server gets the list of the client\'s wishes and creates the char according to it\'s orn rulebase, there won\'t be any way to get altered values onto the server.

This is a must before even thinking about the wipe!
« Last Edit: March 30, 2005, 06:05:21 pm by Seytra »

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
(No subject)
« Reply #6 on: March 30, 2005, 06:00:57 pm »
I thought it was checked already as well.   I will review this and make sure.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

Externals

  • Hydlaa Citizen
  • *
  • Posts: 381
    • View Profile
(No subject)
« Reply #7 on: March 30, 2005, 07:32:06 pm »
Yea we dont want bunch\'s of people after the wipe just running around with super stats in one day. That would be dumb and would probably require another wipe
Of course you should fight fire with fire, you should fight everything with fire.   :P  Xantherus Icer  :P

fken

  • Hydlaa Notable
  • *
  • Posts: 816
    • View Profile
(No subject)
« Reply #8 on: March 30, 2005, 08:58:44 pm »
Is there a risk that the server lags because of the hack checking process ?

I means how much cpu load does it need to verify if players are cheating or not ?

jorrit

  • Developers
  • Hydlaa Citizen
  • *
  • Posts: 497
    • View Profile
(No subject)
« Reply #9 on: March 30, 2005, 08:59:32 pm »
Quote
Originally posted by fken
Is there a risk that the server lags because of the hack checking process ?

I means how much cpu load does it need to verify if players are cheating or not ?


Currently both psserver and npcclient (the server process managing npc\'s) run at about 1-2% cpu time. So don\'t worry about cpu load yet :-)

Greetings,
Project Manager of Crystal Space, CEL, CrystalBlend and Crystal Core. Please support Crystal Space with a donation.

Vandel

  • Hydlaa Resident
  • *
  • Posts: 64
    • View Profile
(No subject)
« Reply #10 on: March 31, 2005, 02:45:25 am »
I was looking at this routine in the character creation client side...

 int psCreationManager::GetRaceCP( int race )
{
    if ( raceDescriptions[race]->startingCP == -1 )
    {
        // This is a simple message so don\'t need a seperate class for it.
        // We can just create the message our selves.        
        MsgEntry *msg = new MsgEntry( 100 );
        msg->SetType(MSG_CHARCREATE_CP);  
        msg->Add( (int32_t) race );
               
        msgHandler->SendMessage(msg);
        return REQUESTING_CP;
    }
    else
    {
        return raceDescriptions[race]->startingCP;
    }
}

the checks are implemented for CP checks on the server side for character creation.  There\'s a few others... besides this...

int cpCost = CalculateCPLife( mesg.lifeEvents ) +
                 CalculateCPChoices( mesg.choices, mesg.fatherMod, mesg.motherMod );
                 
     psRaceInfo* race;
     race = psServer::cachemanager.GetRaceInfoByNameGender( (PSCHARACTER_RACE)mesg.race,
                                                            (PSCHARACTER_GENDER)mesg.gender );                      

    if ( !race )
    {
        errorMsg = \"No race selected\";
        return false;
    }
    else
    {
        if ( cpCost > race->initialCP )
        {
            Notify1( LOG_NEWCHAR, \"New character exceeded CP allowance\" );  
            errorMsg = \"CP allowance exceeded.\";
            return false;
        }            
    }                                                            
    return true;
}

Things appear to be implented as Seytra outlined.  And not how I thought they were when I was tinkering with a sniffer, hexedit, and code rebuilds.  The client was faking me out to think I was doing something I really wasn\'t.  Sneaky... Oddly I wasn\'t getting error messages.

But I still can\'t find validation checks for advantages.  I don\'t think that\'s going to be a problem, as they don\'t appear to be implemented on the server side other than to store them.  They don\'t appear to be used anywhere.  I\'m referring to the rules.xml, which I loaded up a quickpath with, not realizing what was actually happening... I jumped to conclusions without further investigation, as I couldn\'t create any other characters to check what I was going to try.

I\'ll tinker when the wipe hits and Let you know what I\'ve been able to do, or not do.  Keep up the good work, peace... This is amazing work you\'re all doing.


-=[Life is Good, RPG\'s are better!]=-

winterk

  • Traveller
  • *
  • Posts: 17
    • View Profile
(No subject)
« Reply #11 on: June 08, 2005, 06:39:29 pm »
So clients with a simple hex editor can just look up the memory location on the client side that stores the cp points remaining and edit it to give themselves unlimited cp? If so then it is pretty lame for those of us who play fair.

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
(No subject)
« Reply #12 on: June 08, 2005, 08:19:39 pm »
I assure you that any holes like that will be plugged up.  The server validates most data and will not let the client do anything they should not.  Sure you can hack your client and give yourself 10000 CP points.  But when it sends that data to the server it will be rejected.  

It takes some careful thought on our part but we will get it and any other hacks in the end.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"