ivan medvedev principal security development...

36
Ivan Medvedev Principal Security Development Lead Microsoft Corporation

Upload: others

Post on 28-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Ivan Medvedev

Principal Security Development Lead

Microsoft Corporation

Page 2: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Session Objectives and Takeaways

Session Objective(s):

• Give an overview of the Security Development Lifecycle

• Discuss the externally available tools that support the SDL

• Provide guidance on using the tools to build more secure software

Key takeaways:

• Microsoft is investing into supporting the SDL

• Customers should use the tools to build more secure software

Page 3: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Security Timeline at Microsoft…

2002-2003

2004

2005-2007

Now

• Bill Gates writes “Trustworthy Computing” memo early 2002

• “Windows security push” for Windows Server 2003

• Security push and FSR extended to other products

• Microsoft Senior Leadership Team agrees to require SDL for all products that:

• Are exposed to meaningful risk and/or

• Process sensitive data

• SDL is enhanced

• “Fuzz” testing

• Code analysis

• Crypto design requirements

• Privacy

• Banned APIs

• and more…

• Windows Vista is the first OS to go through full SDL cycle

• Optimize the process through feedback, analysis and automation

• Evangelize the SDL to the software development community:

• SDL Process Guidance

• SDL Optimization Model

• SDL Pro Network

• SDL Threat Modeling Tool

• SDL Process Templates

Page 4: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

SDL – Continual Improvement

Microsoft’s secure development processes have come a long way since the SDL was first introduced – the SDL is constantly evolving

Page 5: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

SDL for Spiral/Waterfall Development

Ongoing Process Improvements

Process Education Accountability

Page 6: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Major differentiators of Agile: No distinct phases Short release cycles

SDL for Agile Development Simple:

Comprehensive:

Customizable:

Page 7: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Native code requirements address implementation of cloud services

SDL has applied to web properties since v3.2 • Requirements address issues such as cross site scripting and SQL injection

Cloud services and web properties often use agile development models • “Product cycle” might be 2 weeks, not three years

Multiple iterations of SDL for agile development since 2006

What About the Cloud?

Page 8: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

The application space is under attack things are bad, and getting worse • Users now expect security *without* having to pay for it

Software security and holistic development practices are becoming a competitive differentiator • Procurement

Showing up in government regulations • DISA STIG

• NIST Smart Grid Requirements

Failure to show forward momentum will lead to unintended consequences and loss of consumer trust

Motivation for Action

Page 9: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

SDL Process Template

MSF-Agile + SDL Process Template

Tools for SDL: Requirements and Release

Page 10: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Incorporates

• SDL requirements as work items

• SDL-based check-in policies

• Generates Final Security Review report

• Third-party security tools

• Security bugs and custom queries

• A library of SDL how-to guidance

Integrates with previously released free SDL tools

• SDL Threat Modeling Tool

• Binscope Binary Analyzer

• Minifuzz File Fuzzer

SDL Template for VSTS (Spiral)

The SDL Process Template integrates SDL 4.1 directly into the VSTS software development environment.

Page 11: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Automatically creates new security workflow items for SDL requirements whenever users check in code or create new sprints

Ensures important security processes are not accidentally skipped or forgotten

Integrates with previously released free SDL tools

• SDL Threat Modeling Tool

• Binscope Binary Analyzer

• Minifuzz File Fuzzer

Will be updated for VS2010

Incorporates SDL-Agile secure development practices directly into the Visual Studio IDE - now available as beta (planned release at the end of Q2CY10)

MSF Agile + SDL Template for VSTS

Page 12: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

SDL Threat Modeling Tool

Tools for SDL: Design

Page 13: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Provides:

• Guidance in drawing threat diagrams

• Guided analysis of threats and mitigations

• Integration with bug tracking systems

• Robust reporting capabilities

SDL Threat Modeling Tool

Transforms threat modeling from an expert-led process into a process that any software architect can perform effectively

Page 14: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build
Page 15: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Banned.h

Code Analysis for C/C++

• Visual Studio Premium and Ultimate

Microsoft Code Analysis Tool .NET (CAT.NET) 1.0 CTP

• Detects common web app vulnerabilities, like XSS

FxCop 10.0

• Standalone or integrated into VS Premium and Ultimate

Anti-Cross Site Scripting (Anti-XSS) Library 4.0

SiteLock ATL Template

Tools for SDL: Implementation

Page 16: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build
Page 17: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build
Page 18: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

BinScope Binary Analyzer

• Ensures the build process followed the SDL

MiniFuzz File Fuzzer

• !exploitable

