34
Model-based Security with UMLsec Software & Systems Engineering Informatics, Munich University of Technology Germany [email protected] http://www.jurjens.de/jan Jan Jürjens

Model-based Security with UMLsec - Uni Koblenz-Landau

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Model-based Security with UMLsec - Uni Koblenz-Landau

2

1

Model-based Security with UMLsec

Software & Systems Engineering Informatics, Munich University of Technology

Germany

[email protected]://www.jurjens.de/jan

Jan Jürjens

Page 2: Model-based Security with UMLsec - Uni Koblenz-Landau

2

2

Jan Jürjens, TU Munich: Model-based Security with UMLsec 2

A Need for SecuritySociety and economies rely on computer

networks for communication, finance, energydistribution, transportation...

Attacks threaten economical and physicalintegrity of people and organizations.

Interconnected systems can be attackedanonymously and from a safe distance.

Networked computers need to be secure.

Page 3: Model-based Security with UMLsec - Uni Koblenz-Landau

2

3

Jan Jürjens, TU Munich: Model-based Security with UMLsec 3

Problems, Causes

Many flaws found in design or implementation of security-critical systems, sometimes yearsafter publication or use.

• Designing secure systems is difficult.• Designers often lack background in security.• Security as an afterthought.• Cannot use security mechanisms „blindly“.

Page 4: Model-based Security with UMLsec - Uni Koblenz-Landau

2

4

Jan Jürjens, TU Munich: Model-based Security with UMLsec 4

Previous approaches

„Penetrate-and-patch“: • insecure• disruptive

Traditional formal methods: expensive.

• training people• constructing formal specifications.

Page 5: Model-based Security with UMLsec - Uni Koblenz-Landau

2

5

Jan Jürjens, TU Munich: Model-based Security with UMLsec 5

Goal: Security by designConsider security• from early on• within development context• taking an expansive view• in a seamless way.Secure design by model analysis.

Secure implementation by test generation.

Page 6: Model-based Security with UMLsec - Uni Koblenz-Landau

2

6

Jan Jürjens, TU Munich: Model-based Security with UMLsec 6

Using UML

UML: unprecedented opportunity forhigh-quality critical systems developmentfeasible in industrial context:

• De-facto standard in industrial modeling: large number of developers trained in UML.• Relatively precisely defined.• Many tools in development.

Page 7: Model-based Security with UMLsec - Uni Koblenz-Landau

2

7

Jan Jürjens, TU Munich: Model-based Security with UMLsec 7

Used fragment of UMLActivity diagramClass diagramSequence diagramStatechart diagramDeployment diagramPackageStereotypes, tags, constraintsCurrent: UML 1.5

Page 8: Model-based Security with UMLsec - Uni Koblenz-Landau

2

8

Jan Jürjens, TU Munich: Model-based Security with UMLsec 8

UML Extension mechanisms

Stereotype: specialize model element using¿labelÀ.

Tagged value: attach {tag=value} pair to stereotyped element.

Constraint: refine semantics of stereotypedelement.

Profile: gather above information.

Page 9: Model-based Security with UMLsec - Uni Koblenz-Landau

2

9

Jan Jürjens, TU Munich: Model-based Security with UMLsec 9

UMLsecUMLsec: extension for secure systems

development.

• evaluate UML specifications for vulnerabilities

• encapsulate security engineering patterns

• also for developers not specialized in security• security from early design phases, in system

context• make certification cost-effective

Page 10: Model-based Security with UMLsec - Uni Koblenz-Landau

2

10

Jan Jürjens, TU Munich: Model-based Security with UMLsec 10

The UMLsec profileRecurring security requirements as stereotypes

with tags (secrecy, integrity,...).

Associated constraints to evaluate model, indicatepossible vulnerabilities.

Ensures that stated security requirements enforcegiven security policy.

Ensures that UML specification providesrequirements.

Page 11: Model-based Security with UMLsec - Uni Koblenz-Landau

2

11

Jan Jürjens, TU Munich: Model-based Security with UMLsec 11

Basic Security Requirements

Secrecy

Information

Information

Integrity

Page 12: Model-based Security with UMLsec - Uni Koblenz-Landau

2

12

Jan Jürjens, TU Munich: Model-based Security with UMLsec 12

¿InternetÀ, ¿encryptedÀ, …

Kinds of communication links resp. systemnodes.

For adversary type A, stereotype s, have setThreats (s) ∊ {delete, read, insert, access} of actions that adversaries are capable of.

Default attacker:InternetencryptedLANsmart card

{delete, read, insert}{delete}∅

Threats ()Stereotype

A

default

Page 13: Model-based Security with UMLsec - Uni Koblenz-Landau

2

13

Jan Jürjens, TU Munich: Model-based Security with UMLsec 13

