Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting started with security testing of web ap...

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Getting started with security testing of web applications

This talks about basics of security testing, top ten OWASP vulnerabilities and a demo on a security testing tool - ZAP

Avatar for abinayasakthi

abinayasakthi

April 22, 2017
Tweet

More Decks by abinayasakthi

Other Decks in Technology

Transcript

  1. Few Hacks and Breaches of 2016 - Union Bank was

    hacked - Millions of google accounts hit with Gooligan malware - LinkedIn
  2. 1. INJECTION - Any source of data can be an

    injection Vector - Often found in SQL,XPATH or NoSQL queries - It occurs when application sends untrusted data to the interpreter, - For example, Attacker can execute malicious SQL statements that control a web application’s database server.
  3. Select * from accounts where userId = ‘10’ OR ‘1’=’1’

    --’ and password = ‘something’ Executed query: Select * from accounts where userId = ‘10’ OR ‘1’=’1’ URL: http://example.com/app/accountView?id=10' or '1'='1
  4. How to prevent? - Use parameterised queries - Escaping inputs

    before adding them to the query - Whitelist input validations
  5. 2. BROKEN AUTHENTICATION AND SESSION MANAGEMENT - Authentication details are

    not protected - Easily guessable credentials - Session IDs in URL - Session IDs don’t time out - Passwords, Session IDs and credentials are sent over unencrypted connections
  6. How to prevent ? - Enforce strong password policies -

    Restricted number of attempts to login - Session IDs should be random and complicated - Add no cache tags for authentication pages
  7. How to prevent? - Sanitisation or validation of user input

    - Use HttpOnly flag in the HTTP response header
  8. 4. BROKEN ACCESS CONTROL - Grant access to functions and

    contents for specific users - Administrative interfaces that allow site administrators to manage a site over the Internet
  9. How to prevent? - Check access - Get access control

    matrix - File permissions - Insecure IDs Function 1 Function 2 Function 3 User 1 Yes No Yes User 2 Yes Yes No
  10. 5. SECURITY MISCONFIGURATION - It arises when security settings are

    defined, implemented and maintained as defaults/ not set to secure values - Can happen at any level - Platform - Webserver - Application server - Database - Framework
  11. Example - Directory listing is not disabled on server -

    Returning error stack trace to the user from app server - Removing sample applications that come with app servers - Provide proper access permissions on all web folders
  12. How to prevent? - Disable default accounts and change passwords

    - Disable/Remove unnecessary files/features - Avoid display of stack-trace to users - Keep software up-to-date
  13. 6. SENSITIVE DATA EXPOSURE - When the sensitive information is

    not adequately protected - Ex: passwords, session tokens, credit card data - Exposing sensitive token in public source code - Old/ weak cryptographic algorithm used
  14. How to prevent? - Don’t store sensitive data - Use

    strong encryption algorithm - Use of HTTPS on authenticated pages - Set nocache headers to browsers
  15. 7. INSUFFICIENT ATTACK PROTECTION (NEW) - No protection against brute

    force password attacks - No logging of login attempts - No logging of session initiation or completion - Provide quick fixes
  16. Example Attacker uses automated tool like OWASP ZAP to detect

    vulnerabilities and possibly exploit them
  17. 8. CROSS SITE REQUEST FORGERY (CSRF) - Forcing the authenticated

    user to execute unwanted actions on web application
  18. How to prevent? - Use proper CSRF tokens - Avoid

    simultaneous browsing while logged into an application
  19. Example - OpenSSL cryptographic software library has a memory leak

    bug - Reuters, one of the biggest news agency got hacked because of vulnerable version of WordPress
  20. How to prevent? - Identify vulnerability in the components that

    are being used - Upgrade the components to newer versions
  21. 10. UNDERPROTECTED APIS - Use of API’s has exploded in

    modern software to the point that even browser web applications are often written in JS and use API’S to get data. - Client software is easily reversed and communications interpreted. - Testing API’s is similar to testing other web applications
  22. Example - A banking domain app that connects to an

    XML API for account information and performing transactions
  23. How to prevent - Ensure that you have secured communications

    between the client and your API - Strong authentication schemes - Implement access control scheme - Protect against injection of all forms