Critical Infrastructure Software Security: A Maritime Shipping - - PowerPoint PPT Presentation

critical infrastructure software security a maritime
SMART_READER_LITE
LIVE PREVIEW

Critical Infrastructure Software Security: A Maritime Shipping - - PowerPoint PPT Presentation

Critical Infrastructure Software Security: A Maritime Shipping Study Case Barton P. Miller Elisa Heymann Computer Sciences Department Computer Sciences Department University of Wisconsin University of Wisconsin Universitat Autnoma de


slide-1
SLIDE 1

Critical Infrastructure Software Security: A Maritime Shipping Study Case

Barton P. Miller

Computer Sciences Department University of Wisconsin bart@cs.wisc.edu

Elisa Heymann

Computer Sciences Department University of Wisconsin Universitat Autònoma de Barcelona elisa@cs.wisc.edu O’Reilly Velocity’18

  • Oct. 30-Nov. 2, 2018, London
slide-2
SLIDE 2

Context

Container terminals have a strong dependency

  • n software.

2

slide-3
SLIDE 3

Problem

  • Computer systems that control maritime

shipping are at risk due to the software they use.

  • The software has vulnerabilities, and is

therefore open to cyber-attacks.

  • Terminal Operating Systems (TOS) and

Port Community Systems (PCS) are especially critical.

  • The cost of a disruption is at least $1

billion/day and has a cascade effect.

3

slide-4
SLIDE 4

Good work in risk assessment, but …

  • It’s only a start.
  • We need to focus on the software systems

themselves (TOS, PCS).

  • Only through an in-depth assessment of

the software, can we be confident in its security. We are addressing that challenge!

4

slide-5
SLIDE 5

Our Work

  • We started an effort to perform an in-depth

vulnerability assessment of a TOS/PCS.

  • First and critical step: have a software

provider involved.

– Social and psychological challenges to recognize the problem. – Surprisingly, we were given access to all their software technology.

5

slide-6
SLIDE 6

How Did It Happen?

  • Our first observations,

6

slide-7
SLIDE 7

How Did It Happen?

  • Our first observations,

7

slide-8
SLIDE 8

How Did It Happen?

  • Our first observations,
  • … to false steps,
  • … to meetings with FEPORTS, Valencia,
  • … to meetings with NOATUM, Valencia,

8

slide-9
SLIDE 9

How Did It Happen?

  • … to meetings with NOATUM, Valencia,

9

slide-10
SLIDE 10

How Did It Happen?

  • Our first observations,
  • … to false steps,
  • … to meetings with FEPORTS, Valencia,
  • … to meetings with NOATUM, Valencia,
  • … to contacts with a software provider

and establishing trust,

  • … to having access to the software and

carrying out the actual assessment.

10

slide-11
SLIDE 11

What Did We Do?

Looked for vulnerabilities in the TOS/PCS What is a vulnerability?

“A vulnerability is a defect or weakness in system security procedures, design, implementation, or internal controls that can be exercised and result in a security breach or violation of security policy.”

  • Gary McGraw, Software Security

11

slide-12
SLIDE 12

What Did We Do?

We only cared about vulnerabilities we could exploit. What is an exploit?

“The process of attacking a vulnerability in a program is called exploiting.”

The Art of Software Security Assessment

12

slide-13
SLIDE 13
  • Assessed a couple of software modules

providing: Terminal Monitoring, Electronic Document Interchange (EDI) services, and movement of containers in the yard.

  • Web-based system providing interface to

current operation details of entire port, including gates, yards, ships, preadvice, containers, dangerous cargo, and related schedules and statuses.

What Did We Do?

13

slide-14
SLIDE 14
  • First Principles Vulnerability Assessment

(FPVA).

  • While this takes time and effort, it’s the
  • nly way to achieve strong security.
  • FPVA Focuses on critical assets.
  • Is not based on known vulnerabilities.

How Did We Do it?

14

slide-15
SLIDE 15

FPVA:

Step 1: Architectural Analysis Step 2: Resource Identification Step 3: Trust & Privilege Analysis Step 4: Component Evaluation Step 5: Dissemination of Results

How Did We Do it?

15

slide-16
SLIDE 16

How Did We Do it?

Request Response DB

Application Server Client Browser

16

slide-17
SLIDE 17

How Did We Do it?

Request Response DB

Application Server Client Browser Intercepting Proxy

Request Response to attack server

17

slide-18
SLIDE 18