Requirements with use case diagrams

Capture security requirementsin use case diagrams.

Constraint: need to appear in correspondingactivity diagram.

Sales application

Business

sells goods

Customer

buys goods

«fair exchange»

Page 14: Model-based Security with UMLsec - Uni Koblenz-Landau

2

14

Jan Jürjens, TU Munich: Model-based Security with UMLsec 14

¿fair exchangeÀ

Ensures generic fair exchange condition.

Constraint: after a {buy} state in activitydiagram is reached, eventually reach {sell} state.

(Cannot be ensured for systems that an attacker can stop completely.)

Page 15: Model-based Security with UMLsec - Uni Koblenz-Landau

2

15

Jan Jürjens, TU Munich: Model-based Security with UMLsec 15

Example ¿fair exchangeÀ

Customer buys a good from a business.

Fair exchange means: after payment, customer is eventuallyeither delivered good or able to reclaimpayment.

Pay

Wait untildelivery due

Reclaim

Deliver

Purchase

Request good

BusinessCustomer

«fair exchange»{buy={Pay}} {sell={Reclaim,Deliver}}

Page 16: Model-based Security with UMLsec - Uni Koblenz-Landau

2

16

Jan Jürjens, TU Munich: Model-based Security with UMLsec 16

¿secure linksÀ

Ensures that physical layer meets securityrequirements on communication.

Constraint: for each dependency d with stereotype s ∊{¿secrecyÀ, ¿integrityÀ} between components on nodes n≠m, have a communication link l betweenn and m with stereotype t such that

• if s = ¿secrecyÀ: have read ∉ Threats (t).• if s = ¿integrityÀ: have insert ∉ Threats (t).A

A

Page 17: Model-based Security with UMLsec - Uni Koblenz-Landau

2

17

Jan Jürjens, TU Munich: Model-based Security with UMLsec 17

Example ¿secure linksÀ

Given default adversary type, constraintfor stereotype ¿secure linksÀ violated:According to the Threatsdefault(Internet)scenario, ¿InternetÀ link does not provide secrecyagainst default adversary.

«secure links»

server machineclient machineget_password

browserclient apps

access controlweb server

Remote access

«call»

«Internet»

«secrecy»

Page 18: Model-based Security with UMLsec - Uni Koblenz-Landau

2

18

Jan Jürjens, TU Munich: Model-based Security with UMLsec 18

¿secure dependencyÀ

Ensure that ¿callÀ and ¿sendÀ dependenciesbetween components respect securityrequirements on communicated data given bytags {secrecy}, {integrity}.

Constraint: for ¿callÀ or ¿sendÀ dependency from C to D (and similarly for {secrecy}):

• Msg in D is {secrecy} in C if and only if also in D.• If msg in D is {secrecy} in C, dependency stereotyped¿secrecyÀ.

Page 19: Model-based Security with UMLsec - Uni Koblenz-Landau

2

19

Jan Jürjens, TU Munich: Model-based Security with UMLsec 19

Example ¿secure dependencyÀ

Violates ¿secure dependencyÀ: Random generatorand ¿callÀ dependency do not give security levelfor random() to key generator.

Random generator

seed: Real

random(): Real

random(): Real

Random number«interface»newkey(): Key

«call»

Key generation

«critical»Key generator

newkey(): Key

«secure dependency»

