Introduction to Evidence-based security in.net Framework



Similar documents
Code Access Security newtelligence AG. Revision: Michael Willers

MS Enterprise Library 5.0 (Logging Application Block)

C#5.0 IN A NUTSHELL. Joseph O'REILLY. Albahari and Ben Albahari. Fifth Edition. Tokyo. Sebastopol. Beijing. Cambridge. Koln.

Security challenges for internet technologies on mobile devices

70-536VB:.NET Framework Application Development Foundation Course Introduction

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

Homeland Security Red Teaming

Internet Information TE Services 5.0. Training Division, NIC New Delhi

Mod 2: User Management

Installing GFI Network Server Monitor

EC-Council E C S P.NET. EC-Council. EC-Council Certified Secure Programmer (.NET)

Hardening Security in ASP.NET Applications & Services. Rick G. Garibay

Setup and configuration for Intelicode. SQL Server Express

Password Reset Server Installation Guide Windows 8 / 8.1 Windows Server 2012 / R2

Security Guide. BlackBerry Enterprise Service 12. for ios, Android, and Windows Phone. Version 12.0

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

NTP Software File Auditor for Windows Edition

Authoring for System Center 2012 Operations Manager

Thomas Röthlisberger IT Security Analyst

BlackBerry Enterprise Service 10. Secure Work Space for ios and Android Version: Security Note

Setup Guide Access Manager 3.2 SP3

1 (11) Paperiton DMS Document Management System System Requirements Release: 2012/

NovaBACKUP xsp Version 15.0 Upgrade Guide

VERALAB LDAP Configuration Guide

ClickOnce Security. ClickOnce Security Overview. of different aspects with respect to security. You need to consider

Test Case 3 Active Directory Integration

BACKUP & RESTORE (FILE SYSTEM)

Security Overview for Windows Vista. Bob McCoy, MCSE, CISSP/ISSAP Technical Account Manager Microsoft Corporation

Interworks. Interworks Cloud Platform Installation Guide

Download and Installation of MS SQL Server

Configuration Guide. BlackBerry Enterprise Service 12. Version 12.0

Data Breaches and Web Servers: The Giant Sucking Sound

User Migration Tool. Note. Staging Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted Release 9.0(1) 1

Bypassing Browser Memory Protections in Windows Vista

SOFTWARE INSTALLATION INSTRUCTIONS CLIENT/SERVER EDITION AND WEB COMPONENT VERSION 10

Vector HelpDesk - Administrator s Guide

Creating and Deploying Active Directory Rights Management Services Templates Step-by-Step Guide

TIBCO Spotfire Platform IT Brief

Field Description Example. IP address of your DNS server. It is used to resolve fully qualified domain names

AWS Directory Service. Simple AD Administration Guide Version 1.0

CA Unified Infrastructure Management

SCADA Security. Enabling Integrated Windows Authentication For CitectSCADA Web Client. Applies To: CitectSCADA 6.xx and 7.xx VijeoCitect 6.xx and 7.

JAAS Java Authentication and Authorization Services

Setup Corporate (Microsoft Exchange) . This tutorial will walk you through the steps of setting up your corporate account.

Windows Server 2003 default services

elearning for Secure Application Development

Single Sign-on (SSO) technologies for the Domino Web Server

Redpaper Axel Buecker Kenny Chow Jenny Wong

Secret Server Qualys Integration Guide

Copyright: WhosOnLocation Limited

1 Mobile Device Management

TO HACK AN ASP.NET WEBSITE?

KAIST Cyber Security Research Center SAR(Security Analysis Report) Date. August 31, Modified


Installing, Configuring, and Managing a Microsoft Active Directory

Creating and Managing Shared Folders

Application Notes for Microsoft Office Communicator Clients with Avaya Communication Manager Phones - Issue 1.1

Embedded Document Accounting Solution (edas) for Cost Recovery. Administrator's Guide

Adam Rauch Partner, LabKey Software Extending LabKey Server Part 1: Retrieving and Presenting Data

Advanced Event Viewer Manual

How to Time Stamp PDF and Microsoft Office 2010/2013 Documents with the Time Stamp Server

The safer, easier way to help you pass any IT exams. Exam : Designing and Implementing a Server Infrastructure.

Comparing SQL Server 2005 and IBM DB2 v8.2 as a Database Platform for Visual Studio and.net Developers

Installing Windows Rights Management Services with Service Pack 2 Step-by- Step Guide

How to Configure a Stress Test Project for Microsoft Office SharePoint Server 2007 using Visual Studio Team Suite 2008.

