Flash games hack, score is 49700?? How to improve flash games security?

前端 未结 9 1724
有刺的猬
有刺的猬 2021-02-14 09:59

I have 2 flash games (written in as3). Both the highscore value being hacked. The normal range of each game score is not more than 5000 (normal users, will only get 2000 - 3000

相关标签:
9条回答
  • 2021-02-14 10:32

    As you said depending on what is being done to hack this there are different holes to fix. As you are sending the actual information in your message, and "secret" is contained in the code it becomes a much easier target. Some of the things you could do to improve security

    • Use a different hash function, MD5 has known flaws it is possible to create messages with the same signature without knowing the content, SHA1, SHA2 offer higher security, this will prevent an attack through a weakness of MD5

    • Make the 'secret' unique to each message, ie. send it from the server for each posting, this will prevent people from reusing the same hash over and over again, and make it harder to look at the code and create the hash

    • Hash the result multiple times e.g. value = hash(hash(hash(...,salt),salt),salt) this won't help if people are decompiling your program but it will help if they are just trying to recreate the hash by itself.

    • Look for software to protect your SWF against decompilation, i don't do much flash so I don't have any reliable links for that

    0 讨论(0)
  • 2021-02-14 10:33

    The cryptographic system you are using is very similar to an HMAC, but yours implementation is less secure. The md5 algorithm is a broken, however your MAC is immune to the prefixing attack to generate hash collisions because the beginning of the your secret. The attacker must be able to control the beggaring of the string in order to create a hash collision.

    TamperData is a very useful hacking tool to Modify/Capture/Replay traffic that comes from the browser. So you should prevent against replay attacks by authenticating the current date and time: hmac(secret,date_time.score.username).

    The hackers are probably using a SWF Decompiler to find the value of your secret in the SWF file. In order to counter this you should try and bury the secret using a SWF obfuscation such as http://www.amayeta.com/.

    None of this is a "silver bullet", this just makes it more difficult for the hacker. A hacker will always be able to modify his or her score because you are trusting the client to tell you the correct score. Even if you made the recommended changes you would still be in violation of CWE-602.

    0 讨论(0)
  • 2021-02-14 10:39

    What I was thinking was that since the game appear's to require authentication I would assume that there are calls that require a get user name and other info.

    Discussing the matter from another developer thir advice was to use Ajax components. Idk.

    Most hackers will find a way to get around most security issues the best way is to prevent them from sending anything back to the server other than what is required for the game to function.

    Has anyone used random based on the amount of negative memory available? instead of looking for the specific memory location with those softwares.

    Why not send multiple bogus values to mem and derive the outcomes based on open memory locations?

    Please don't attack me for this suggestion I am a learner like most others.

    0 讨论(0)
提交回复
热议问题