Presented By: Ahmed ALSUM PhD Student CS 895:.Net Security Old Dominion University College of Science Department of Computer Science.

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.
Enabling Secure Internet Access with ISA Server
Applet Security Gunjan Vohra. What is Applet Security? One of the most important features of Java is its security model. It allows untrusted code, such.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
System Center Configuration Manager Push Software By, Teresa Behm.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Chapter 4 Chapter 4: Planning the Active Directory and Security.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 5: Managing File Access.
14.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
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.
11 SHARING FILE SYSTEM RESOURCES Chapter 9. Chapter 9: SHARING FILE SYSTEM RESOURCES2 CHAPTER OVERVIEW  Create and manage file system shares and work.
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
1 Securing Network Resources Understanding NTFS Permissions Assigning NTFS Permissions Assigning Special Permissions Copying and Moving Files and Folders.
Understanding Security Lesson 6. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding the System.Security Namespace Understand the.
Module 15 Configuring and Deploying Windows Client Applications.
Course 6421A Module 7: Installing, Configuring, and Troubleshooting the Network Policy Server Role Service Presentation: 60 minutes Lab: 60 minutes Module.
11 SHARING FILE SYSTEM RESOURCES Chapter 9. Chapter 9: SHARING FILE SYSTEM RESOURCES2 CHAPTER OVERVIEW Create and manage file system shares and work with.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. ASP.NET Authentication.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory Chapter 9: Active Directory Authentication and Security.
Sharing Resources Lesson 6. Objectives Manage NTFS and share permissions Determine effective permissions Configure Windows printing.
Introduction to .Net Framework
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 7: Domain Name System.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 5: Managing File Access.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
.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.
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.
1 Chapter Overview Creating Drive and Folder Shares Using Distributed File System Installing Network Printers Administering Network Printers Managing Share.
.Net Security and performance
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
1 Administering Shared Folders Understanding Shared Folders Planning Shared Folders Sharing Folders Combining Shared Folder Permissions and NTFS Permissions.
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.
CS 7: Introduction to Computer Programming Java and the Internet Sections ,2.1.
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.
ASP.Net Role-based Security Chapter 10 (Freeman and Jones) CS795/895.
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.
1 Chapter Overview Managing Object and Container Permissions Locating and Moving Active Directory Objects Delegating Control Troubleshooting Active Directory.
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.
DEV240 Fundamentals of Code Access Security Sebastian Lange Program Manager Common Language Runtime Microsoft Corporation.
Creating and Managing Digital Certificates Chapter Eleven.
CN1260 Client Operating System Kemtis Kunanuraksapong MSIS with Distinction MCT, MCITP, MCTS, MCDST, MCP, A+
Understand Permissions LESSON Security Fundamentals.
Understanding Security
System.Security.policy Namespace By: Marepalli Gayathri.
Understanding.NET Framework Security David LeBlanc Microsoft Office.
1 Introduction to Active Directory Directory Services Uniquely identify users and resources on a network Provide a single point of network management.
Customizing.NET Security Permissions Nageswari Vallabhaneni.
Chapter 7. Permissions Programming.Net Security, O’Reilly Publishers.
Building Preservation Environments with Data Grid Technology Reagan W. Moore Presenter: Praveen Namburi.
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
To Join the Teleconference
Lesson #8 MCTS Cert Guide Microsoft Windows 7, Configuring Chapter 8 Configuring Applications and Internet Explorer.
Configuring Internet-related services
Introduction to Active Directory Directory Services
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

Presented By: Ahmed ALSUM PhD Student CS 895:.Net Security Old Dominion University College of Science Department of Computer Science

Outline

What’s a Permission Permissions limit what an assembly can do ◦ –run if code not verifiable? ◦ –access file system? ◦ –access the network? ◦ –access certain environment variables? ◦ –call native code (COM objects, DLLs)? ◦ –access files or printers without asking user?

Security Code Access Security Code may require permissions to run Security policy determines what code is allowed to run ◦ By machine  Where did this code come from?  Who authored it? ◦ By user If no permission then a SecurityException is thrown

Security Code Access Security Can specify the permissions needed by code ◦ Declarative, with attributes ◦ Imperative  Create a permission object, then call Demand() By default, the CLR will ensure that all code in call chain has the necessary permissions

Security Code Access Security Security check Varying levels of trust Behavior constrained by least trustworthy component Assembly A1 Assembly A2 Assembly A3 Assembly A4 G1 G4 G3 G2 P P P Call Chain

Security Code Access Security Can override security checks ◦ Assert() lets you and the code you call perform actions that you have permission to do, but your callers may not. ◦ Deny() lets you prevent downstream code from performing certain actions ◦ PermitOnly() is like Deny(), but you specify the only permissions the downstream code will have.

Security Permissions Code access permissions ◦ Protect resources and operations ◦ Ex. DnsPermission, EnvironmentPermission, WebPermission Identity permissions ◦ Characteristics of an assembly‘s identity ◦ Ex. URLIdentityPermission, ZoneIdentityPermission Role-based permissions ◦ Discover a user‘s role or identity ◦ Ex. PrincipalPermission Custom permissions ◦ Design and implement your own classes