SharePoint 2010 Interview Questions-Architect

The Win32 Network Management APIs

Web Sites, Virtual Machines, Service Management Portal and Service Management API Beta Installation Guide

Only LDAP-synchronized users can access SAML SSO-enabled web applications. Local end users and applications users cannot access them.

Using etoken for Securing s Using Outlook and Outlook Express

Blackbaud NetCommunity Configuration Overview

The Trusted Technology Partner in Business Innovation PASSION DISCIPLINE INNOVATION TEAMING INTEGRITY

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Outlook Profiler 2.5 Series Instruction Manual

Centralized Oracle Database Authentication and Authorization in a Directory

SolarWinds Technical Reference

ALTIRIS Software Delivery Solution for Windows 6.1 SP3 Product Guide

LabVIEW Advanced Programming Techniques

Configuring Single Sign-On from the VMware Identity Manager Service to Office 365

Team Foundation Server 2012 Installation Guide

Samsung KNOX EMM Authentication Services. SDK Quick Start Guide

OWASP and OWASP Top 10 (2007 Update) OWASP. The OWASP Foundation. Dave Wichers. The OWASP Foundation. OWASP Conferences Chair

Installation Manual v2.0.0

Mixed Authentication Setup

Agenda. How to configure

BlackBerry Enterprise Server Resource Kit

Installation and Configuration Guide

Host Access Management and Security Server

Put a Firewall in Your JVM Securing Java Applications!

ITDUMPS QUESTION & ANSWER. Accurate study guides, High passing rate! IT dumps provides update free of charge in one year!

Perceptive Content Security

by New Media Solutions 37 Walnut Street Wellesley, MA p f Avitage IT Infrastructure Security Document

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

Team Foundation Server 2010, Visual Studio Ultimate 2010, Team Build 2010, & Lab Management Beta 2 Installation Guide

HOWTO: Installation of Microsoft Office SharePoint Server 2007

McAfee VirusScan and epolicy Orchestrator Administration Course

File Share Navigator Online 1

Using CertAgent to Obtain Domain Controller and Smart Card Logon Certificates for Active Directory Authentication

Transcription:

Introduction to Evidence-based security in.net Framework Brad Merrill rogram Manager.NET Frameworks Integration Agenda The roblem: Customer Scenarios The Solution:.NET Security Role-based Security Evidence-based Security Demos 3 Introduction to Security in.net framework 1

Defining the roblem: Customer Scenarios Scenario #1 Active Content Word Macro (In-process) E-Mail attachment (Out-of-process) Doc. Word E-Mail message Outlook New rocess 3 Introduction to Security in.net framework 2

Scenario #2 App Extensibility SQL server: UDFs (user defined functions) SQL rocess SQL Code UDF code X Unsafe components in SQL Environment Safe shared components Scenario #3 Controlled Sharing Signed by My Corp. Hostile App MyApp1 MyApp2 X MyShared Component 3 Introduction to Security in.net framework 3

Scenario #4 Rich Web Apps Rich control in web browser Web Server IE rocess Transmit data IE Window Web Script Chart Ctrl? Local Disk Scenario #5 Off-Line Application Shop.com Offline copy of catalog + App code HTT Off-line browse/shop IE Local Disk 3 Introduction to Security in.net framework 4

Scenario #6 Web Hosting Service provider hosting 3 rd party apps Web Server Thread ool Applications 1 2 3 Shared Components System Resources The Solution:.NET Security 3 Introduction to Security in.net framework 5

Background.NET Security model is a combination of 2 elements Role-based security Evidence-based security Role-based Security 3 Introduction to Security in.net framework 6

Common Terms Role-based Security Making Authorization decisions based on the identity and/or role(s) of the entity on whose behalf an application is executing. Identity Distinguishing characteristic of the entity on whose behalf an application is executing. Commonly a user or account name. rincipal The encapsulation of Identity and role information everything you need to know about an entity in order to make Authorization decisions. Role-based Security Infrastructure The CLR provides an infrastructure for managing identity and role information. A Host authenticates the user and provides the identity and role information to the CLR The CLR makes that information available to code via AIs and permission demands (both imperative and declarative) Example: AS.NET 3 Introduction to Security in.net framework 7

