Security in.NET. Objectives Security in.NET Basic concepts - permissions Using and Managing permissions Cryprography in.NET Administer.NET Security.

Slides:



Advertisements
Similar presentations
Security for Developers Code Access Security Steven Borg & Richard Hundhausen Accentient, Inc.
Advertisements

© 2003 School of Computing, University of Leeds SY32 Secure Computing, Lecture 17 Secure Coding in Java and.NET Part 2: Code Access Control.
.NET Framework Application Security Overview
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
Java Security. Overview Hermetically Sealed vs. Networked Executable Content (Web Pages & ) Java Security on the Browser Java Security in the Enterprise.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
Cryptography and Authentication Lab ECE4112 Group4 Joel Davis Scott Allen Quinn.
Environmental Council of States Network Authentication and Authorization Services The Shared Security Component February 28, 2005.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
16.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
Java Security Model Lab#1 I. Omaima Al-Matrafi. Safety features built into the JVM Type-safe reference casting Structured memory access (no pointer arithmetic)
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 2008.
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Security in.NET Jørgen Thyme Microsoft Denmark. Topics & non-topics  Cryptography  App domains  Impersonation / delegation  Authentication  Authorization.
Code Access Security vs. Role-Based Security  RBS  Security identity attached to user accounts  Access to resources specified according to user’s group.
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Spring 2003CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
ASP.Net Security: Fundamentals Chapters 1-4 Freeman and Jones Book.
Understanding Security Lesson 6. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding the System.Security Namespace Understand the.
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
.NET Code security including 4.0 & Tools Jon C. Arce
Module 15 Configuring and Deploying Windows Client Applications.
D ATABASE S ECURITY Proposed by Abdulrahman Aldekhelallah University of Scranton – CS521 Spring2015.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
.Net Security and Performance -has security slowed down the application By Krishnan Ganesh Madras.
©Copyrights 2011 Eom, Hyeonsang All Rights Reserved Distributed Information Processing 20 th Lecture Eom, Hyeonsang ( 엄현상 ) Department of Computer Science.
Author: Bill Buchanan. Work Schedule Author: Bill Buchanan.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
ASSEMBLIES AND THE GAC CHAPTER 1, LESSONS 4-7 & LAB.
Sagar Joshi Senior Security Consultant | ACE Team, Microsoft Information Security
Java Security Pingping Ma Nov 2 nd, Overview Platform Security Cryptography Authentication and Access Control Public Key Infrastructure (PKI)
.NET Framework Danish Sami UG Lead.NetFoundry
Basic Security: Java vs.NET Master Seminar Advanced Software Engineering Topics Prof. Jacques Pasquier-Rocha Software Engineering Group Department of Informatics.
Java Security Nathan Moore CS 665. Overview Survey of Java Inherent Security Properties Java Runtime Environment Java Virtual Machine Java Security Model.
.Net Security and performance
Securing Your ASP.NET Application Presented by: Rob Bagby Developer Evangelist Microsoft ( )
SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.
Code Access Security CS 795. Terminology--CLR Common Language Runtime: –The.NET Framework provides a runtime environment which runs the code and provides.
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
1. 2 Overview In Exchange security is managed by assigning permissions in Active Directory Exchange objects are secured with DACL and ACEs Permissions.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
Presented By: Ahmed ALSUM PhD Student CS 895:.Net Security Old Dominion University College of Science Department of Computer Science.
Windows Role-Based Access Control Longhorn Update
.NET Security and MSIL Tom Roeder CS fa. MSIL Common intermediate language really CIL in ECMA standard MSIL is common name Very close to C# (and.
System.Security.Permissions namespace By Venkata Krishna Date: Instructor 06/19/2007 Dr. Ravi Mukkamala.
DEV240 Fundamentals of Code Access Security Sebastian Lange Program Manager Common Language Runtime Microsoft Corporation.
1.Net Framework.Net Framework.NET Architecture and Security By Prasad Sundararajan Jan
Understanding Security
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
Understanding.NET Framework Security David LeBlanc Microsoft Office.
4.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 12: Implementing Security.
Customizing.NET Security Permissions Nageswari Vallabhaneni.
Chapter 7. Permissions Programming.Net Security, O’Reilly Publishers.
Active X and Signed Applets Chad Bollard. Overview ActiveX  Security Features  Hidden Problems Signed Applets  Security Features  Security Problems.
ClickOnce Deployment (One-click Deployment)
Security Outline Encryption Algorithms Authentication Protocols
Subha Desikan CSE775 – Distributed Objects Spring 2003
.NET Security and MSIL Tom Roeder CS fa.
Jim Fawcett CSE775 – Distributed Objects Spring 2005
Jim Fawcett CSE686 – Internet Programming Summer 2005
Security mechanisms and vulnerabilities in .NET
Security & .NET 12/1/2018.
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

