How Extended Unix Tools Can Measure the Changing Security Posture of - - PowerPoint PPT Presentation

how extended unix tools can measure the changing security
SMART_READER_LITE
LIVE PREVIEW

How Extended Unix Tools Can Measure the Changing Security Posture of - - PowerPoint PPT Presentation

How Extended Unix Tools Can Measure the Changing Security Posture of Power-Control Networks Gabriel A. Weaver, Edmond Rogers, Rakesh Bobba, Sean W. Smith Dartmouth College, TCIPG Center TCIPG Seminar 1/4/13 Practitioners identify and


slide-1
SLIDE 1

How Extended Unix Tools Can Measure the Changing Security Posture of Power-Control Networks

Gabriel A. Weaver, Edmond Rogers, Rakesh Bobba, Sean W. Smith Dartmouth College, TCIPG Center

TCIPG Seminar 1/4/13

slide-2
SLIDE 2

Practitioners identify and categorize meaningful structures within a variety of data sources in order to evaluate security.

slide-3
SLIDE 3

Our research interprets many of these structures (lines, interface blocks) as languages. We built tools to process and analyze text with respect to those languages.

slide-4
SLIDE 4

Just as programmers use high-level languages to program more efficiently… So can practitioners use high-level languages to audit and maintain power-control networks.

slide-5
SLIDE 5

Figure 2-2 Composite High-level View of the Actors within Each of the Smart Grid Domains

Transmission 17,325 substations (2009) Bulk Generation 1416,082 POUs ~1.5 million IOUs (2012-2013) Marketing 168 marketers (2012-2013) Operations 2006 POUs, 194 IOUs (2012-2013) [NIST Smart Grid Program Overview, 2012] [APPA 2012-2013 Annual Directory & Statistical Report, 2012] Customer 300 million people in US (2010), 160 million residences, 18 million smart meters (2012), 250 million registered cars (2010)

Today's smart grid is already large and complex.

slide-6
SLIDE 6

Substation communications at one utility involve many devices.

Transmission & Distribution 200 substations Operations 1 utility Customer 1 million (residential)

[INL National SCADA Test Bed Substation Automation Evaluation Report, 2009]

slide-7
SLIDE 7

Transmission/ Distribution

(200 substations)

In the Electrical Power Grid, security policies and related artifacts are expressed in a variety of forms.

Device Data Type Operations

(1 IOU)

SCADA/Corporate Network Cisco IOS, Juniper, IEC 61850, CIM Data Historian C37.118 Operator Interface Windows Registries, logs Engineering Workstation Windows Registries, logs RTU/Substation Gateway DNP3, IEC 61850, RADIUS Engineering Workstation Windows Registries Substation LAN Cisco IOS, SCL IED, GOOSE, CIM PMU/Relays C37.118, SCL IED, GOOSE, CIM Meters RTU, DNP3 Customer

(1 million)

Electric Cars Green Button (ESPI XML) Appliances Green Button (ESPI XML)

slide-8
SLIDE 8

NERC CIP requires utilities to manage this data via baseline configuration development and change control.

Relevant Provisions CIP 003-4: Change control and configuration management CIP 010-1: Baseline configuration development and comparison CIP 005-4: Update network documentation within 30 days of a change. Practical Considerations

  • 1. Audits currently consume 30 man days per day of audit.
  • 2. Audits cost large IOUs from hundreds of thousands to millions of

dollars.

  • 3. Utilities are currently on a 3 year audit cycle, but FERC would like

annual audits.

  • 4. Fines for noncompliance are enough to "bankrupt small nation states."

[Conversations with Edmond Rogers, 2012]

slide-9
SLIDE 9
  • 1. "Try to provide actionable and timely information of security posture from vast

quantities of disparate data from a variety of sources and levels of granularity" [Roadmap to Achieve Energy-Delivery Systems Cybersecurity, 2011].

  • 2. "New measurement methods and models are needed to sense, control, and optimize

the grid's new operational paradigm." [NIST Smart Grid Program Overview, 2012]

  • 3. Need to develop cybersecurity solutions that are (a) robust to changes in technology

and (b) develop capabilities that might be applicable elsewhere. [DOE Cybersecurity Information Exchange, Samara N. Moore, 2012]

