SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.

Slides:



Advertisements
Similar presentations
© 2003 School of Computing, University of Leeds SY32 Secure Computing, Lecture 17 Secure Coding in Java and.NET Part 2: Code Access Control.
Advertisements

.NET Framework Application Security Overview
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Authenticating Users in an ASP.NET Application. Web Site Administration Tool From VS 2008, click Website/ ASP.Net Configuration to open Web Site Administration.
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.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Chapter 13 – Site Security. Internet Information Server ASP.NET Applications.NET Framework Windows NT/2000 Operating System Forms Passport Windows Certificates.
Access Control in IIS 6.0 Windows 2003 Server Prepared by- Shamima Rahman School of Science and Computer Engineering University of Houston - Clear Lake.
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
Understanding Security Lesson 6. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding the System.Security Namespace Understand the.
Hands-On Microsoft Windows Server 2008 Chapter 8 Managing Windows Server 2008 Network Services.
.NET Code security including 4.0 & Tools Jon C. Arce
Module 15 Configuring and Deploying Windows Client Applications.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. ASP.NET Authentication.
1 ASP.NET SECURITY Presenter: Van Nguyen. 2 Introduction Security is an integral part of any Web-based application. Understanding ASP.NET security will.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
Test Review. What is the main advantage to using shadow copies?
Working with Workgroups and Domains
Session 11: Security with ASP.NET
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Module 10: Configuring Windows XP Professional to Operate in Microsoft Networks.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Securing a Microsoft ASP.NET Web Application.
1 Web services and security ---discuss different ways to enforce security Presenter: Han, Xue.
ArcGIS Server and Portal for ArcGIS An Introduction to Security
Security in.NET. Objectives Security in.NET Basic concepts - permissions Using and Managing permissions Cryprography in.NET Administer.NET Security.
Chapter 9: SHARING FILE SYSTEM RESOURCES1 CHAPTER OVERVIEW  Create and manage file system shares and work with share permissions.  Use NTFS file system.
.Net Security and performance
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
The.NET Runtime and IIS Presented by Chris Dickey – cdickey.net consulting
Code Access Security CS 795. Terminology--CLR Common Language Runtime: –The.NET Framework provides a runtime environment which runs the code and provides.
Module 11: Securing a Microsoft ASP.NET Web Application.
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
Module 14: Securing Windows Server Overview Introduction to Securing Servers Implementing Core Server Security Hardening Servers Microsoft Baseline.
CS795.Net Impersonation… why & How? Presented by: Vijay Reddy Mara.
Presented By: Ahmed ALSUM PhD Student CS 895:.Net Security Old Dominion University College of Science Department of Computer Science.
Working with Users and Groups Lesson 5. Skills Matrix Technology SkillObjective DomainObjective # Introducing User Account Control Configure and troubleshoot.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
GUDURU PRAVEEN REDDY.NET IMPERSONATION. Contents Introduction Impersonation Enabled Impersonation Disabled Impersonation Class Libraries Impersonation.
System.Security.Permissions namespace By Venkata Krishna Date: Instructor 06/19/2007 Dr. Ravi Mukkamala.
IIS and.Net security -Vasudha Bhat. What is IIS? Why do we need IIS? Internet Information Services (IIS) is a Web server, its primary job is to accept.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Creating and Managing Digital Certificates Chapter Eleven.
Impersonation Bharat Kadia CS-795. What is Impersonation ? Dictionary-: To assume the character or appearance of someone ASP.NET-: Impersonation is the.
Security E-Learning Chapter 08. Security Control access to your web site –3 Techinques for Identifying users Giving users access to your site Securing.
Working with Users and Groups Lesson 5. Skills Matrix Technology SkillObjective DomainObjective # Introducing User Account Control Configure and troubleshoot.
Configuring and Deploying Web Applications Lesson 7.
Understanding Security
System.Security.policy Namespace By: Marepalli Gayathri.
Windows Security -- Archana Galipalli. Agenda  Windows Security  Windows Security and CLR  Implementing Windows Security for IIS  Configuring Security.
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.
Business Objects XIr2 Windows NT Authentication Single Sign-on 18 August 2006.
19 Copyright © 2008, Oracle. All rights reserved. Security.
ClickOnce Deployment (One-click Deployment)
Subha Desikan CSE775 – Distributed Objects Spring 2003
Security mechanisms and vulnerabilities in .NET
IIS.
Created by : Asst. Prof. Ashish Shah
Configuring Internet-related services
Module 8: Implementing Group Policy
Designing IIS Security (IIS – Internet Information Service)
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

SECURITY ISSUES

Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code access security and role-based security –Applies to Web services, Windows apps, Windows services, remoting applications The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code access security and role-based security –Applies to Web services, Windows apps, Windows services, remoting applications

