Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by Shuyin76 · Jul 31, 2014 at 04:46 PM · wwwdatabasephpsecurity

Best way to protect www post to a php file ?

Hello everybody ! I'm wandering if I can block post requests that aren't from my game in my php file ? Or can I send totaly hidden www post to my php file ? I want to prevent anyone to insert information manually in my database. Sorry for my bad english and thanks in advance !

Edit : My game communicate with a server with a php file. The php file link the game to the database. For the moment I use the database only as a leaderboard but i would like to use it to store saves and passwords. So i want to protect all communications by hiding them or something.

Comment
Add comment · Show 4
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 ShadoX · Jul 31, 2014 at 04:55 PM 0
Share

Don't think so.. the best you can do is to do sanity checks on the server before moving the data to the DB (to make sure that the data makes sense and doesnt go over board or crashes the DB or server).

Simple www calls can be tracked probably in many ways.. with WireShark being 1 of the easy ones. So it won't be hard for people to find out what URL your game calls.. also make sure to check for SQL injections

You could try to figure out some way how to call the URL while passing some additional variable that identifies it as a legit call from your game, but people probably wouldn't have too much problems replicating that.

Perhaps you can tell us more about the game or the reason you're perfor$$anonymous$$g this URL call.. what are you trying to achive with with it ? Perhaps we'd be able to suggest a better solution if we'd know what your actually using it for.

avatar image Shuyin76 · Jul 31, 2014 at 04:58 PM 0
Share

So you think there is no way to protect a leaderboard of cheating (for example) if we communicate with the database via some php request ?

avatar image tanoshimi · Jul 31, 2014 at 06:52 PM 0
Share

Send a hash of the data along with some secret salt value with each request, and check the hash matches on the server (wouldn't prevent identical requests being sent again, but would prevent against simple tampering of the values

avatar image Shuyin76 · Jul 31, 2014 at 07:03 PM 0
Share

Thank you tanoshimi ! have you some tutorial or information which can help me learn about hashing data ?

1 Reply

· Add your reply
  • Sort: 
avatar image
-1
Best Answer

Answer by hkessock · Jul 31, 2014 at 07:23 PM

Use HTTPS and an expected handshake signature like AppID + current time + random GUID, plus whatever your command/data is.

Your server will at least know that somebody is using your AppID, knew to send the current time and knew to send a GUID of the type you require. (The GUID makes each transmission variable instead of static.)

Comment
Add comment · Show 1 · 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 hkessock · Aug 01, 2014 at 12:54 PM 0
Share

Why did someone mark this down without a comment?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

php, sql security 3 Answers

Upload audio file into mysql database 0 Answers

Character Creation from database 1 Answer

Unity to PHP/MySQL: password and username security 1 Answer

Unity - MySQL data loss 0 Answers


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