Jump to content

Security


Norman

Recommended Posts

If you're going to develop a major site, you have to worry about people hacking into the database or gaining access to other people's accounts. Read up on SQL injection attacks and how to guard against them:http://en.wikipedia.org/wiki/SQL_injectionAnd put some thought into if you even want to use cookies, and if so, what information you want to store in them. You won't want to create cookies that can be copied to another computer and used to login to the site.If you're doing any payment processing you will definately want to use SSL.

Link to comment
Share on other sites

Thanks for link and advice. However I think I'll not provide payment processings. But let me know one thing. If I follow all these information, during developing my site, then I will be 100% secure? I think no.. right?

Link to comment
Share on other sites

There's no such thing as 100% secure. You can possibly, but not probably, be 100% prepared though, meaning you have taken all the precautions you can, both securing the server and the pages themselves against attacks.

Link to comment
Share on other sites

  • 2 weeks later...

Well to know your weakness you have to know how they attacked you and possibly where (what page). From there you'll have to read the code and find the weakness.Its usally a SQL that takes an input like get, post or a cookie and not checked by a 'anti hack' script/function.

Link to comment
Share on other sites

Well to know your weakness you have to know how they attacked you and possibly where (what page)
And how can I get know of this?
Its usally a SQL that takes an input like get, post or a cookie and not checked by a 'anti hack' script/function.
I haven't understand, sorry..
Mostly, they will change your index pageor worse, they will delete all your file and database .
And, for example, could a hacker use my code that isn't correctly closed (for example)? An <if> that have not its closed tag... this type of things.
Link to comment
Share on other sites

They will mainly only attack databases and if they can access the pages they will edit them.The way they can delete your database is by exploiting weakneses in your SQL syntax. Heres a common mistake:

$sql = "SELECT * FROM users WHERE username ='".$_POST['username']."' AND password = '".$_POST['password']."'";$query = mysql_query($sql);

That can be exploited by any SQL Hacker novice. So thats an example of a BAD system. Heres a good one:

$user = ereg_replace("[^A-Za-z0-9\-\_]", $_POST['username']);$pass = md5($_POST['password']);$sql = "SELECT * FROM users WHERE username ='".$user."' AND password = '".$pass."'";$query = mysql_query($sql);

So the key here is making sure no user submitted data from forms (input boxes etc.) is not a hack.Theres more advanced ways to secure stuff but basically the main thing you have to look out for if you have a database is the user submitted data.You wont be hacked by a faulty script :) Just an error message :)I hope you understand that :) BTW Im using PHP as the examples. ASP and others will be different.

Link to comment
Share on other sites

I hope you understand that :)
Really thanks! :)
BTW Im using PHP as the examples. ASP and others will be different.
*I'm a noob with SQL, I need to study it*: So, is there a different syntax per language, using SQL? :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...