Configuring Security Broadly speaking,.NET security is divided into two separate areas: –Code access security – manages the security of the code itself –Role-based security – manages the user rather than the code Broadly speaking,.NET security is divided into two separate areas: –Code access security – manages the security of the code itself –Role-based security – manages the user rather than the code

Understanding Code Access Security Controls what the code can do on your computer, regardless of where it comes from Centers on permissions to use resources Controls what the code can do on your computer, regardless of where it comes from Centers on permissions to use resources

Concepts Involved in Code Access Security Permissions Code groups Permission sets Permissions Code groups Permission sets

Understanding Permissions Based on specific permissions granted by the CLR E.g. code that wishes to write to the Windows Registry requires RegistryPermission permission Based on specific permissions granted by the CLR E.g. code that wishes to write to the Windows Registry requires RegistryPermission permission

Types of Permission Requests Code can make permission requests: –Minimum permissions that it requires to run –Optional permissions –Refuse permissions – ensures it does not have access to particular resources –Demand permissions of the CLR Code can make permission requests: –Minimum permissions that it requires to run –Optional permissions –Refuse permissions – ensures it does not have access to particular resources –Demand permissions of the CLR

Granting Permissions The CLR decides whether a particular permission should be granted If a module is unable to obtain the minimum permissions it needs, the code does not execute The computer’s security settings determine the maximum permissions to be granted The CLR decides whether a particular permission should be granted If a module is unable to obtain the minimum permissions it needs, the code does not execute The computer’s security settings determine the maximum permissions to be granted

Types of Permissions Code access permissions – access to protected resources Identity permissions – based on credentials that are part of the code itself Role-based permissions – based on the user who will run the code Code access permissions – access to protected resources Identity permissions – based on credentials that are part of the code itself Role-based permissions – based on the user who will run the code

Code Access Permissions in the.NET Framework DirectoryServicePermission DnsPermission EnvironmentPermission EventLogPermission FileDialogPermission DirectoryServicePermission DnsPermission EnvironmentPermission EventLogPermission FileDialogPermission

Code Access Permissions in the.NET Framework (cont’d) FileIOPermission IsolatedStorageFilePermission IsolatedFilePermission MessageQueuePermission OleDBPermission FileIOPermission IsolatedStorageFilePermission IsolatedFilePermission MessageQueuePermission OleDBPermission

Code Access Permissions in the.NET Framework (cont’d) PerformanceCounterPermission PrintingPermission ReflectionPermission RegistryPermission SecurityPermission PerformanceCounterPermission PrintingPermission ReflectionPermission RegistryPermission SecurityPermission

Code Access Permissions in the.NET Framework (cont’d) ServiceControllerPermission SocketPermission SqlClientPermission UIPermission WebPermission ServiceControllerPermission SocketPermission SqlClientPermission UIPermission WebPermission

Code Groups A code group is a set of assemblies that share a security context You define a code group by specifying the membership condition for the group The.NET Framework supports seven different membership conditions for code groups A code group is a set of assemblies that share a security context You define a code group by specifying the membership condition for the group The.NET Framework supports seven different membership conditions for code groups

Membership Conditions Application directory –Selects all code in the installation directory of the running application Cryptographic hash –Selects all code that matches a specific cryptographic hash. Effectively limits code group to a single assembly Application directory –Selects all code in the installation directory of the running application Cryptographic hash –Selects all code that matches a specific cryptographic hash. Effectively limits code group to a single assembly

Membership Conditions (cont’d) Software publisher –Selects all code from a specified publisher, verified by Authenticode signing Site –Selects all code from a particular Internet domain Software publisher –Selects all code from a specified publisher, verified by Authenticode signing Site –Selects all code from a particular Internet domain

Membership Conditions (cont’d) Strong name –Selects all code with a specific strong name URL –Selects all code from a specific URL Strong name –Selects all code with a specific strong name URL –Selects all code from a specific URL

Membership Conditions (cont’d) Zone –Selects all code from a specified security zone: InternetLocal intranet Trusted sitesMy Computer Untrusted sites Zone –Selects all code from a specified security zone: InternetLocal intranet Trusted sitesMy Computer Untrusted sites

Permission Sets A set of one or more code access permissions that are granted as a unit To grant a single permission, create a permission set with only 1 permission The.NET Framework supplies seven built-in permission sets A set of one or more code access permissions that are granted as a unit To grant a single permission, create a permission set with only 1 permission The.NET Framework supplies seven built-in permission sets

Built-in Permission Sets Nothing –grants no permissions Execution –Can run, but no access to protected resources Nothing –grants no permissions Execution –Can run, but no access to protected resources

