Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-06-2011, 02:54 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Gani Cheat Security

Some server staff may or may not be aware of a particular exploit that the knowledge of which seems to have been spreading quite recently, all it involves is the modification of a servers gani within your offline folders to work as a type 2/movie gani, the effect this has it that the location the player is displayed is somehow synced with the true player x/y variable, even I didn't believe it when it was explained to me at first as it defies my understanding of how ganis work, I guess it does by some form of quirk.

The example that I am referring to was the modification of the grab gani, which would first move the player back and forth in all directions, then repeat this diagonally allowing the user to simply move once in their intended position.

As it happens this problem is fixed within the V6 client, but I've seen it done a couple of times throughout the last week so decided to try and prevent it by script, it turned out to be quite simple so I've turned it into a self-contained weapon script (as Classic has a pretty complex security system that I have this tied into) for general use:

PHP Code:
function onActionServerSide(temp.ani){
  
temp.message "Player " player.account " was caught Gani modifying (" temp.ani ").";
  
sendtorc("/disconnect " player.account " " char(34) @ "Security has detected and logged a suspected Gani exploit from your client." char(34));
  
this.logHack(temp.message);
}

function 
logHack(temp.message){
  
sendtorc(temp.message);
  
savelog2("log_security.txt"temp.message);
}

//#CLIENTSIDE
function onCreated(){
  
//List of exceptions incase a server actually does use a movie gani on the player, otherwise remove
  
this.exceptions = {
    
"moviegani1",
    
"moviegani2",
  };
  
this.setTimer(1); //Doesn't necessarily have to be every second, also shouldn't be called immediately as logging back in could re-trigger it.
}

function 
onTimeout(){
  if(
player.ani.movie){
    
//Remove if no exceptions
    
if(this.exceptions.index(player.ani.name) == -1){
      
triggerserver("gui"this.nameplayer.ani.name);
      return;
    }
  }
  
this.setTimer(1);

Ofcourse in the event of a server actually using a movie gani on the player that could mean modifying that gani would go un-detected, something like this however could have the added checks of player.x and y changing compared to the old value to atleast log the possibility.
Reply With Quote
  #2  
Old 03-07-2011, 11:38 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Stupid movie ganis, thanks for the heads up.
__________________
Quote:
Reply With Quote
  #3  
Old 03-07-2011, 11:41 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
haha- i did this on era iphone ages ago o-o

Didn't know it effected all Graal- there is a new feature in Graal Client (releasing shortly) which disables it.

Nice add though
__________________
Reply With Quote
  #4  
Old 03-08-2011, 03:43 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Well, it's possible to keep a list of all movie ganis on the server in the levels/ganis/ folder. Then use the onLevelFileUpdated(filename) event to detect if a new gani is uploaded and then check if it's also a movie gani and add it to the list. In this case, you'd be able to keep track of all the movie ganis without having to edit any script. You can use a serverr.flag to get the exceptions list on the script and it would work nicely I think.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 03-08-2011, 10:24 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Couldn't you just edit a legitimate movie GANI (in the exception list) on your client to abuse the glitch?
__________________
Reply With Quote
  #6  
Old 03-08-2011, 11:26 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by cbk1994 View Post
Couldn't you just edit a legitimate movie GANI (in the exception list) on your client to abuse the glitch?
Could keep an MD5 hash of the gani contents on the server. Every once and a while, check and make sure the clients gani file matches.
Reply With Quote
  #7  
Old 03-08-2011, 11:45 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by cbk1994 View Post
Couldn't you just edit a legitimate movie GANI (in the exception list) on your client to abuse the glitch?
I already explained there is this possibility below the code snippet, another possible solution I had in mind was similar to what Twinny is suggesting in the form of actually storing certain readable data of the real gani within the exceptions array to check for a match in the event of a movie gani being set.
Reply With Quote
  #8  
Old 03-08-2011, 11:46 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by ffcmike View Post
I already explained there is this possibility below the code snippet, another possible solution I had in mind was similar to what Twinny is suggesting in the form of actually storing certain readable data of the real gani within the exceptions array to check for a match in the event of a movie gani being set.
My bad, I missed that part. Storing MD5 hashes might work, I've already experimented with that (though never used it widely) for detecting resized/edited images and it worked pretty well.
__________________
Reply With Quote
  #9  
Old 03-08-2011, 05:46 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
My bad, I missed that part. Storing MD5 hashes might work, I've already experimented with that (though never used it widely) for detecting resized/edited images and it worked pretty well.
I believe that repeated file size checks and calls to fileUpdate() will suffice for modified images.
Reply With Quote
  #10  
Old 03-08-2011, 08:05 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by cbk1994 View Post
Couldn't you just edit a legitimate movie GANI (in the exception list) on your client to abuse the glitch?
I was going to say the same thing, but unless players can say '/somemoviegani' or something, then I doubt existing movie ganis would be that big of a deal.

The problem comes from ganis that players are able to use at will, no?
__________________
Reply With Quote
  #11  
Old 03-08-2011, 09:51 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Just a general question: using
PHP Code:
savelog2(strstr
where is the file gonna get saved?
Reply With Quote
  #12  
Old 03-08-2011, 09:59 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by callimuc View Post
Just a general question: using
PHP Code:
savelog2(strstr
where is the file gonna get saved?
First argument is the file name. It's then saved to logs/FILENAME.
Reply With Quote
  #13  
Old 03-08-2011, 10:23 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Crow View Post
First argument is the file name. It's then saved to logs/FILENAME.
I see. So like "Hello/World.txt" would save it to "Hello" with the name "World.txt"?
Reply With Quote
  #14  
Old 03-08-2011, 10:26 PM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by callimuc View Post
I see. So like "Hello/World.txt" would save it to "Hello" with the name "World.txt"?
logs/hello/world.txt
__________________
Reply With Quote
  #15  
Old 03-08-2011, 10:38 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
oh ok thx
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.