22
Web Application Threats and Remediation Terry Labach, IST Security Team

Web Application Threats and Remediation

  • Upload
    tola

  • View
    42

  • Download
    0

Embed Size (px)

DESCRIPTION

Web Application Threats and Remediation. Terry Labach, IST Security Team. IST Security Team. The problem. While we use firewalls and other means to prevent attackers from access to our networks, we encourage access to our web sites, literally inviting miscreants to attack us - PowerPoint PPT Presentation

Citation preview

Page 1: Web Application Threats and Remediation

Web Application Threats and Remediation

Terry Labach, IST Security Team

Page 2: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

IST Security Team

Page 3: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

The problem

While we use firewalls and other means to prevent attackers from access to our networks, we encourage access to our web sites, literally inviting miscreants to attack us

Complex web application systems contain flaws that attackers can use for a variety of nefarious purposes

Page 4: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Risks

Loss of confidential data Vandalism of web sites Financial theft Denial of service Spread of spam or viruses Damaged reputation

Page 5: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

OWASP Top Ten for 2010

A1 Injection A2 Cross Site Scripting (XSS) A3 Broken Authentication and Session Management A4 Insecure Direct Object References A5 Cross Site Request Forgery (CSRF) A6 Security Misconfiguration A7 Failure to Restrict URL Access A8 Unvalidated Redirects and Forwards A9 Insecure Cryptographic Storage A10 Insufficient Transport Layer Protection

Page 6: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

SANS Institute

PHP Remote File Include SQL Injection Cross-Site Scripting (XSS) Cross-site request forgeries (CSRF)

Page 7: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

General principles

Specify what is allowed, not what is forbidden Use software engineering best practices (no

cowboy coders) Test applications fully Test environments must duplicate production

environments Test bad input, not just good input

Page 8: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Trust no one

Page 9: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Example attacks

Page 10: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Failure to restrict URL access

OWASP A6 Includes elements of data leakage Attackers can access documents through URLs that

should be protected

Page 11: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Preventing data leakage

Permissions, server settings, .htaccess can help, but best to prevent unneeded files from being present at all

Limit development to dedicated machines, publish only final files to production server

Page 12: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Cross-site scripting (XSS)

OWASP A2 Crafted URLs can allow scripts to be run by client’s

browser This can result in victims:

Having authentication credentials stolen Being redirected to malicious web sites

Page 13: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Preventing cross-site scripting

Sanitize all user input Remove meta-characters e.g. “’`<> Characters may be encoded, best to remove

anything not obviously harmless (e.g. a-zA-Z0-9) Foreign language support allows pathway to inject

meta-characters Validation must be done on server end, validation

done in the browser (e.g. through Javascript) can be bypassed

Page 14: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Broken Authentication

OWASP A3 Authentication of users can be faked or credentials

stolen to allow access to resources

Page 15: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Preventing authentication theft

Don’t pass authentication information in hidden fields

Page 16: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

SQL injection

OWASP A1 SQL commands are entered in user input fields If allowed as part of query to back-end database,

can result in data theft manipulation or vandalism of data

Page 17: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Preventing injection attacks

Sanitize user input Use appropriate data types and enumerations

instead of text fields

Page 18: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Automated Vulnerability Scanning

Hackers can perform vast numbers of typical attacks using automated processes to identify likely targets

The good guys can do the same, and a number of vendors provide such solutions

IBM AppScan selected after a lengthy evaluation process

IST Security Team will provide web application scans as a service

Page 19: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

IBM AppScan

Page 20: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Resources

Security information OWASP

www.owasp.org

SANS Institute (SysAdmin, Audit, Network, Security) www.sans.org

Jeremiah Grossman www.whitehatsec.com/home/resource/grossman.html

Page 21: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Resources

Vendors IBM (Appscan)

www.ibm.com/software/awdtools/appscan/

Cenzic (Hailstorm) www.cenzic.com

HP (WebInspect) www.hp.com

WhiteHat www.whitehatsec.com

Page 22: Web Application Threats and Remediation

WatITis | Strengthening Collaboration | December 8, 2009 | Web Application Threats and Remediation

Questions and Comments