Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-27-2008, 04:31 PM   PM User | #1
Ricky158
Regular Coder

 
Join Date: Aug 2002
Location: New York
Posts: 152
Thanks: 12
Thanked 0 Times in 0 Posts
Ricky158 is an unknown quantity at this point
Post The "High Score" Problem

I've been doing a lot of research on this topic recently and I'm sort
of stuck. For those who don't know about this type of problem, it is
the security concern that communication between Flex (a Flash
front-end application) and a server through PHP is thinly-veiled and
prone to attack. Specifically, when a Flash game tries to tell the
server that a user got a high score, an attacker can find a way to
fake this high score and achieve the best score (sometimes resulting
in a cash prize).

The measures that I've been studying seem to only get in the way for
attackers, but not thwart them entirely. For example, one could simply
encrypt the data that is passed to a PHP file, but the Flash
application can be decompiled and the encryption technique is
discovered. Alternatively, one could obfuscate the application, making
the decompilation produce jargon, but this too can be translated into
human-readable text. A server can check data for feasibility by using
a timer to detect super-fast computer-generated PHP POSTs, but this
too can be overridden by slowing down the auto-POSTs. This is the case
for other "human" feasibility checks. If the server checks the POST
headers, they too can be faked by proxies.

Is the simple conclusion that Flash applications are inherently
transparent? There is no such thing as Flash application security?
Does SSL patch any of these risks?

How can a "high score" problem be overcome?
Ricky158 is offline   Reply With Quote
Old 05-27-2008, 06:23 PM   PM User | #2
NancyJ
Senior Coder

 
NancyJ's Avatar
 
Join Date: Feb 2005
Location: Bradford, UK
Posts: 3,162
Thanks: 19
Thanked 65 Times in 64 Posts
NancyJ will become famous soon enough
I'm no expert on flash or flex but it seems to me a simple way would be to have the php file pass a variable to the flash/flex program and then have that information be sent back to the php file when the score is saved - if the values don't match then the score isn't recorded.

If the flash file is decompiled, the file doesn't contain the value that needs to be sent.

Just an idea.
__________________
http://www.hazelryan.co.uk
NancyJ is offline   Reply With Quote
Old 05-27-2008, 07:13 PM   PM User | #3
Ricky158
Regular Coder

 
Join Date: Aug 2002
Location: New York
Posts: 152
Thanks: 12
Thanked 0 Times in 0 Posts
Ricky158 is an unknown quantity at this point
Quote:
Originally Posted by NancyJ View Post
I'm no expert on flash or flex but it seems to me a simple way would be to have the php file pass a variable to the flash/flex program and then have that information be sent back to the php file when the score is saved - if the values don't match then the score isn't recorded.

If the flash file is decompiled, the file doesn't contain the value that needs to be sent.

Just an idea.
The problem with that is that a person can be watching their HTTP Headers and just grab that variable in transit. The person can then fake a POST and include both the variable and their new "high score".
Ricky158 is offline   Reply With Quote
Old 05-27-2008, 08:26 PM   PM User | #4
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
Nothing is completely secure...

You could put layers between the application and the server, perhaps some method of checking variables. I know a smart person will always unravel the layers, but the more you put the harder it gets.

This isn't necessarily a flash/flex issue, if you can send a variable via POST to any script someone could try to interject their own into it.

Very good question though...maybe ask it in the section where PHP people can read it too.
gnomeontherun is offline   Reply With Quote
Old 06-03-2008, 03:46 PM   PM User | #5
vahsi000
New to the CF scene

 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
vahsi000 is an unknown quantity at this point
i'm not sure how helpful my suggestions will be but here goes...
I agree with jeremy, if a hacker really wants to get that prize they will but it also depends on how much the cash prize is (or whatever the value of the item). If it's something small valued less than $100 you shouldn't worry too much about it, just get some encryption happening.

Otherwise I really think a combination of PHP SSL & Cookies will get you a good amount of security, as I know a lot of shopping cart systems use SSL to handshake with the browser to prevent hackers from stealling information.

Finally if it's a really big some of $$$ then i would most likely look into another technology, shockwave maybe?
vahsi000 is offline   Reply With Quote
Old 06-30-2008, 10:23 AM   PM User | #6
kaydara
New Coder

 
Join Date: Feb 2005
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
kaydara is an unknown quantity at this point
how about is you pass your request with some encryption ?
__________________
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Wich one are you ?
kaydara is offline   Reply With Quote
Old 06-30-2008, 02:29 PM   PM User | #7
Ricky158
Regular Coder

 
Join Date: Aug 2002
Location: New York
Posts: 152
Thanks: 12
Thanked 0 Times in 0 Posts
Ricky158 is an unknown quantity at this point
Quote:
Originally Posted by kaydara View Post
how about is you pass your request with some encryption ?
Then the encryption method is publicly known, as any SWF can be decompiled into its source code.
__________________
Ricky158 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 +1. The time now is 09:10 AM.


Advertisement
Log in to turn off these ads.