Security in.NET

Objectives Security in.NET Basic concepts - permissions Using and Managing permissions Cryprography in.NET Administer.NET Security

Contents Section 1: Overview Section 2: Core Concepts Section 3: Permissions Section 4: Security Administration Section 5: Cryptography Support Summary

Section 1: Overview Looking back....NET security core concepts

Object based security models Securing in distributed applications User identification and authentication Data integrity and privacy User authorization Security must be administrable User wants to access securable objects Access token and security descriptors

client/user Looking back... Security mechanisms Different solutions for different issues Samples: Identification and authentication: Operating system account Authorization: Active Directory – a security database Encryption: HTTPS (HTTP over SSL) DCOM, CORBA, and TPMs Client/user Middle tierServer Client process Service/ component Server process

What’s wrong with that? Trust all or nothing at all TPMs are difficult to administer „Luring attacks“

Section 2: Core Concepts Kinds of Security Permissions, Policies, and Roles Common Language Runtime Code Groups Stack Walking

Kinds of Security Code access security Protection against malicious mobile code Role-based security Principals User authorization Security model is based on permissions Heavily based on Common Language Runtime

.NET Framework Common Language Runtime Class LoaderJIT compiler System Services Services Framework ASP.NETWindows Forms...

Application Domain Host Host sets up Application Domain and loads assembly Trusted host and evidence Different hosts Shell Browser Server Custom-designed

Evidence Information about the code Who published the Code Where did the Code come from Samples of types of evidence Signature Publisher of the code Strong name URL and Site of origin

Permissions, Policies, and Roles Permissions Access code to restricted areas Objects to control restrictions on managed code Security policy Rules, that the runtime must follow to check permissions Roles and the principal Named set of users Principals

Code Group Hierarchy 1 All Code 1.1 Publisher: Microsoft 1.2 Zone: Internet 1.3 Zone: Local Intranet 1.4 Site: newtelligence.com Site: LocalWeb Name: MS Money Publisher: newtelligence Site: LocalWeb PS

Code Inspection and Stack Walking Security check Varying levels of trust Assembly A1 Assembly A2 Assembly A3 Assembly A4 G1 G4 G3 G2 P P P Call chain

Security Namespace System.Security.Policy Classes to deal with permissions System.Security.Permissions Classes to control access to operations and resources System.Security.Principal Object acts on behalf of the caller System.Security.Cryptography Cryptographic services

Declarative Security... with attributes Specifying security at assembly, class or member level Security at lower level overrides higher level Syntax SecurityAttribute class SecurityAction enumeration C# sample: security demands using System.Security.Permissions; [FileIOPermissionAttribute( SecurityAction.Demand)]

Manifest Security and the Manifest List of filesHash value Loader Generate new hash values compare

Imperative Security... with explicit code Create a permission object and call its methods Scope of protection is the method Permission-based judgements made at run time Sample: security demands using System.Security.Permissions; FileIOPermission myPerm = new FileIOPermission(...); myPerm.Demand();

Section 3: Permissions Permissions Different kinds of permissions Using permissions Managing permissions

Kinds of Permissions Permission and permission set XML representation of permissions Code access permissions Protect resources and operations Identity permissions Characteristics of an assembly‘s identity Role-based permissions Discover a user‘s role or identity Custom permissions Design and implement your own permissions

Managing Permissions: Policies Policy levels Enterprise, machine, user, application domain enterprise user machine appdomain Resulting permission set

Permission Namespace System.Object System.ValueTypeSystem.Attribute System.Security. CodeAccessPermission RegistryPermission FileIOPermission... RegistryPermissionAccess FileIOPermissionAccess... System.Enum RegistryPermissionAttribute FileIOPermissionAttribute... SecurityAttribute CodeAccess SecurityAttribute

Requesting Permissions Provide security related information to the runtime Used to check permissions Place attributes in your code Compiler stores the request in the metadata Don‘t ask for more than you need... Minimum Optional Refused Code cannot assign rights to itself

Demanding Permissions Enforce restrictions on calling code Ask the runtime to check permissions Secure either methods or complete code blocks Declaratively or imperatively Guidelines Check identity when giving additional access To restrict object creation secure its constructor

Granting Permissions Runtime Host Application domain Evidence Assembly Loader Permission set Travers code group for relevant policy level The runtime grants permissions To application domains and assemblies Based on identity, requested permissions, and trust