Built-in Permission Sets (cont’d) Internet –Grants limited permissions for code of unknown origin LocalIntranet –Grants high permissions designed for code within the enterprise Internet –Grants limited permissions for code of unknown origin LocalIntranet –Grants high permissions designed for code within the enterprise

Built-in Permission Sets (cont’d) Everything –Grants all permissions except for permission to skip verification SkipVerification –Grants permission to skip security checks Everything –Grants all permissions except for permission to skip verification SkipVerification –Grants permission to skip security checks

Built-in Permission Sets (cont’d) FullTrust –Grants full access to all resources –Includes all permissions FullTrust –Grants full access to all resources –Includes all permissions

Granting Permissions The easiest way to grant or deny permissions is to work with the.NET Framework Configuration tool Located at: –Control Panel -> Administrative Tools -> Microsoft.NET Framework 2.0 Configuration -> My Computer -> Runtime Security Policy -> User -> Permissions Sets The easiest way to grant or deny permissions is to work with the.NET Framework Configuration tool Located at: –Control Panel -> Administrative Tools -> Microsoft.NET Framework 2.0 Configuration -> My Computer -> Runtime Security Policy -> User -> Permissions Sets

Imperative Security Requesting permissions via attributes is known as declarative security With imperative security, you create objects to represent the permissions your code requires Requesting permissions via attributes is known as declarative security With imperative security, you create objects to represent the permissions your code requires

Impersonation Allows ASP.NET to take on the identity of an authenticated user Applies only to applications that use ASP.NET to communicate with server ASP.NET impersonation is controlled by entries in the appicable web.config file;Ex: – Allows ASP.NET to take on the identity of an authenticated user Applies only to applications that use ASP.NET to communicate with server ASP.NET impersonation is controlled by entries in the appicable web.config file;Ex: –

Impersonation (cont’d) By default, ASP.NET runs as an unprivileged account named ASPNET When impersonation is disabled, all requests will run in the context of the account running ASP.NET By default, ASP.NET runs as an unprivileged account named ASPNET When impersonation is disabled, all requests will run in the context of the account running ASP.NET

Impersonation (cont’d) If enabled, ASP.NET takes on the identity passed to it by IIS If you are not allowing anonymous access, ASP.NET will take on the credentials of the authenticated user and make requests for resources as if it were actually that user If enabled, ASP.NET takes on the identity passed to it by IIS If you are not allowing anonymous access, ASP.NET will take on the credentials of the authenticated user and make requests for resources as if it were actually that user

Role-Based Security User is a member of a group Authorization is handled by role-based security Implemented through two objects: –WindowsIdentity –WindowsPrincipal User is a member of a group Authorization is handled by role-based security Implemented through two objects: –WindowsIdentity –WindowsPrincipal

The WindowsIdentity Object Represents the Windows user who is running the current code Properties of this object allow you to retrieve information about the user; e.g: –Username –Authentication method Represents the Windows user who is running the current code Properties of this object allow you to retrieve information about the user; e.g: –Username –Authentication method

The WindowsPrincipal Object Adds functionality to the WindowsIdentity object Represents the entire security context of the user When the CLR determines which role- based permissions to assign to your code, it inspects the WindowsPrincipal object Adds functionality to the WindowsIdentity object Represents the entire security context of the user When the CLR determines which role- based permissions to assign to your code, it inspects the WindowsPrincipal object

Verifying Role Membership Use the IsInRole() method of the WindowsPrincipal object Results of using this method can be used to modify application’s user interface Use the IsInRole() method of the WindowsPrincipal object Results of using this method can be used to modify application’s user interface

IsInRole() Method Three available overloads for this method: –IsInRole(WindowsBuiltInRole) –IsInRole(String)name of user –IsInRole(Integer)role identifier (RID) Three available overloads for this method: –IsInRole(WindowsBuiltInRole) –IsInRole(String)name of user –IsInRole(Integer)role identifier (RID)

Configuring Web Services Security The chief challenge is to decide how to authenticate users After a user has been authenticated, a Web service is a Windows application You can use the same declarative and imperative security tools that you use with other applications The chief challenge is to decide how to authenticate users After a user has been authenticated, a Web service is a Windows application You can use the same declarative and imperative security tools that you use with other applications

Authenticating Users for Web Services If you need to authorize access to resources based on the caller’s identity, use impersonation If all users need to access same resources, Web server performs authentication without impersonation On production servers, you should disable HTTP- GET and HTTP-POST, limiting them to SOAP access If you need to authorize access to resources based on the caller’s identity, use impersonation If all users need to access same resources, Web server performs authentication without impersonation On production servers, you should disable HTTP- GET and HTTP-POST, limiting them to SOAP access