DEV Community

Discussion on: Six Ways a Russian Hacker Attacked My Website

Collapse
 
nastyox1 profile image
nastyox

Fortunately my security was tight, so they all failed- but it is very disquieting that people actually dedicate themselves to this type of thing. Thanks for the follow by the way :)

Collapse
 
limusina10 profile image
limusina10

What do you recommend such as a web security steps or configurations that you recommend to keep my website safe? Is coded in php.

Thread Thread
 
nastyox1 profile image
nastyox • Edited

There are a lot of things you can do. Some basic ones are:

  1. Use mysqli_real_escape_string to sanitize anything you put in your database.
  2. Escape any string that was provided by a user that you're going to show to another user on any page with htmlentities.
  3. Use salted hashing to store passwords safely.
  4. Use a modern hashing algorithm (like sha512) when you're hashing your password/sensitive data.
  5. Don't let people upload files to your site unless you're very careful about controlling the file type and data.
  6. There are some more good tips here.
Thread Thread
 
limusina10 profile image
limusina10 • Edited

Super helpfull!! Thanks ❤😊

Btw I didn't know that sha512 exists 😂😂