More Secure Online Services Powered by the Microsoft SDL Bryan Sullivan Security Program Manager, SDL Microsoft.

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
Advertisements

Nick Feamster CS 6262 Spring 2009
Past, Present and Future By Eoin Keary and Jim Manico
Dial In Number Pin: 3959 Information About Microsoft September 21, 2012 Security Bulletin Jeremy Tinder Security Program Manager Microsoft.
What is code injection? Code injection is the exploitation of a computer bug that is caused by processing invalid data. Code injection can be used by.
MSDN Connection Get personalised information on the topics and technologies you want Profile yourself today and get updates via RSS Get personalised information.
Hands-on SQL Injection Attack and Defense HI-TEC July 21, 2013.
Don’t get Stung (An introduction to the OWASP Top Ten Project) Barry Dorrans Microsoft Information Security Tools NEW AND IMPROVED!
SEC835 OWASP Top Ten Project.
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
A Demo of and Preventing XSS in.NET Applications.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
Introduction to the OWASP Top 10. Cross Site Scripting (XSS)  Comes in several flavors:  Stored  Reflective  DOM-Based.
The 10 Most Critical Web Application Security Vulnerabilities
Varun Sharma Security Engineer | ACE Team | Microsoft Information Security
Security and JavaScript. Learning Objectives By the end of this lecture, you should be able to: – Describe what is meant by JavaScript’s same-origin security.
Workshop 3 Web Application Security Li Weichao March
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
OWASP Zed Attack Proxy Project Lead
Cross-Site Scripting Vulnerabilities Adam Doupé 11/24/2014.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
Ladd Van Tol Senior Software Engineer Security on the Web Part One - Vulnerabilities.
JavaScript, Fourth Edition
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
OWASP Top Ten #1 Unvalidated Input. Agenda What is the OWASP Top 10? Where can I find it? What is Unvalidated Input? What environments are effected? How.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
Security Attacks CS 795. Buffer Overflow Problem Buffer overflows can be triggered by inputs that are designed to execute code, or alter the way the program.
Web Applications Testing By Jamie Rougvie Supported by.
Building Secure Web Applications With ASP.Net MVC.
DAT356 Hackers Paradise SQL Injection Attacks Doug Seven, Microsoft MVP Cofounder of SqlJunkies.com
Enterprise Library Extensibility Brian Button VP of Engineering Asynchrony Solutions, Inc.
Security Development Life Cycle Baking Security into Development September 2010.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
OWASP Building Secure Web Applications And the OWASP top 10 vulnerabilities.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflow Analysis of Buffer Overflow Attacks.
Web Application (In)security Note: Unless noted differently, all scanned figures were from the textbook, Stuttard & Pinto, 2011.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
ASP Mr. Baha & Dr.Husam Osta  What is ASP?  Internet Information Services  How Does ASP Differ from HTML?  What can ASP do for you?  ASP Basic.
The OWASP Foundation OWASP XSS Remediation Cassia Martin Romain Gaucher April 7 th, 2011.
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
SECURE DEVELOPMENT. SEI CERT TOP 10 SECURE CODING PRACTICES Validate input Use strict compiler settings and resolve warnings Architect and design for.
ArcGIS for Server Security: Advanced
Group 18: Chris Hood Brett Poche
Web Application Vulnerabilities
An Introduction to Web Application Security
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TOPIC: Web Security (Part-4)
World Wide Web policy.
Web Application Security
Finding and Fighting the Causes of Insecure Applications
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
امنیت نرم‌افزارهای وب تقديم به پيشگاه مقدس امام عصر (عج) عباس نادری
Finding and Fighting the Causes of Insecure Applications
WWW安全 國立暨南國際大學 資訊管理學系 陳彥錚.
Exploring DOM-Based Cross Site Attacks
Presentation transcript:

More Secure Online Services Powered by the Microsoft SDL Bryan Sullivan Security Program Manager, SDL Microsoft

What We Will Cover Brief background on the Microsoft Security Development Lifecycle (SDL) SDL processes and tools currently used to protect online services Preview future SDL online initiatives

Session Prerequisites Knowledge of basic web application vulnerabilities Familiarity with web programming concepts ASP.NET is a plus Level 300