{secrecy={newkey(),random()}

Page 20: Model-based Security with UMLsec - Uni Koblenz-Landau

2

20

Jan Jürjens, TU Munich: Model-based Security with UMLsec 20

¿no down–flowÀ

Enforce secure information flow. Constraint:

Value of any data specified in {secrecy} mayinfluence only the values of data also specified in {secrecy}.

Formalize by referring to formal behaviouralsemantics.

Page 21: Model-based Security with UMLsec - Uni Koblenz-Landau

2

21

Jan Jürjens, TU Munich: Model-based Security with UMLsec 21

Example ¿no down-flowÀ

¿no down–flowÀ violated: partial information on input of high wm() returned by non-high rx().

rx(): Boolean

Customer account

rx(): Boolean

Account

rm(): Datawm(x: Data)

ExtraServicemoney: Integer

rm()/return(money)rm(): Datawm(x: Data)

NoExtraService

/money:=0

rm()/return(money)

money+x/money:=

wm(x)

wm(x)/money:=money+xwm(x)

money+x/money:=

{secret={wm,rm,money}}«no down−flow»

rx()/return(true) rx()/return(false)

[money>=1000]

[money<=1000]

Page 22: Model-based Security with UMLsec - Uni Koblenz-Landau

2

22

Jan Jürjens, TU Munich: Model-based Security with UMLsec 22

¿data securityÀ

Security requirements of data marked¿criticalÀ enforced against threat scenariofrom deployment diagram.

Constraints:

Secrecy of {secrecy} data preserved.

Integrity of {integrity} data preserved.

Page 23: Model-based Security with UMLsec - Uni Koblenz-Landau

2

23

Jan Jürjens, TU Munich: Model-based Security with UMLsec 23

Example ¿data securityÀ

Variant of TLS (INFOCOM`99).

Violates {secrecy} of sagainst defaultadversary.

Page 24: Model-based Security with UMLsec - Uni Koblenz-Landau

2

24

Jan Jürjens, TU Munich: Model-based Security with UMLsec 24

¿guarded accessÀ

Ensures that in Java, ¿guardedÀ classesonly accessed through {guard} classes.

Constraints:

• References of ¿guardedÀ objects remainsecret.

• Each ¿guardedÀ class has {guard} class.

Page 25: Model-based Security with UMLsec - Uni Koblenz-Landau

2

25

Jan Jürjens, TU Munich: Model-based Security with UMLsec 25

Example ¿guarded accessÀ

Provides ¿guarded accessÀ:Access to MicSi protected by MicGd.

Page 26: Model-based Security with UMLsec - Uni Koblenz-Landau

2

26

Jan Jürjens, TU Munich: Model-based Security with UMLsec 26

Concepts covered by UMLsecSecurity requirements: ¿secrecyÀ,…

Threat scenarios: Use Threatsadv(ster).Security concepts: For example ¿smart cardÀ.

Security mechanisms: E.g. ¿guarded accessÀ.

Security primitives: Encryption built in.

Physical security: Given in deployment diagrams.

Security management: Use activity diagrams.

Technology specific: Java, CORBA security.

Page 27: Model-based Security with UMLsec - Uni Koblenz-Landau

2

27

Jan Jürjens, TU Munich: Model-based Security with UMLsec 27

Security Analysis

Model classes of adversaries.May attack different parts of the system

according to threat scenarios.Example: insider attacker may intercept

communication links in LAN.To evaluate security of specification,

simulate jointly with adversary model.

Page 28: Model-based Security with UMLsec - Uni Koblenz-Landau

2

28

Jan Jürjens, TU Munich: Model-based Security with UMLsec 28

Tool-support: ConceptsMeaning of diagrams stated informally in (OMG

2001).Possible ambiguities problem for• tool support• analysis of behavioral properties

(such as security)Use precise semantics for part of UML defined

as pseudo-code. Include adversary model forsimulation.

Page 29: Model-based Security with UMLsec - Uni Koblenz-Landau

2

29

Jan Jürjens, TU Munich: Model-based Security with UMLsec 29

Tool-support: TechnologyCommercial modelling tools: so far mainly syntactic

checks and code-generation.Goal: more sophisticated analysis;

connection to analysis tools.Several possibilities:• General purpose language with integrated

XML parser (Perl, …)• Special purpose XML parsing language

(XSLT, …)• Data Binding (Castor; XMI: e.g. MDR)

Page 30: Model-based Security with UMLsec - Uni Koblenz-Landau

2

30

Jan Jürjens, TU Munich: Model-based Security with UMLsec 30

Data-binding with MDR

Extracts data from XMI file into Java Objects, following UML 1.4 meta-model.

Access data via methods.

Advantage: No need to worry about XML.

Page 31: Model-based Security with UMLsec - Uni Koblenz-Landau

2

31

Jan Jürjens, TU Munich: Model-based Security with UMLsec 31

Connection with analysis tool

Industrial CASE tool with UML-like notation: AUTOFOCUS(http://autofocus.informatik.tu-muenchen.de)

• verification• code generation• test-sequence generationConnect UML tool to underlying analysis

engine.

Page 32: Model-based Security with UMLsec - Uni Koblenz-Landau

2

32

Jan Jürjens, TU Munich: Model-based Security with UMLsec 32

Applications

• Common Electronic Purse Specifications• Analysis of multi-layer security protocol for

web application of major German bank• Analysis of SAP access control configurations

for major German bank• Risk analysis of critical business processes

(for Basel II / KontraG)• …

Page 33: Model-based Security with UMLsec - Uni Koblenz-Landau

2

33

Jan Jürjens, TU Munich: Model-based Security with UMLsec 33

Some resourcesBook: Jan Jürjens, Secure Systems

Development with UML, Springer-Verlag, due 2003

Tutorial @ CSS’03, Cancun (Mexico), 19-21 May.

More information: http://www.jurjens.de/jan

Page 34: Model-based Security with UMLsec - Uni Koblenz-Landau

2

34

Jan Jürjens, TU Munich: Model-based Security with UMLsec 34

Finally

We are always interested in industrial challenges for our tools, methods,and ideas to solve practical problems.More info: http://www.jurjens.de/jan

Contact me here or via Internet.

Thanks for your attention !