There were problems in the software:

  • 1. HTTP traffic was not encrypted.
  • Session hijacking.
  • Password sniffing.
  • Observing the network traffic to gain info
  • f the port’s content without accessing

the system.

  • 2. Passwords were encrypted, not

hashed.

What Did We Find?

18

slide-19
SLIDE 19

Password/Traffic Sniffing

Login Request Response DB

Server Client Browser

username=administrator password=pa$$w0rD

Attacker

Unencrypted traffic visible to anyone on the network.

19

slide-20
SLIDE 20

Session Hijacking

Privileged Request Successful Response DB

Server Client Browser

SESSION=99A44E8D531427

Attacker

Successful Response Privileged Request SESSION=99A44E8D531427 Unencrypted traffic visible to anyone on the network.

20

slide-21
SLIDE 21

There were problems in the software:

  • 3. Improper access to the database due

to design issues, mostly validations

  • nly on the client side.
  • As a consequence any user could

change any other user’s password.

  • Trust boundary problem.
  • Design issues are expensive to fix.

What Did We Find?

21

slide-22
SLIDE 22

Trust Boundary Violation

DB

Server Client

  • Client is never to be trusted.
  • Client is easy to replace or

compromise.

  • Any validation, authorization, or

authentication on the client must be rechecked on the server.

Untrusted Client Trusted Server

22

slide-23
SLIDE 23

Trust Boundary Violation

... request.addParameter(“username", currentUser.getUserName()); request.addParameter("newPass“, form.getNewPasswordField()); httpClient.executeMethod(request); ...

Client Requests Password Change for Currently Authenticated User

... username = request.getAttribute("username"); newPass = request.getAttribute("newPass"); userDB.updateRowPassword(username, newPass); ...

Server Trusts the Username and Handles the Request

https://website.com/changePass username realUser admin newPass password1

Attacker Modifies Request Data

23

slide-24
SLIDE 24

There were problems in the software:

  • 4. Use of vulnerable old version of some

software frameworks.

  • Software supply chain issues: libraries,

underlying OS, compilers.

  • Tools like OWASP Dependency Check

and Sonatype‘s Application Health Check can help.

  • Dynamic dependences and updates

make this more difficult. Very hard issue.

What Did We Find?

24

slide-25
SLIDE 25

There were problems in the software:

  • 5. Users can modify and delete any files
  • n the server machine.
  • Intercept a legitimate file request, then

modify the request.

  • Improper validation allows path

traversals.

What Did We Find?

25

slide-26
SLIDE 26

The client specifies the name of a file for the server to delete

Without proper sanitation, the string ‘../’ will traverse out of the specified directory.

Directory Traversal

Delete File Request Successful Response DB

Server Client

file="../Users/some_admin/important.doc"

The server restricts file access to a specific directory by prepending that directory to the requested filename.

C:\safedir\ ../Users/some_admin/important.doc

26

slide-27
SLIDE 27

Directory Traversal

C:/ Program Files/ ProgramData/ safedir/ temp01.txt temp02.txt (...) Users/ some_admin/ important.doc Windows/

C:\safedir\ ../Users/some_admin/important.doc

27

slide-28
SLIDE 28
  • 1. Request:

file="../Users/some_admin/important.doc"

  • 2. Server deletes

C:\Users\some_admin\important.doc String path = request.getParameter("file"); // check for dir separators to prevent escape from safedir if(path.contains(java.io.File.separator)){ throw new PathTraversalException(path + “ is invalid.”); } path = “C:\\safedir\\" + path; File f = new File(path); f.delete(); Separators predefined:

  • n Windows

java.io.File.separator = "\\"

  • n Unix

java.io.File.separator = "/"

Java File() constructor adapts pathname to underlying OS.

Directory Traversal

slide-29
SLIDE 29
  • We suggested remediations to the

software provider.

  • We reviewed the code after the

remediations.

  • Several rounds of interactions were

needed to implement the right fixes.

  • They had an urgent need for training in

software assurance and secure

  • programming. Accomplished.

Then What?

29

slide-30
SLIDE 30

Closing Thoughts

  • The TOS and PCS are large and complex pieces
  • f software.
  • No one has previously carried out an in-depth

assessment of a TOS or PCS.

  • An in-depth vulnerability assessment of the TOS

and PCS is essential to prevent cyber-attacks.

  • The vulnerabilities are there. Who will exploit

them first?

  • The involvement of software providers is

essential.

30

slide-31
SLIDE 31

31

Questions?