39
Attack Detection and Prevention with OWASP AppSensor Colin Watson Watson Hall Ltd colin @ watsonhall.com

Attack Detection and Prevention with OWASP AppSensor

  • Upload
    dolan

  • View
    56

  • Download
    1

Embed Size (px)

DESCRIPTION

Attack Detection and Prevention with OWASP AppSensor. Colin Watson Watson Hall Ltd colin @ watsonhall.com. OWASP AppSensor. AppSensor. Established Summer 2008 Presented at multiple conferences in US & Europe Recent video presentations by Michael Coates - PowerPoint PPT Presentation

Citation preview

Page 1: Attack Detection and Prevention with OWASP AppSensor

Attack Detection and Prevention with OWASP

AppSensorColin Watson

Watson Hall Ltdcolin @ watsonhall.com

Page 2: Attack Detection and Prevention with OWASP AppSensor

OWASP AppSensor

Page 3: Attack Detection and Prevention with OWASP AppSensor

AppSensor

• Established Summer 2008

• Presented at multiple conferences in US & Europe

• Recent video presentations by Michael Coates

• Real Time Application Defenses - The Reality ofAppSensor & ESAPI

http://vimeo.com/15726323

• Automated Application Defenses to Thwart Advanced Attackershttp://michael-coates.blogspot.com/2010/06/online-presentation-thursday-automated.html

• Application Based Intrusion Detection highlighted in OWASP Top Ten 2010 “What’s Coming”

Page 4: Attack Detection and Prevention with OWASP AppSensor

AppSensor Team

• Core team:

• Michael Coates

• John Melton

• Colin Watson

• Contributors:

• Ryan Barnett

• Simon Bennetts

• August Detlefsen

• Randy Janida

• Jim Manico

• Giri Nambari

• Eric Sheridan

• John Stevens

• Kevin Wall

Page 5: Attack Detection and Prevention with OWASP AppSensor

AppSensor concepts

Page 6: Attack Detection and Prevention with OWASP AppSensor

Add AppSensor to your own applications

• Build it into requirements

• Develop your own

• ESAPI

• AppSensor integration into Java ESAPI imminent

• Security Information/Event Management

• Add detection points into application

• Integrate logging into real time monitor

Page 7: Attack Detection and Prevention with OWASP AppSensor

AppSensor detection points

• A detection point is a highly-tuned instrumentation sensor (typically with the application’s code) and used to identify a particular type of suspicious or malicious activity

• Over 50 detection points

• 12 exception types

• 9 signature based (request, authentication, session, etc)

• 3 behavior based (user, system, reputation)

• Latest list of detection points with descriptions, considerations and examples is maintained at:http://www.owasp.org/index.php/AppSensor_DetectionPoints

Page 8: Attack Detection and Prevention with OWASP AppSensor

Detection point exception types

• “locking a user account after multiple failed authentication attempts”

“blocking requests using the TRACE HTTP method”“limiting each session to a particular IP address”

Page 9: Attack Detection and Prevention with OWASP AppSensor

AppSensor response actions

• Response actions describe a change to the application’s behavior

• 14 response actions

• Many ways to classify them, including:

• Effect on user / application

• Target of response

• Duration of response

• Latest list of response actions with descriptions, considerations and examples is maintained at:http://www.owasp.org/index.php/AppSensor_ResponseActions

Page 10: Attack Detection and Prevention with OWASP AppSensor

Response actions from the user’s viewpoint

Page 11: Attack Detection and Prevention with OWASP AppSensor

Implementation planning methodology

1. Preliminary requirements

2. Detection point selection

3. Response action selection

• Then

• Procure/develop

• Deploy

• Verify

• Monitor and tune

Page 12: Attack Detection and Prevention with OWASP AppSensor

1. Preliminary requirements

Page 13: Attack Detection and Prevention with OWASP AppSensor

1a) Application risk assessment

• Many alternative methods and processes:• http://www.whitehouse.gov/sites/default/files/omb/memoranda/fy04/m

04-04.pdf

• http://csrc.nist.gov/publications/nistpubs/800-30/sp800-30.pdf