RegexFuzer

Attack Surface Analyzer Beta

• Snapshot based analysis

AppVerifier

• Dynamic analysis

Tools for SDL: Verification

Page 19: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Provides an extensive analysis of an application binary

Checks done by Binscope

• /GS - to prevent buffer overflows

• /SafeSEH - to ensure safe exception handling

• /NXCOMPAT - to prevent data execution

• /DYNAMICBASE - to enable ASLR

• Strong-Named Assemblies - to ensure unique key pairs and strong integrity checks

• Known good ATL headers are being used

Use either standalone or integrated with Visual Studio (VS) and Team Foundation Server (TFS)

Binscope Binary Analyzer

Page 20: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build
Page 21: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

MiniFuzz is a basic testing tool designed to help detect code flaws that may expose security vulnerabilities in file-handling code.

• Creates corrupted variations of valid input files

• Exercises the code in an attempt to expose unexpected application behaviors.

• Lightweight, for beginner or advanced security testing

• Use either standalone or integrated with Visual Studio (VS) and Team Foundation Server (TFS)

MiniFuzz File Fuzzer

Page 22: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Creates hashes to determine the uniqueness of a crash

Assigns an exploitability rating to the crash: Exploitable, Probably Exploitable, Probably Not Exploitable, or Unknown.

An extension of Microsoft debuggers

• windbg badapp.exe \users\mike\desktop\minifuzz\crashes\foobar8776.bad

• !load winext\msec.dll

• Run the process and have it parse the file: g

• Finally, run !exploitable to take a first pass analysis of the failure: !exploitable

Open source http://msecdbg.codeplex.com/

!exploitable

Page 23: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build
Page 24: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Takes system attack surface snapshots

One before and one after installing the product

Compares the snapshots and generates a report

Attack Surface Analyzer

Page 25: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build
Page 26: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

EMET

SDL Tools: Response

Page 27: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

GUI and command line interface

Configure system-wide mitigations

Enable mitigations for specific applications

Verify mitigation settings

EMET: Simplifying mitigation deployment

Page 28: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Protect at-risk or known vulnerable applications

Protect against active 0day attacks in the wild

Granular control over which mitigations are enabled

EMET: Protecting applications

Page 30: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

BlueHat Prize Announcement First BlueHat Prize Challenge:

• Design a novel runtime mitigation technology that is capable of preventing the exploitation of memory safety vulnerabilities

Entry Period: Aug 3, 2011 – Apr 1, 2012

Winners announced: BlackHat USA August 2012

IP remains the property of the inventor, with a license for Microsoft to use the technology

• $200,000 in cash Grand Prize:

• $50,000 in cash Second Prize:

• MSDN subscription ($10,000 value) Third Prize:

Page 31: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

Examples of Mitigation Technology

Data Execution Prevention (DEP)

• Sets non executable memory pages

Address Space Layout Randomization (ASLR)

• Randomizes memory in which apps load

Structured Exception Handler Overwrite Protection (SEHOP)

• Verifies exception handler lists have not been corrupted

Mitigation tools from Microsoft:

Download EMET

Page 32: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

BlueHat Prize Judging Criteria

Practicality – 30%

• Can the solution be implemented and deployed at a large scale on Windows?

• Overhead must be low (e.g. CPU and memory cost no more than 5%).

• No application compatibility regressions should occur.

• No usability regressions should occur.

• Reasonable to develop, test, and deploy.

Robustness – 30%

• How easy would it be to bypass the proposed solution?

Impact – 40%

• Does the solution strongly address key open problems or significantly refine an existing approach?

• Would the solution strongly mitigate modern exploits above and beyond our current arsenal?

Page 33: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

For More Information… BlueHat Prize Web site: www.bluehatprize.com • Questions? [email protected]

MSRC Blog: http://blogs.technet.com/msrc

EcoStrat Blog: http://blogs.technet.com/ecostrat/

Help Defend the Planet: http://careers.microsoft.com

Follow us on Twitter:

@k8em0 and

@MSFTSecResponse

Page 34: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

In Review: Session Objectives and Takeaways

Session Objective(s):

• Give an overview of the Secure Development lifecycle

• Discuss the externally available tools that support the SDL

• Provide guidance on using the tools to build more secure software

Key takeaways:

• Microsoft is investing into supporting the SDL

• Our customers should use the tools to build more secure software

Page 35: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build

We are hiring

Page 36: Ivan Medvedev Principal Security Development Lead2011.zeronights.org/files/ivanmedvedev-security...Session Objectives and Takeaways ... •Provide guidance on using the tools to build