Thursday, June 15, 2017

Lessons and advice from my talk at NDC Oslo 2017

I'm speaking at NDC Oslo 2017 right now. If you are interested in the lessons and advice I present in my talk, I have gathered them here:

  1. Always keep your third party software up to date.
  2. When passwords are posted, always do a redirect. Even if the password is wrong.
  3. Don’t leak information.
  4. Apply authorization to all non-public functions.
  5. Always apply HttpOnly and Secure flags on cookies if possible.
  6. Renew tokens on login and make them sufficiently random.
  7. Passwords are hard! Check best practice for storing, changing, resetting, remember function, etc.
  8. Check authentication on every page after login.
  9. Apply anti-CSRF tokens or similar measures when forms are posted.
  10. Prevent XSS by
    1. Validating input
    2. Output encode all user input for correct context
    3. Use content-security-policy header if possible


My advice on how to prevent disaster:

  • Educate your developers and testers
  • Educate support on response and escalations
  • Use security testing tools: Fiddler, ZAP or Burp, sqlmap or Havij, code analysis, third party version scanners etc
  • Security test of new and existing features
  • Log alerts, detect suspicious activity
  • State how vulnerabilities can be reported
  • External test or audit
  • Bug bounty program

Final words: Hack you own systems. Assume that users are evil. It just takes one evil user. Know your enemy. Know the tools and techniques that hackers use and what they are looking for. Find and fix the vulnerabilities before someone else does.