Overriding Code Access Permissions Override the outcome of the stack walk security check Assert Specify permissions that should not be checked Security hole Deny Explicitly deny permissions If one caller in call chain fails, all will fail PermitOnly Specify a certain resource that can be accessed

Code Access Permissions 1/3 Protect Resources and operations SecurityPermission class SocketPermission class WebPermission class PrintingPermissions User Interface Access UIPermission class Secure windows prevent spoofing Prevent code to steal from clipboard

Code Access Permissions 2/3 Access and modify environment, registry, and metadata EnvironmentPermission RegistryPermission ReflectionPermission DNSPermission EventLogPermission ServiceControllerPermission Protect files and directories FileIOPermission FileDialogPermission

Code Access Permissions 3/3 Protect Data DirectoryServicesPermission IsolatedStoragePermission IsolatedStorageFilePermission OleDbPermission SqlClientPermission MessageQueuePermission PerformanceCounterPermission

Identity Permissions Identity of an assembly Relevant classes PublisherIdentityPermission SiteIdentityPermission StrongNameIdentityPermission ZoneIdentityPermission URLIdentityPermission

Role-based Permissions Principals Generic: unauthenticated users and roles Windows: Windows users/accounts Custom: principals defined by application PrincipalPermission Class Perform checks against active principal Authentication and authorization

Custom Permissions System.Security.Permissions namespace Consider thoroughly – overlapping and redundancy Code access permissions Design Which resource is to be protected? How‘s the granulation of access? Implement IPermission interface Demand Update the policy

Type Safe Code and Trust No memory access to the „neighbour‘s“ private fields Isolated assemblies Compiler checks if code is type-safe Not all language compilers can generate type-safe code JIT compiler verifies type-safety If code is not type-safe the code is not trustworthy Not type-safe code may call unmanaged code And perform malicious operations

Wrapping Unmanaged Code Calling unmanaged code is risky Direct calls into unmanaged code can bypass security Use managed wrapper classes Enforce security restrictions Such classes are different from CCW and RCW Secure class libraries Security demands Check each call to resources exposed by the library „Code access security does not eliminate the possibility of human error in writing code“

Integration with COM+ Security Role-based security is not role-based security.NET Framework vs. COM+ security Managed code can use COM+ security Only on Windows 2000 systems Not from pure.NET apps Extend existing COM+ applications with.NET security

Section 4: Security Administration Security Tools Managing Policies and Roles Integration with Windows 2000 and COM+

Security Tools Managing certificates Cert2spc.exe, Certmgr.exe, or Makecert.exe Managing assemblies Sn.exe Shared Name utility GACUtil.exe Global Assembly Cache utility PermView.exe View permissons requested by an assembly

Managing Permissions and Policies Code Access Security Policy Commandline Utility Caspol.exe Configure machine and user policy Adding, modifying, and deleting Code groups Permissions and permission sets Samples: caspol –list caspol –machine –addfulltrust myPerm.exe caspol –machine –ag 1.1 –zone Internet execution

mscorcfg.msc Graphical User Interface Microsoft Management Console Snap-In Manage Security Policies Modify code groups and permission (sets) On enterprise, machine, and user level

Sample Creating named permission sets Create an XML representation Permission set = permission + name + description Associate permission set and code group(s) Modifying security policy Built-in named permission sets Nothing, Internet, Everything,... Custom permissions

Managing Roles Identities and principals Integration with Windows 2000 Principals may map to OS accounts Packages

Section 5: Cryptography Support Hashing Encryption Digital signatures

Cryptographic services - Basics Stream oriented design Symmetric algorithms One operation for periodical data input Work with single secret key Sample: hashing Asymmetric algorithms Fixed buffer Public/private key pair Sample: digital signatures Cryptographic Service Provider (CSP)

Signatures and Random numbers DSA, DSACryptoServiceProvider Digital Signature Algorithm Public-key algorithm RSA, RSACryptoServiceProvider Rivest, Shamir, and Adleman Popular public-key algorithm and de facto standard RandomNumberGenerator, RNGCryptoServiceProvider Random number generator

Hash and Cryptography Algorithms MD5, MD5CryptoServiceProvider Message Digest, produces 128-bit hash SHA1Managed Secure Hash Algorithm, produces 160-bit hash DES, CryptoServiceProvider Data Encryption Standard, world-wide standard RC2, RC2CryptoServiceProvider Rivest Cipher, block cipher TripleDES, TripleDESCryptoServiceProvider Triple DES encryption with one (1) key

Summary Powerful security system Flexible Administrable Fine-grained control on security A number of classes and security tools Different security solutions Rich set of cryptography services

Questions?