We need "common terms and measures specific to each energy subsector available to baseline security posture in operational settings."

High-level research barriers prevent cheaper, more consistent audit.

slide-10
SLIDE 10

We view these barriers as symptoms of three core limitations of textual analysis.

Tools Gap Problem Granularity of Reference Problem Discovery Needs Problem There is a gap between practitioner tools and security policy languages. Practitioners cannot process policy at multiple levels of abstraction. Practitioners need to measure security policy and how it evolves. Many smart-grid formats (SCL, GOOSE, CIM, ESPI-XML) have hierarchical object models. Description Practitioners need to measure how device configurations change and baseline security policy. Baseline configuration and change control in the Power Grid A wide variety of disparate data for devices on grid, but no common framework.

slide-11
SLIDE 11
  • 1. Motivation
  • 2. Theoretical Toolbox
  • 3. XUTools Capabilities
  • i. Baseline Configuration Development
  • ii. Change Control
  • 4. Ongoing Research
  • 5. Conclusions

Outline

slide-12
SLIDE 12
  • 1. Motivation
  • 2. Theoretical Toolbox
  • 3. XUTools Capabilities
  • i. Baseline Configuration Development
  • ii. Change Control
  • 4. Ongoing Research
  • 5. Conclusions

Outline

slide-13
SLIDE 13

We can reduce audit cost by formalizing security policy analyses involved in baseline configuration development and change control.

slide-14
SLIDE 14

First, we must understand the languages that practitioners use to express and analyze security policies.

slide-15
SLIDE 15

Therefore, we begin with the definition of a language.

slide-16
SLIDE 16

What is a language? Doubleday

A string is a sequence of symbols taken from some alphabet.

Do u b l e d a y

1 2 3 4 5 6 7 8 9

Cobb Doubleday

string

A language is an unordered collection of unique strings. MacPhail

slide-17
SLIDE 17

How do we determine whether a language contains a given string? C o b b T F

recognizer

input

  • utput

A recognizer for a language is computational machine that outputs TRUE if an input string is in the language.

slide-18
SLIDE 18

Language Theory and The Tools Gap Problem

slide-19
SLIDE 19

Language theory categorizes languages into different classes based upon recognizer complexity.

state control

S m i t h

input reader input

  • utput

F T Regular Context-Free Finite automaton recognizes

state control

( [ D ] )

input reader input

  • utput

F T