Using the Role-based AIs Example: checking a user s NT group membership Must specify Windows authentication (requires Securityermission) rincipal is accessed from the Thread object public bool IsAdministrator() { //Default principal is unauthenticated //We must tell the system we want to use Windows auth AppDomain.CurrentDomain.Setrincipalolicy (rincipalolicy.windowsrincipal); } Windowsrincipal user = Thread.Currentrincipal as Windowsrincipal; return user.isinrole("administrators"); C# Using the rincipal permission Example: a declarative demand to ensure the user is in the Administrator group Must specify Windows authentication (requires Securityermission) Like demands for other permissions, a principal permission demand will throw an exception if it fails Name, Role, or both can be supplied as named parameters [rincipalermission (SecurityAction.Demand, Role="Administrators")] public void rotectedmethod() { //does some operation reserved for Administrators } C# 3 Introduction to Security in.net framework 8

Considerations Lazy authentication: we don t createa principal object until you ask for it. The role-based security functionality in the CLR does not replace COM+ 1.0 Services security. If your application contains both managed and unmanaged (COM) components, consider using COM+ 1.0 Services role-based security via the managed wrappers. If your application is entirely managed, CLR role-based security may be just what you need. Common Terms Authentication Determining the identity of the party/entity making a request. User authentication is generally by means of name/password verification. Code authentication can be done by collecting evidence about the code: location of origin, digital signature, hash, etc. Authorization Determining whether to honor a request made by an identified party/entity. User authorization is generally done by business logic or by the system (NTFS access control lists, IIS security settings, etc.) Code authorization is achieved via policy analyzing evidence in order to grant appropriate permissions. 3 Introduction to Security in.net framework 9

Evidence-based Security Evidence-Based Security ermissions Objects that represent specific authorizations olicy Determines what code is permitted to do: set of permissions to grant to an assembly Evidence Inputs to policy about code, from multiple sources All three are fully extensible 3 Introduction to Security in.net framework 10

ermissions A permission object represents a specific authorization, such as access to a resource permission to do something A permission grant is an authorization given to an assembly (code) this code is authorized to do something A permission demand is a security check for corresponding grants is something allowed? (else, raise exception) Standard.NET permissions ermissions for Framework resources These permissions represent access to protected resources. Data Environment Variables File IO Message Queue Reflection Socket Directory Services DNS Event Log File Dialog Web Isolated Storage erformance rinting Counters Registry Security System UI (Italicized permission are Beta 2) 3 Introduction to Security in.net framework 11

Standard.NET permissions Identity permissions These permissions represent code identity. They are granted to code based on its corresponding evidence. ublisher Site Strong Name URL Zone Other permissions A user identity permission is also supported. This is the only non-code access permission in the Framework. rincipal (User Identity/Role) Code Access Security Most permissions are code access permissions Demanding a permission performs a stack walk checking for related grants of all callers Support dynamic stack modifiers Two ways to make checks: Imperatively (method implementation) Declaratively (method metadata) 3 Introduction to Security in.net framework 12

Normal application code view of security enforcement Most applications get security enforcement simply by calling the class libraries try { Environment.GetEnvironmentVariable ("USERNAME") ; } catch ( SecurityException se ) { Console.WriteLine ("SECURITY EXCETION:" + se.tostring()) ; } C# Stack Walk Behavior Each assembly has a set of corresponding grants Call Stack Grows Down Assembly A1 G1 Assembly A2 G2 Assembly A3 G3 Method in Assembly A4 demands a permission Assembly A4 G4 is compared with grants of all callers on the stack above A4 3 Introduction to Security in.net framework 13

Stack Walk Modifiers Modifiers provide fine-grained, dynamic control over state of grants on the stack Assertion I vouch for my callers; checks for perm can stop at this frame Example: Gatekeeper classes Managed wrappers for unmanaged resources Demand appropriate permission from caller Assert permission to call unmanaged code Make the unmanaged call Imperative Security Checks Example: the File object constructor Requires read access to the corresponding file C# public File(String filename) { // Must fully qualify the path for the security check String fullath = Directory.GetFullathInternal(fileName); new FileIOermission(FileIOermissionAccess.Read, fullath).demand(); //[ read the specified file at behest of caller(s) ] } 3 Introduction to Security in.net framework 14

Declarative Security Checks Declarative security is art of a method s metadata Implemented with custom attributes rocessed by JIT [FileIOermission(SecurityAction.Demand, Read = c:\\temp )] public void foo() { // class does something with c:\temp } C# Controlling access to code Identity permissions allow the same security checks on identity of code Digital signature, location (URL, site), etc. Declarative security checks by JIT instead of (most costly) runtime checks LinkDemand: code reference by a caller InheritanceDemand: subclass/overriding Combination provides a tool for developers to control who uses code 3 Introduction to Security in.net framework 15

Controlling access to code (cont.) Example: controlling access with a Strong Name identity link demand. Ensures that the immediate caller is signed with the given key and has the correct name and version. [StrongNameIdentityermissionAttribute (SecurityAction.LinkDemand, ublickey="00240000048000009400000006020000 ", Name= MyApp", Version="0.0.0.0")] // Only MyApp can use this class public class MyClass { } C# Controlling access to code (cont.) Example: calling code that is restricted by a Strong Name check. Calling code must be signed with the private key corresponding to the public key used in the previous example. [assembly: AssemblyKeyFileAttribute ("keypair.dat")] [assembly: AssemblyVersionAttribute ("0.0.0.0")] public class MyApp { } C# 3 Introduction to Security in.net framework 16

olicy olicy is the process of determining the permissions to grant to code ermissions granted to code, not user Grants are on a per-assembly basis Multiple levels of policy Machine-wide, User-specific Enterprise support: Group olicy (Beta 2) Further policy restrictions allowed on a perapplication domain basis Inside policy A policy level is a collection of code groups Code has identity in the runtime, just like users have identity in Windows NT ermissions are associated with each code group Evidence determines group membership In the group, get granted the related permissions All Code ublisher: Microsoft Zone: Internet Zone: Local Intranet Site: XYZ.COM Strong Name: MS.Office Strong Name: MS.Money ublisher: Corp. Admin Site: localweb 3 Introduction to Security in.net framework 17

Sample olicy Level Example: MS.Money on Local Intranet Member of four groups (highlighted) Granted permissions = 1 2 7 4 All Code 1 ublisher: Microsoft 2 Zone: Internet 3 Zone: Local Intranet 4 Site: XYZ.COM 5 Strong Name: MS.Office 6 Strong Name: MS.Money 7 ublisher: Corp. Admin 8 Site: infoweb 9 Default policy (Beta 2) Local Computer Zone Unrestricted Intranet Zone Read environment variables (limited), UI, IsolatedStorage, Assertion, Web access to same site, File read to same UNC directory Internet Zone Safe UI, IsolatedStorage, Web access to same site Restricted Zone No authorizations, can t run MS Strong Name (Frameworks Classes) Unrestricted 3 Introduction to Security in.net framework 18

Evidence Evidence is the input to policy Example: Info about a code assembly Shared names ublisher identity cryptographically }strong Location of origin (URL, zone, site) Evidence is completely extensible Any object can be a piece of evidence Only impacts grants if there is a code group membership condition that cares about it! Host Control of olicy Hosts can influence policy Hosts specify implicitly trusted evidence Custom membership conditions can interface with other authorization systems Example: AS.NET/IS application hosting Semi-trusted hosting cannot provide evidence Hosts can limit policy for application domains they create Example: SQL Server user-defined assemblies 3 Introduction to Security in.net framework 19

Assembly Input To olicy Assemblies can request permissions Three types of request: Minimal, Optional, Refuse If policy does not grant everything in the Minimal set, assembly fails to load Assembly is granted: (MaxAllowed (Minimal Optional)) Refused Assemblies can carry evidence, too Assembly evidence is initially untrusted olicy evaluates assembly evidence and decides whether to use it Example: third-party certifications Sample ermission Request Request (minimum,optional,refused) If none, code gets maximum policy gives [assembly:uiermissionattribute (SecurityAction.RequestMinimum, Window=UIermissionWindow.SafeSubWindows)] C# [assembly:fileioermissionattribute (SecurityAction.RequestOptional,All="C:\\")] [assembly:securityermissionattribute (SecurityAction.RequestRefused,UnmanagedCode=true)] 3 Introduction to Security in.net framework 20

Run-time Security Trusted Host Code Component 3 IL JIT/Verify Evidence + Component 1 Component 2 Component 3 G1 G2 G3 Typesafe? Inheritance, LinkDemand? erm Request Sec. olicy = olicy to Apply olicy Mgr Summary 3 Introduction to Security in.net framework 21

Great Customer Experience End-user Managed apps just run, consistent experience for scripts, exes, controls Safe defaults, no runtime trust decisions for users Administrator All settings in one place, easy to customize Understandable policy model (need Beta feedback) Security administration tool coming in Beta 2 Developer Can focus on app logic, security comes for free But, easy to use and extend when necessary (i.e., protecting a new shared resource) Minimizing Security Flaws Typesafe code Managed code verified for typesafety at runtime Eliminates most common security problems Buffer overrun attacks Reading private state or uninitialized memory Access arbitrary memory in process space Transfer execution to arbitrary location in process Developers can use least privilege Code access security blocks most luring attacks 3 Introduction to Security in.net framework 22

Questions? 3 Introduction to Security in.net framework 23