Permissions classes Resources AccessedRequired Permissions DPAPI encryptionDataProtectionPermission DNS directoryDnsPermission Environment variablesEnvironmentPermission Event logEventLogPermission File dialogFileDialogPermission File systemFileIOPermission Isolated file storageIsolatedStoragePermission Key containersKeyContainerPermission Message queuesMessageQueuePermission Network information and traffic statisticsNetworkInformationPermission OLE DB data sourcesOleDbPermission Performance countersPerformanceCounterPermission

Permissions classes Resources Accessed Required Permissions PrintersPrintingPermission ReflectionReflectionPermission RegistryRegistryPermission SecuritySecurityPermission SMTP serversSmtpPermission SocketsSocketsPermission SQL Server notificationsSqlNotificationPermission SQL ServerSqlClientPermission Stores containing X.509 certificatesStorePermission User interfaces and clipboardUIPermission Web services (and other HTTP Internet resources)WebPermission

Namespace: System.Security CodeAccessPermission Defines the underlying structure of all code access permissions  When you inherit from CodeAccessPermission, you must also implement the IUnrestrictedPermission interface.  The following CodeAccessPermission members must be overridden: Copy, Intersect, IsSubsetOf, ToXml, FromXml, and Union.  You must also define a constructor that takes a PermissionState as its only parameter.  You must apply the SerializableAttribute attribute to a class that inherits from CodeAccessPermission. Custom Permission Example

Namespace: System.Security.Permissions CodeAccessSecurityAttribute The security information declared by a security attribute is stored in the metadata of the attribute target and is accessed by the system at run time. Security attributes are used only for declarative security. All permission attributes derived from this class must have only a single constructor that takes a SecurityAction as its only parameter. Custom Attribute Example

Namespace: System.Security.Permissions PermissionState Enumeration Specifies whether a permission should have all or no access to resources at creation.  Unrestricted: Full access to the resource protected by the permission.  None: No access to the resource protected by the permission. Ex, the file permission constructor could create an object representing either no access to any files or all access to all files. Intermediate states can be set according to the specific permission semantics.

EnvironmentPermission Environment variable names are designated by one or more case- insensitive name lists separated by semicolons, with separate lists for read and write access to the named variables. EnvironmentPermission class controls access to system and user environment variables. EnvironmentPermission tmpVariable = new EnvironmentPermission( EnvironmentPermissionAccess.Read, "TEMP"); tmpVariable.Deny();

FileIOPermission Controls the ability to access files and folders. This permission distinguishes between: Read, Write, Append, and PathDiscovery. All these permissions are independent, meaning that rights to one do not imply rights to another. FileIOPermission fp = new FileIOPermission(PermissionState.None); fp.AllLocalFiles = FileIOPermissionAccess.Read; fp.Demand();

WebBrowserPermission It controls the ability to create the WebBrowser control. In the Windows Presentation Foundation (WPF), the Web browser control enables frames to navigate HTML. This permission uses the values of the WebBrowserPermission enumerations. WebBrowserPermission webBrowserPermission = new WebBrowserPermission(WebBrowserPermissionLevel.Unrestricted);

MediaPermission The MediaPermission describes a set of security permissions that controls the ability for audio, image, and video media to work in a partial-trust Windows Presentation Foundation (WPF) application.

RegistryPermission RegistryPermission describes protected operations on registry variables. Registry variables should not be stored in memory locations where code without RegistryPermission can access them. If the registry object is passed to an untrusted caller it can be misused. RegistryPermission f = new RegistryPermission( RegistryPermissionAccess.Read, "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProces sor\\0");

PrincipalPermission By passing identity information (user name and role) to the constructor, PrincipalPermission can be used to demand that the identity of the active principal matches this information. It implements the IPermission interface. This is because PrincipalPermission is not a code access permission; that is, it is not granted based on the identity of the executing assembly. Instead, it allows code to perform actions (Demand, Union, Intersect, and so on) against the current user identity.IPermissionDemandUnionIntersect AppDomain.CurrentDomain.SetPrincipalPolicy( PrincipalPolicy.WindowsPrincipal); PrincipalPermission principalPerm = new PrincipalPermission(null, "Administrators"); principalPerm.Demand();

Namespace: System.Net WebPermission WebPermission provides a set of methods and properties to control access to Internet resources. You can use a WebPermission to provide either restricted or unrestricted access to your resource, based on the PermissionState that is set when the WebPermission is created.PermissionState Regex myRegex = new WebPermission wp = new WebPermission(NetworkAccess.Connect,myRegex); wp.AddPermission(NetworkAccess.Accept, " wp.Demand();

Namespace: System.Data.OleDb OleDbPermission Enables the.NET Framework Data Provider for OLE DB to help make sure that a user has a security level sufficient to access an OLE DB data source

Namespace: System.Net DnsPermission Controls rights to access Domain Name System (DNS) servers on the network. The default permissions allow all local and Intranet zone applications to access DNS services, and no DNS permission for Internet zone applications. DnsPermission permission = new DnsPermission(PermissionState.Unrestricted); permission.Demand();

References Programming.NET Security, O’Reilly by Adam Freeman, Allen Jones.NET Framework Class Library - System.Security.Permissions Namespace URL: Framework Developer's Guide - Key Security Concepts URL:

QUESTIONS ?