• http://csrc.nist.gov/publications/fips/fips199/FIPS-PUB-199-final.pdf

• http://www.sans.org/reading_room/whitepapers/auditing/introduction-information-system-risk-management_1204

• http://www.owasp.org/index.php/OWASP_Risk_Rating_Methodology

• http://www.owasp.org/index.php/Threat_Risk_Modeling

• http://www.nr.no/~abie/RiskAnalysis.htm

• Application risk ranking

Page 14: Attack Detection and Prevention with OWASP AppSensor

1b) Secure coding

• Build the application securely

• Governance

• Construction

• Verification

• Deployment

• Software Assurance Maturity Modelhttp://www.owasp.org/index.php/Category:Software_Assurance_Maturity_Model

• Application Security Verification Standardhttp://www.owasp.org/index.php/ASVS

• OWASP Development, Code Review and Testing Guides

Page 15: Attack Detection and Prevention with OWASP AppSensor

1c) Application logging

• How to Do Application Logging RightAnton Chuvakin and Gunnar Peterson, IEEE Security & Privacy Journal http://arctecgroup.net/pdf/howtoapplogging.pdf

• Securosis Blog - Monitoring Up the Stack serieshttp://securosis.com/blog/monitoring-up-the-stack-app-monitoring-part-1http://securosis.com/blog/monitoring-up-the-stack-app-monitoring-part-2

• OWASP AppSensorDemo2 Intrusion Store (HSQLDB)http://code.google.com/p/appsensor/source/browse/#svn/trunk/AppSensorDemo2

• OWASP ESAPI Java Edition documentationhttp://code.google.com/p/owasp-esapi-java/

• NIST SP 800-92 Guide to Computer Security Log Managementhttp://csrc.nist.gov/publications/nistpubs/800-92/SP800-92.pdf

Page 16: Attack Detection and Prevention with OWASP AppSensor

2. Detection point selection

Page 17: Attack Detection and Prevention with OWASP AppSensor

2a) Categorization

• Exception types

• Signature or behavior based

• Suspicious events or attacks

• Outcome/result of the request, or request properties

• Classes:

• Discrete

• Generic pre-processing

• Business layer

• Aggregating

• Modifying

Page 18: Attack Detection and Prevention with OWASP AppSensor

2a) Categorization (continued)

Page 19: Attack Detection and Prevention with OWASP AppSensor

2b) Requirements

• Approaches:

• Application risk classification

• Threat assessment

• Class categorization

• Discrete

• Generic pre-processing

• Business layer

• Aggregating

• Modifying

Page 20: Attack Detection and Prevention with OWASP AppSensor

2c) Model development

• Requirements for each detection point:

• purpose

• general statement of its functionality

• details of any prerequisites

• related detection points.

• Duplicate codes

• Aggregating detection points

Page 21: Attack Detection and Prevention with OWASP AppSensor

2c) Model development (continued)

Page 22: Attack Detection and Prevention with OWASP AppSensor

2c) Model development (continued)

Page 23: Attack Detection and Prevention with OWASP AppSensor

2d) Optimization

• Three aims

• Ensure we maintain a low false positive rate through adjusting the sensitivity

• Consider relationships with other systems and the effects these may have on detection points

• Identify if any detection points can be removed to eliminate overlaps and duplicates

• Test cases

Page 24: Attack Detection and Prevention with OWASP AppSensor

2e) Code location

• Instrumentation not new functionality

• Process

• Procurement

• Development

• Frameworks

• Libraries

• Common code / business layer

Page 25: Attack Detection and Prevention with OWASP AppSensor

2f) Attack analysis

• Attack vectors

• Threat modelling

• WASC Threat Classification v2.0http://projects.webappsec.org/Threat-Classification

• OWASP Top Ten 2010http://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project

• Common Attack Pattern Enumeration and Classification http://capec.mitre.org/

• Check the model

• Detection points are activation

• Human error

Page 26: Attack Detection and Prevention with OWASP AppSensor

3. Response action selection

Page 27: Attack Detection and Prevention with OWASP AppSensor

3a) Strategic requirements

• Organizational risk tolerance

• User experience

• Application’s purpose

“Do not prevent users doing anything, but log, monitor and alert fervently.”“Authenticated administrators who have access to the most functionality and the greatest data access permissions should have the strictest thresholds before a response action is undertaken.”

“Application functionality will not be changed unless the user's source location is in a higher-risk country.”

Page 28: Attack Detection and Prevention with OWASP AppSensor

3b) Thresholds

• Approaches

• Role dependent

• Per detection point / per application

• Weightings of suspicious and attack events

• User events and user trends

• Individual detection points

• Overall number of security events

• System trend detection points

• Modifying detection points

Page 29: Attack Detection and Prevention with OWASP AppSensor

3b) Thresholds (continued)

Page 30: Attack Detection and Prevention with OWASP AppSensor

3c) Model tuning

• Attacks

• Typical user activities

• Speed of use

• Static content

• Missing content

• Actions that disable features or the application

• Other systems

• Business metrics

Page 31: Attack Detection and Prevention with OWASP AppSensor

3c) Model tuning (continued)

• Only log

• Source location override

• Export

• Vulnerability management programmes

• Security integration manager (SIM) systems

• Secure development practices

Page 32: Attack Detection and Prevention with OWASP AppSensor

Plan execution

Page 33: Attack Detection and Prevention with OWASP AppSensor

Implementation

• Secure development practices:

• Risk analysis

• Design and code review

• Testing

• Operational enablement

• Change management

• Monitoring and tuning

• Ongoing testing

Page 34: Attack Detection and Prevention with OWASP AppSensor

Lightweight implementation

Page 35: Attack Detection and Prevention with OWASP AppSensor

Piloting AppSensor / fast-track approach

• Focus on input, signature based detection points that detect attacks rather than suspicious events in the discrete class:

• Request exceptions (RE1, 2, 3 and 4 )

• Access control exception (ACE1 and 2)

• Input exceptions (IE1, 2 and 3)

• Authentication exceptions (AE1, 2 and 3) and Session Management exceptions (SE5 and 6) when authentication & session management is use

• And limit response actions to additional logging (ASR-A), administrator notification (ASR-B), account logout (ASR-J) & account lockout (ASR-K).

• Do it with ESAPI

Page 36: Attack Detection and Prevention with OWASP AppSensor

Concluding thoughts

Page 37: Attack Detection and Prevention with OWASP AppSensor

Supporting materials

• AppSensor Project:

• Home pagehttp://www.owasp.org/index.php/Category:OWASP_AppSensor_Project

• Detection pointshttp://www.owasp.org/index.php/AppSensor_DetectionPoints

• Response actionshttp://www.owasp.org/index.php/AppSensor_ResponseActions

• Mailing lists

• https://lists.owasp.org/mailman/listinfo/owasp-appsensor-project

• https://lists.owasp.org/mailman/listinfo/owasp-appsensor-dev

• Planning guide and workbook

http://www.owasp.org/index.php/File:Appsensor-planning.zip

Page 38: Attack Detection and Prevention with OWASP AppSensor

Related presentations at AppSec DC 2010

• Application Portfolio Risk Ranking: Banishing FUD With Structure and NumbersDan Cornellhttp://www.owasp.org/index.php/Application_Portfolio_Risk_Ranking:_Banis

hing_FUD_With_Structure_and_Numbers

• Solving Real World Problems with ESAPIChris Schmidthttp://www.owasp.org/index.php/Solving_Real_World_Problems_with_ESAPI

• Next: OWASP ModSecurity Core Rule SetRyan Barnett http://www.owasp.org/index.php/OWASP_ModSecurity_Core_Rule_Set

Page 39: Attack Detection and Prevention with OWASP AppSensor

Questions and feedback

•Now

•During the last two breaks today

•Subsequently

• colin @ watsonhall.com

• +44 20 7183 3710

Photographs: Machinery and instrumentation at the Discovery Museum,Tyne & Wear Archives and Museums, Newcastle-upon-Tyne, England