sandboxing in .net clr

32
Mikhail Shcherbakov July 05, 2015 Sandboxing in .NET CLR Mikhail Shcherbakov IT Global Meetup #6 IntelliEgg

Upload: mikhail-shcherbakov

Post on 11-Feb-2017

330 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Sandboxing in .NET CLR

Mikhail Shcherbakov

July 05, 2015

Sandboxing in .NET CLRMikhail Shcherbakov

IT Global Meetup #6

IntelliEgg

Page 2: Sandboxing in .NET CLR

Creator of IntelliDebugger projectCoordinator of SPB .NET CommunityFormer Product manager and Team lead at Cezurity, Positive Technologies, Acronis, Luxoft, Boeing

About me

2

Page 3: Sandboxing in .NET CLR

Sandboxing is the base of security

Development of extensible and security-sensitive applications

Troubleshooting and knowledge about the internals

Knowledge in Practice

ASP.NET / IIS Silverlight SQL CLR XBAP ClickOnce Sharepoint

3

Page 4: Sandboxing in .NET CLR

Security Architecture

4

Page 5: Sandboxing in .NET CLR

Security Architecture

5

Page 6: Sandboxing in .NET CLR

Application Domains

6

Page 7: Sandboxing in .NET CLR

The verification process

7

Page 8: Sandboxing in .NET CLR

Just-in-time verification

Page 9: Sandboxing in .NET CLR

Code Access Security

9

Page 10: Sandboxing in .NET CLR

Policy

10

Page 11: Sandboxing in .NET CLR

deprecated 

in .NET Framework

4

Policy

11

Page 12: Sandboxing in .NET CLR

Permissions

12

Page 13: Sandboxing in .NET CLR

Permissions

13

Page 14: Sandboxing in .NET CLR

Enforcement

14

Page 15: Sandboxing in .NET CLR

Fully Trusted code in Partially Trusted AppDomain

15

Page 16: Sandboxing in .NET CLR

Transparency Model

16

Page 17: Sandboxing in .NET CLR

Level 2 Security Transparency

CriticalFull Trust code that can do anything

Safe CriticalFull Trust code Provides access to Critical code

TransparentOnly verifiable code Cannot p/invoke Cannot

elevate/assert

17

Page 18: Sandboxing in .NET CLR

Security Transparency Attributes

Assembly Level

Type Level

Member Level

SecurityTransparent SecuritySafeCritical SecurityCritical AllowPartiallyTrustedCallers

SecAnnotate.exe – .NET Security Annotator Tool http://bit.ly/1A3vMw3

18

Page 19: Sandboxing in .NET CLR

Stack walking

19

Page 20: Sandboxing in .NET CLR

Sandbox implementation

Page 21: Sandboxing in .NET CLR

ASP.NET Partial Trust applications

2005 2005 2006 2007 2008 2009 2010 2011 2012

Use Medium trust in shared hosting environments bit.ly/1yABGqfAugust 2005

For Web servers that are Internet-facing, Medium trust is recommended bit.ly/1z83LVVJuly 2008

21

Page 22: Sandboxing in .NET CLR

ASP.NET Partial Trust applications

20152008 2009 2010 2011 2012 2013

ASP.NET Partial Trust does not guarantee application isolationbit.ly/1CRv3UxJune 2012

ASP.NET Security and the Importance of KB2698981 in Cloud Environments bit.ly/1vXJ50JApril 2013

“The official position of the ASP.NET team is that Medium Trust is obsolete”

-Levi Broderick, security developer at Microsoft bit.ly/1If14Gv

June 2013ASP.NET MVC 5 no longer supports partial trust bit.ly/1w0xxuX

October 2013

22

Page 24: Sandboxing in .NET CLR

Luring Attack

24

Page 25: Sandboxing in .NET CLR

Luring AttackMS02-061 “Elevation of Privilege in SQL Server Web Tasks”

25

Page 26: Sandboxing in .NET CLR

Exception Filter Attack

Page 27: Sandboxing in .NET CLR

Exception Filter Attack

27

Page 28: Sandboxing in .NET CLR

Exception Filter Attack

28

Page 29: Sandboxing in .NET CLR

Summary

29

Page 30: Sandboxing in .NET CLR

Sandboxing:Exploring the .NET Framework 4 Security Model bit.ly/1zBHDl7

New Security Model: Moving to a Better Sandbox bit.ly/1qdLTYf

How to Test for Luring Vulnerabilities bit.ly/1G5asdG

Using SecAnnotate to Analyze Your Assemblies for Transparency Violations bit.ly/12AtGZF

Summary

30

Page 31: Sandboxing in .NET CLR

.NET Security:OWASP Top 10 for .NET developers bit.ly/1mpvG9R

OWASP .NET Project bit.ly/1vCfknmTroy Hunt blog www.troyhunt.comThe WASC Threat Classification v2.0 bit.ly/1G5d8rM

Summary

31

Page 32: Sandboxing in .NET CLR

Thank you for your attention!Mikhail Shcherbakov

spbdotnet.orglinkedin.com/in/mikhailshcherbakovgithub.com/yuske@yu5k3

IntelliEgg