Jump to content

login forms - security holes


real_illusions

Recommended Posts

Do login forms have the same security holes as email forms or have they different ones?I have found a login script that works, and it uses sessions. All the mysql ones i tried to get to work, failed. So theres no sql injection worries. However, what problems does using sessions bring about? Apart from session hijacks, however, i have a session end on the logout, so the session is killed/destroyed/eaten/blown up and so they have to login again.Would i need to check the form fields in such a way that email forms should be checked or something else?:)

Link to comment
Share on other sites

As far as I know about the mail() exploit(s) would be the headers where they can spam it and adding HTML/JavaScript for emails. With logins you will of course need to make sure that any info that can be submitted by the user, usually $_GET, $_POST, $_COOKIE, will be used with mysql_real_escape_string(). You will want to make sure that they can't insert special symbols like <, >, ", ' because of XSS (i.e. a username like <script>alert("XSS")</script>). Never use $_REQUEST because of things like CSRF. If you can/want, don't allow the session id added in the URL because an attacker can make up their own session, send the URL to someone and let them login, and once they do the attacker can reload the page with the same session to see their info. If you want, take information like their browser and ip address and check the values of the sessions. Since sessions are stored on the server, the user can only see the id of the session not the values inside of them. You can try and have them have harder passwords, adding characters outside of A-Za-z0-9 so it's harder to brute force. Hash their passwords, and add salts to them to prevent them to look them up with rainbow tables. Convenience is risky, but you don't want the user to do more than they should and will leave the site.

Link to comment
Share on other sites

Do login forms have the same security holes as email forms or have they different ones?
Something doesn't really have a security hole just because it's a certain type of script. If the script is written well then it probably won't have security holes, if it's not written well then it might. Sessions and cookies specifically have security implications, but a certain script isn't going to have security holes just because it's a certain type of script.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...