( [

stack

Pushdown automaton recognizes

language recognizer

slide-20
SLIDE 20

Non-Regular

language XML C Cisco IOS CIM SCL Java Perl characters lines regexp matches CIMDiff Coccinelle sgrep xmllint XYDiff

  • ther text-

processing tools

cut cat csplit diff grep

Unix text- processing tools

head tail uniq wc JunOS

Regular

Language theory gives us a framework to understand the Tools Gap Problem.

slide-21
SLIDE 21

Parsing and the Granularity of Reference Problem

slide-22
SLIDE 22

What is parsing? c o b b

parser for grammar G input S grammar G S O B cOB

  • | oO

bB | b

slide-23
SLIDE 23

What is parsing? c o b b

parser for grammar G input S

c

O B grammar G S O B cOB

  • | oO

bB | b

slide-24
SLIDE 24

What is parsing? c o b b

parser for grammar G input S

c

O B grammar G S O B cOB

  • | oO

bB | b

slide-25
SLIDE 25

What is parsing?

grammar G S O B cOB

  • | oO

bB | b

c o b b

parser for grammar G input S

c

O B

slide-26
SLIDE 26

What is parsing? c o b b

parser for grammar G input parse tree

  • utput

S

c

O B

  • B

b

grammar G S O B cOB

  • | oO

bB | b

b

slide-27
SLIDE 27

Parse trees give us a formalism for the Granularity of Reference Problem

Analysts' policy language (RFC 3647)

section

6 TECHNICAL SECURITY CONTROLS The requirements for technical security measures of a CA or RA are determined by the types of services offered. The precise level of security… 6.1 KEY PAIR GENERATION AND INSTALLATION 6.1.1 KEY PAIR GENERATION Key pairs for the Grid-CA are generated on a dedicated IT system unequipped with networking capability or directly within a Hardware Security Module (HSM). 6.1.1.1 HSM REQUIREMENTS The keys are stored only on external data storage media and ... 6.1.2 PRIVATE KEY DELIVERY TO SUBSCRIBER No cryptographic key pairs are generated for subscribers

Language of Sections Parse Tree under TEI-XML Grammar

slide-28
SLIDE 28

Parse trees give us a formalism for the Granularity of Reference Problem

Analysts' policy language (RFC 3647)

6 TECHNICAL SECURITY CONTROLS The requirements for technical security measures of a CA or RA are determined by the types of services offered. The precise level of security… 6.1 KEY PAIR GENERATION AND INSTALLATION 6.1.1 KEY PAIR GENERATION Key pairs for the Grid-CA are generated on a dedicated IT system unequipped with networking capability or directly within a Hardware Security Module (HSM). 6.1.1.1 HSM REQUIREMENTS The keys are stored only on external data storage media and ... 6.1.2 PRIVATE KEY DELIVERY TO SUBSCRIBER No cryptographic key pairs are generated for subscribers

Language of Subsections Parse Tree under TEI-XML Grammar title subsection section paragraph

slide-29
SLIDE 29

Parse trees give us a formalism for the Granularity of Reference Problem

Analysts' policy language (RFC 3647)

6 TECHNICAL SECURITY CONTROLS The requirements for technical security measures of a CA or RA are determined by the types of services offered. The precise level of security… 6.1 KEY PAIR GENERATION AND INSTALLATION 6.1.1 KEY PAIR GENERATION Key pairs for the Grid-CA are generated on a dedicated IT system unequipped with networking capability or directly within a Hardware Security Module (HSM). 6.1.1.1 HSM REQUIREMENTS The keys are stored only on external data storage media and ... 6.1.2 PRIVATE KEY DELIVERY TO SUBSCRIBER No cryptographic key pairs are generated for subscribers

Language of Subsubsections Parse Tree under TEI-XML Grammar title subsection section paragraph ssubsection ssubsection title

slide-30
SLIDE 30

Discrete Mathematics and the Policy Discovery Needs Problem

slide-31
SLIDE 31

distance equality ...

What is a datatype?

A datatype is a set paired with

  • perations on elements in that set.
  • perations
slide-32
SLIDE 32

Cobb Doubleday

string

  • 1. We view a corpus, a collection of texts, as a datatype.
  • 2. A corpus datatype consists of a language and operations upon

that language.

Datatypes give us a formalism for the Policy Discovery Needs Problem

distance equality parsing

  • perations
slide-33
SLIDE 33

For a context-free language, we use two notions of distance.

c

  • b

b S O B B 1 2 3 5 4 6 7 8 c

  • b

S O B 1 2 3 4 5 6

cob cobb

string string_edit_distance(cobb, cob) = 1

c

  • b

b c

  • b

update, cost 0 update, cost 0 update, cost 0 delete, cost 1 tree_edit_distance(Tcob , Tcobb) = 2 unmapped nodes 5 and 6 are deleted

slide-34
SLIDE 34

Distance metrics let us measure trends in how high-level language constructs evolve.

v1 v3 v2 distance time Evolution of CERN Certificate Policies v1 v2 v3 CERN Certificate Policies

slide-35
SLIDE 35
  • 1. Motivation
  • 2. Theoretical Toolbox
  • 3. XUTools Capabilities
  • i. Baseline Configuration Development
  • ii. Change Control
  • 4. Ongoing Research
  • 5. Conclusions

Outline

slide-36
SLIDE 36

XUTools Capabilities

  • 1. Our extended Unix tools apply the theoretical tools

to address core limitations of textual analysis.

  • 2. As a result power-control network security audit

becomes more consistent and efficient.

slide-37
SLIDE 37

Traditional Unix tools operate on regular languages that don't recognize arbitrary hierarchical structure.

Non-Regular

language XML C Cisco IOS CIM YAML Java Perl characters lines regexp matches CIMDiff Coccinelle sgrep xmllint XYDiff

  • ther text-

processing tools

cut cat csplit diff grep

Unix text- processing tools

head tail uniq wc JSON

Regular

slide-38
SLIDE 38

We built extended Unix tools (XUTools) to operate

  • n languages with arbitrary hierarchical structure.

Context-Free

language NVD-XML Subset of C Subset of Cisco IOS characters lines regexp matches xudiff xugrep xuwc

XUTools

cut cat csplit diff grep

Unix text- processing tools

head tail uniq wc

Regular Context-Sensitive

Cisco IOS

slide-39
SLIDE 39

Capabilities for Baseline Configuration

  • i. Inventory security primitives
  • ii. Identify important security primitives
slide-40
SLIDE 40

Baseline Configuration Use Cases

Network Configuration Windows Machines Catalog the roles---groupings of users, devices, and protocols--- defined on access-control policy. More roles make firewalls harder to manage, more prone to misconfiguration [Benson 2009]. Use the Windows Registry as a representation of a baseline configuration [IEEE PECI 2012]. 80% of the machines (not including embedded systems) on the power grid are Windows Machines [Edmond Rogers 2012].

slide-41
SLIDE 41

Baseline Configuration -- Network Devices

Examples Current Approach

  • 1. Catalog the roles---groupings of users, devices, and protocols---

defined on access-control policy.

  • 2. Identify the most important interfaces or roles on a network

device. There are not many tools available to help practitioners in the realm of baseline configuration. Many utilities use spreadsheets to manually document baseline configurations of systems (scalability issues, can't keep up) Manual documentation is error-prone, inconsistent, and does not scale.

slide-42
SLIDE 42

Demonstration

slide-43
SLIDE 43

xuwc //ios:interface router.v1.ios router.v2.ios xuwc [--count=<language_name>] [--context=<language_name>] <xupath> <input_file>+

xuwc usage

IOS:INTERFACE IOS:CONFIG IOS:INTERFACE IOS:CONFIG IOS:INTERFACE IOS:INTERFACE

By default, xuwc counts the number of language construct

  • ccurrences per file.

router.v1.ios router.v2.ios

2 interfaces in router.v1.ios 2 interfaces in router.v2.ios

xuwc design

slide-44
SLIDE 44

xuwc //ios:interface/builtin:line router.v1.ios router.v2.ios xuwc [--count=<language_name>] [--context=<language_name>] <xupath> <input_file>+

xuwc usage

IOS:INTERFACE IOS:CONFIG IOS:INTERFACE

...

LINE LINE

...

LINE LINE IOS:INTERFACE IOS:CONFIG IOS:INTERFACE

...

LINE LINE

...

LINE LINE router.v1.ios router.v2.ios

By default, xuwc counts the number of language construct

  • ccurrences per file.

16 lines in router.v1.ios 16 lines in router.v2.ios

xuwc design

slide-45
SLIDE 45

xuwc --context=ios:interface //ios:interface/builtin:line router.v1.ios router.v2.ios xuwc [--count=<language_name>] [--context=<language_name>] <xupath> <input_file>+

xuwc usage

IOS:INTERFACE FILE IOS:INTERFACE

...

LINE LINE

...

LINE LINE router.v1.ios IOS:INTERFACE FILE IOS:INTERFACE

...

LINE LINE

...

LINE LINE router.v2.ios

The context flag tells xuwc to count number of language construct occurrences per container language construct. 7 lines in <router.v1, Loopback0> 9 lines in <router.v1, GigabitEth> 7 lines in <router.v2, Loopback0> 9 lines in <router.v2, GigabitEth>

xuwc design

slide-46
SLIDE 46

Capabilities for Change Control

  • i. Changelog generation
  • ii. Measure trends
slide-47
SLIDE 47

Change Control Use Cases

Network Configuration Windows Machines Compare network configuration files in terms of high-level language constructs rather than lines. Compare a baseline Windows registry configuration against a production machine's registry [IEEE PECI 2012]. 80% of the machines (not including embedded systems) on the power grid are Windows Machines [Edmond Rogers 2012].

slide-48
SLIDE 48

Change Control -- Network Devices

Examples Current Approach

  • 1. Summarize how network configuration devices have changed
  • ver time relative to hierarchical network configuration

languages.

  • 2. View trends in how the network has changed over time at a

variety of levels of granularity. RANCID gives practitioners a line-level view of changes between consecutive versions of configuration files. ChangeGear and Remedy are ticketing systems that rely upon manual documentation that may be error prone or become

  • utdated.

Splunk and search-based approaches are not context-free and rely upon regular expressions to identify key/value pairs.

slide-49
SLIDE 49

Demonstration: Change logs at different levels

  • f abstraction via XUDiff.

interface Loopback0 description really cool description ip address 333.444.1.185 255.255.255.255 no ip unreachables ip pim sparse-dense-mode crypto map azalea ! interface GigabitEthernet4/2 description Core Network ip address 444.555.2.543 255.255.255.240 ip access-group outbound_filter in ip access-group inbound_filter out no ip redirects no ip unreachables no ip proxy-arp ! router.v1.example interface Loopback0 description really cool description ip address 333.444.1.581 255.255.255.255 no ip unreachables ip pim sparse-dense-mode crypto map daffodil ! interface GigabitEthernet4/2 description Core Network ip address 444.555.2.543 255.255.255.240 ip access-group outbound_filter in no ip redirects no ip unreachables no ip proxy-arp ip flow ingress ! router.v2.example

slide-50
SLIDE 50

xudiff design

parser for Cisco IOS router.v1.ios xudiff.py //ios:config router.v1.ios router.v2.ios Loopback0 v1 GigabitEthernet4/2 parser for Cisco IOS router.v2.ios Loopback0 v2 GigabitEthernet4/2 xudiff [--cost=<cost_function>] <xupath> <input_file1> <input_file2>

xudiff usage

slide-51
SLIDE 51

XUDiff uses the Zhang and Shasha Tree Edit Distance Algorithm. [Zhang and Shasha, 1989]

f d e a c b f c e d a b

Computes a Mapping (M) between nodes in tree 1 (T1) and tree 2 (T2). M has three properties:

  • 1. one-to-one
  • 2. sibling order

preserved

  • 3. ancestor order

preserved T1 T2 T1 and T2 must be ordered, labeled trees: sibling order is significant and the nodes have labels (e.g. 'a')

slide-52
SLIDE 52
  • 1. Motivation
  • 2. Theoretical Toolbox
  • 3. XUTools Capabilities
  • i. Baseline Configuration Development
  • ii. Change Control
  • 4. Ongoing Research
  • 5. Conclusions

Outline

slide-53
SLIDE 53

Project Activity in December 2012

12.5.12 Smart Grid Cybersecurity Info. Exchange 12.13.12 USENIX LISA 2012 12.17.12 Ph.D Thesis Defense 12.24.12 XUTools User Group

Juniper OS parser contributed (Egor)

slide-54
SLIDE 54

Conclusions

slide-55
SLIDE 55

Format/ Protocol+ Ops.+

Trans.+

Cust.+ Descrip7on+ Hierarchical+Data+ Model+ CIM$ X$ X$ Common$Informa,on$Model$

Yes+

Cisco$IOS$ X$ X$ Network$Configura,ons$

Yes+

C37.118$ X$ X$ PMU$Data$ DNP3$ X$ X$ X$ ESPIEXML$ X$ Green$BuIon$Energy$Usage$

Yes+

ICCP$ X$ X$ IEC$60870$ X$ IEC$61850$ X$ X$ X$ GOOSE/SCL$(IED)$

Yes+

Modbus$ X$ X$ X$ Windows$ Registries$ X$ X$ Windows$Configura,on$

Yes+

Our XUTools Operate on Hierarchical Object Models.

slide-56
SLIDE 56

Format/ Protocol+ Ops.+

Trans.+

Cust.+ XUTools+Applica8on+ CIM$ X$ X$ Process$CIM.$$Define$‘equivalence$classes’$between$ CIM$and$61850$structures.$$Use$this$to$compute$a$ common$communicaEons$interface$in$substaEons.$ Cisco$IOS$ X$ X$ Extend$analyses$for$network$configuraEon$ management.$ C37.118$ X$ X$ Parse$C37.118$from$different$IEDs.$ DNP3$ X$ X$ X$ Define$equivalence$classes$between$IEC$61850$and$ DNP3$structures.$$Use$this$to$compute$a$common$ communicaEons$interface$in$substaEons.$ IEC$61850$ X$ X$ X$ Compare$IED$ConfiguraEon$DescripEons$(ICD)$as$ defined$by$IEC$61850.$ Windows$ Registries$ X$ X$ Develop$and$compare$baseline$configuraEons$for$ Windows$machines$via$the$Windows$Registry.$$ Useful$for$NERC$CIP$010V1$[PECI$2012]$

Many possible future directions for XUTools...

slide-57
SLIDE 57

Our current XUTools capabilities are useful for both auditor and administrator.

capability provision vulnerability baseline configuration Inventory security primitives. Identify important security primitives. Changelog generation Change trends change control

CIP 010: Baseline configuration development CIP 004-5: Update network documentation within 30 days of a change. CIP 003-4: Change control and configuration management. NISTIR 7.2.18: Secure and validate field device settings. NISTIR 6.2.2.5: Inadequate change and configuration management. NISTIR 6.2.3.1: Inadequate periodic security audits.

slide-58
SLIDE 58

Thank You! Questions?

gweave01@cs.dartmouth.edu We have a mailing list!

www.xutools.net

slide-59
SLIDE 59

security primitive Cisco IOS implementation interface role interface

  • bject group

Practitioners may compute baseline network configuration relative to a language of security primitives.

How many security primitives are defined on a network device?

slide-60
SLIDE 60

xugrep design

slide-61
SLIDE 61

xugrep [-1] <xupath> <input_file>+

xugrep usage

xugrep //ios:interface/builtin:line router.v1.ios NEXT_STEPS PATH PRODUCTION STEP 2 8 7 3 1 PREDICATE PRODUCTION STEP 5 6 4 PREDICATE

xupath parse tree current corpus xupath query tree

IOS:CONFIG

xugrep arguments

slide-62
SLIDE 62

xugrep [-1] <xupath> <input_file>+

xugrep usage

xugrep //ios:interface/builtin:line router.v1.ios 2 8 7 3 1 5 6 4

xupath parse tree xupath query tree

IOS:CONFIG

current corpus

xugrep design

slide-63
SLIDE 63

xugrep [-1] <xupath> <input_file>+

xugrep usage

xugrep //ios:interface/builtin:line router.v1.ios 2 8 7 3 1 5 6 4

xupath parse tree xupath query tree

IOS:CONFIG IOS:INTERFACE IOS:INTERFACE

current corpus

  • ld corpus

xugrep design

slide-64
SLIDE 64

xugrep [-1] <xupath> <input_file>+

xugrep usage

xugrep //ios:interface/builtin:line router.v1.ios 2 8 7 3 1 5 6 4

xupath parse tree xupath query tree

IOS:CONFIG IOS:INTERFACE IOS:INTERFACE

current corpus

xugrep design

slide-65
SLIDE 65

xugrep [-1] <xupath> <input_file>+

xugrep usage

xugrep //ios:interface/builtin:line router.v1.ios 2 8 7 3 1 5 6 4

xupath parse tree xupath query tree

IOS:CONFIG IOS:INTERFACE IOS:INTERFACE LINE LINE LINE LINE ... ...

current corpus

  • ld corpus

xugrep design

slide-66
SLIDE 66

xuwc design

slide-67
SLIDE 67

Passage& Title& Descrip/on& 6.2.2.2$ Inadequate$Security$Policy$ Security$policies$must$be$well$prac:ced$ and$monitored$ 6.2.2.5$ Inadequate$Change$and$Configura:on$ Management$ Examples$include$failing$to$document$ changes,$misconfigura:ons$ 6.2.3.1$ Inadequate$Periodic$Security$Audits$ Audits$should$not$rely$exclusively$on$ interviews$with$sys$admins$ 6.3.1.10$ Logging$and$Audi:ng$Vulnerability$ Log$forging/injec:on$(CWEP117)$ Passage& Title& Descrip/on& 7.2.18$ Securing$and$Valida:ng$Field$Device$ SeVngs$ Ensure$seVngs$remain$the$same$as$ intended$in$the$config.$mgmt.$process$

slide-68
SLIDE 68

CIP$Passage$ Title$ Descrip1on$ 003#4% Change%Control%and%Configura3on% Management% Must%be%able%to%“iden3fy,%control,%and% document”%meaningful%changes% 004#5% Update%network%documenta3on% Update%documenta3on%within%60%days%of%a% change%to%the%network.% 010#1% Baseline%Configura3on% development%and%comparison% Must%be%able%to%compare%configura3ons% against%baseline%configura3ons.%