SDL Background What is the SDL? EducationToolsProcess

SDL Background SQL Server Before the SDL

SDL Background SQL Server After the SDL

Online Service Requirements OWASP Top Ten Cross-Site Scripting Injection Flaws Malicious File Execution Insecure Direct Object References Cross-Site Request Forgery Information Leakage Broken Authentication Insecure Cryptography Insecure Communications Failure to Restrict URL Access

Cross-Site Scripting (XSS) Input Validation Ensure the data is what the application expects FormatLength Regular expressions (can) work great here System.Text.RegularExpressions.RegexSystem.Web.UI.WebControls.RegularExpressionValidator

Cross-Site Scripting (XSS) Use of Regular Expressions Incorrect use of Regex: if (Regex.IsMatch(userInput, "[<>]")) // reject input Correct use of Regex: if (Regex.IsMatch(userInput, “^[a-zA-Z]{1,9}$")) // accept input

Cross-Site Scripting (XSS) ValidateRequest Page directive Web.config setting <configuration> </configuration> More of a defense-in-depth measure

Cross-Site Scripting (XSS) Encode Output Harder than it sounds! 7 different cases Plain HTML HTML attribute URLJavaScriptVBScriptXML XML attribute Use Microsoft AntiXSS Library

Demonstration 1 Microsoft AntiXSS Library

Cross-Site Scripting (XSS) Static Analysis XSSDetect Code Analysis Tool Analyzes source-to-sink dataflow Standalone or integrated into Visual Studio

SQL Injection Use Stored Procedures Bad code: SqlCommand command = new SqlCommand( "SELECT * FROM Customers WHERE CustomerId = '" + customerId + "'"); "SELECT * FROM Customers WHERE CustomerId = '" + customerId + "'"); Good code: SqlCommand command = new SqlCommand("GetCustomer"); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new

SQL Injection Avoid Moving the string concatenation to the stored proc code still leaves you vulnerable… EXEC ('SELECT * FROM Customers WHERE CustomerId = ''' + ''') The only approved use of EXEC is to call other stored procedures

SQL Injection Remove Database Privileges Allow only EXECUTE privileges on the necessary stored procedures All other privileges on all objects must be removed This is defense in depth

Cross-Domain Scripting Same Origin Policy Two frames/windows can only communicate with each other if they have the same origin Origin is defined as having the same: DomainPortProtocol Also applies to XMLHttpRequest

Cross-Domain Scripting Same Origin Policy Example If my page is PageAllowed?Why? domain protocol port domain ok Take a guess…

Cross-Domain Scripting Document.Domain Two cooperating pages can lower their domain so they can talk to each other Do not lower document.domain to the “two- dots” level or lower foo.site.com is allowed site.com is prohibited.com is right out (prohibited by browsers too)

Cross-Domain Scripting Cross-Domain Access Policies Used by Flash, Silverlight crossdomain.xmlclientaccesspolicy.xml<cross-domain-policy> </cross-domain-policy>

Cross-Site Request Forgery ViewStateUserKey Built-in canary defense for ASP.NET pages protected void Page_Init(object sender, EventArgs e) { this.ViewStateUserKey = Session.SessionID; this.ViewStateUserKey = Session.SessionID;}

Demonstration 2 ViewStateUserKey

Future SDL Initiatives SDL for Agile Development SDL originally designed for long projects Difficult to implement 100+ SDL requirements in two-week-long release cycles

Future SDL Initiatives SDL for Agile Development cont’d Break SDL into two “classes” Non-negotiable “every-sprint” requirements “Bucket” requirements Complete at least one from each bucket Complete all requirements every six months

Session Summary SDL can dramatically lower the number and severity of vulnerabilities in online services Validate user input Encode output Use stored procedures Avoid Limit cross-domain access Use ViewStateUserKey

For More Information SDL Web Site SDL Blog MSDN Magazine September 2008, “Security Briefs: SDL Embraces the Web” November 2008, “Agile SDL: Streamline Security Practices for Agile Development”

Questions and Answers Submit text questions using the “Ask” button. Don’t forget to fill out the survey. For upcoming and previously live webcasts: Got webcast content ideas? Contact us at: