Is it good to be paranoid ?introduction to web securityTech talk @ Georgia Tech, March 2011
Subramanyan MuraliyahooMail Engineer Hacker, Photographer, Traveler @rmsguhan
par·a·noi·anparanoia [pӕrəˈnoiə]a type of mental illness in which a person has fixed & unreasonable ideas that he/she is very important, or that other people are being unfair or un-friendly to him/her3
in Yahoo!, they are just people who care a lot about web security 4
Q.What is the problem ?
Spammers want to do cheap advertising & unsolicited marketing
Phisherswant to steal user identity for personal benefit
Crackers want to break into your systems & profit
Jokers just want to watch the world burn 
“It’s necessary to build an application that is user friendly, high performing, accessible and secure, all while executing partially in an un-trusted environment that you, the developer, have no control over”Philip Tellis, Yahoo! Paranoidhttp://www.smashingmagazine.com/author/philip-tellis/
A tech-savy user maybe aware …
… but to some cookies are still made of dough & chocolate chips
A.Keep it simple for normal users Make it hard for users with evil intentions
Users have a lot of trust on the web & share a lot of information
Every attack is unique & exploits weakness
Types of web attacksPhishing & Spamming Scamming Code InjectionForgery & spoofing
Cross(X)Side Scripting 17
XSSFilter all input that you are going to save Be aware of the data you are saving URL should save only urlsNumbers should save only numbers Never open up your site based purely on trust
SQL / Shell Injection
http://xkcd.com/327/
<?php $user = $_GET[‘user’]; $message = $_GET[‘message’];function save_message($user, $message){  $sql = "INSERT INTO Messages (            user, message          ) VALUES (            '$user', '$message’          )";   return mysql_query($sql);}?>
test');DROP TABLE Messages;test'), ('user2', 'Cheap medicine at ...'), ('user3', 'Cheap medicine at …
Cross-Site Request Forgery
<imgsrc=“http://www.mybiz.com/post_message?message=Cheap+medicine+at+http://evil.com/”     style="position:absolute;left:-999em;”>
<iframename="pharma” style="display:none;"></iframe><form id="pform”   action=“http://www.mybiz.com/post_message”      method="POST”      target="pharma”><input type="hidden" name="message" value="Cheap medicine at ..."></form><script>document.getElementById('pform').submit();</script>
Issue a unique token / crumb that only your server would know for that sessionCheck if the posted data has that token
For normal posts, use a time bound token <?phpfunction get_nonce() {  return md5($secret . ":"  . $user . ":"  . ceil(time()/86400));}?>For more sensitive posts, use a token that is stored in user session
Click-jackinghttp://erickerr.com/like-clickjacking
Tab-Jackinghttp://www.azarask.in/blog/post/a-new-type-of-phishing-attack/
New secure technology does not guarantee a secure application
As developers, we need to cautious
Resourceshttp://www.owasp.org/index.php/Main_Pagehttp://kilimanjaro.dk/blog/http://www.smashingmagazine.com/author/philip-tellis/http://code.google.com/edu/security/index.htmhttp://www.slideshare.net/joewalker/web-app-securityhttp://www.slideshare.net/shiflett/evolution-of-web-securityhttp://www.slideshare.net/txaypanya/owasp-top10-2010
Be paranoid, be smartThank you ! 

Is it good to be paranoid ?

Editor's Notes

  • #7 Spamming remains economically viable because advertisers have no operating costs beyond the management of their mailing lists, and it is difficult to hold senders accountable for their mass mailings. Because the barrier to entry is so low, spammers are numerous, and the volume of unsolicited mail has become very high. In the year 2011 the estimated figure for spam messages are around seven trillion. The costs, such as lost productivity and fraud, are borne by the public and by Internet service providers, which have been forced to add extra capacity to cope with the deluge.
  • #13 Not everyone is technical, we as developers understand many concepts of security and try to be cautious But normal users do not understand many of these concepts Keeping the web safe for such kind of users is very important