Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by MileSplit · Feb 18, 2017 at 05:58 PM · securityserverside

How Secure is the Server Side High Scores script?

Hello everyone,

The script i am talking about is the well known sever side high score script on the unity wiki http://wiki.unity3d.com/index.php?title=Server_Side_Highscores

I am using the script for an android game but I am worried about people being able to decompile the script and be able to see the "private key". Is this a legit worry? How do other companies do it?

Thank you.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Suddoha · Feb 19, 2017 at 02:50 AM

People can decompile the game and read the key, indeed. And that's not a big deal at all. Once the key is known, one can send any name and score plus the known key, hashed with the exact algorithm which is used in your script, as if you didn't have a "secrect key" at all. The server would never recognize that unless you implemented more logic to attempt filtering wrong submits, e.g. extreme scores etc.

The thing is, everything that is done on the client side can be manipulated. The only thing you can do is try to implement certain barriers in order to stop people from trying to cheat. But that's usually not easy and often not worth it. Companies have invested much money and a lot of time to find solutions, in the end, as you may know, almost everything that needs to be bullet proof has some kind of connection to a server which handles critical portions of the applications logic.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MileSplit · Feb 19, 2017 at 02:59 AM 0
Share

Hmm... So any ideas what i can do to make the key more secure? The game is android/ios only would should make it more difficult. Is there anyway i could encrypt the key? How do big companies like supercell manage it?

avatar image Suddoha MileSplit · Feb 19, 2017 at 03:31 AM 0
Share

If you encrypt the key, you'd either put the encrypted key into the file (which again could be read out and used) or you'd request a key from a server, use an algorithm and hash with it. But then the algorithm could be seen, so you would've won nothing at all.

If you start a SuperCell game, you usually connect to a server. Without a connection you cannot play, or at least you're not able to change anything that would update your game state.

Everything you attempt to do there, let's say in CoC, will be sent to a server. Afaik they're using AWS (Amazon Web Services) to handle the massive player base. Server-sided logic would then evaluate the commands, check whether the action is legit in the given context and with the current game state. Finally, it updates the database.

While this happens, the application can locally predict the result in order to provide immediate feedback to the user. As if there wasn't any delay for server-side evaluation etc.

avatar image MileSplit Suddoha · Feb 19, 2017 at 03:34 AM 0
Share

Thank you for your insight. $$anonymous$$y game is an endless runner type game so it would hard to implement such a idea. Unless i wanted to do the whole physics sim on the server side which does not sound fun.

Show more comments
avatar image
0

Answer by benaldo · Sep 18, 2018 at 04:46 PM

You can implement an asymmetric encryption algorithm and key exchange style solution.

Where the server keeps a permanent keypair, and the client also generates a personal keypair.

Then you use the keypairs to implement a Diffie-Hellman key exchange and use that exchange to authenticate a symmetric key for most of the communications. (Symmetric is less overhead than asymmetric)

But this is only hardening, and will not stop a truly determined hacker from getting what they want... But if your server handles and authenticates the scoreboard updates as best it can, you can hide the secure stuff behind an API.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

65 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Safest way to send data to server 1 Answer

Securing HTTP post request 1 Answer

Security.PrefetchSocketPolicy does not work in debug session? 0 Answers

Using https:// in WWW calls. 0 Answers

Webplayer sandbox security policy: When do I prefetch security policy? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges