Specification-Based Verification and Testing of Internet Protocols. David Nowak and Yutaka Oiwa RCIS, AIST

Similar documents
Verifying security protocols using theorem provers

Network Security Part II: Standards

Binding Security Tokens to TLS Channels. A. Langley, Google Inc. D. Balfanz, Google Inc. A. Popov, Microsoft Corp.

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

Communication Systems SSL

Specification and Analysis of Contracts Lecture 1 Introduction

Protocol Rollback and Network Security

Authenticity of Public Keys

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Secure Socket Layer (SSL) and Trnasport Layer Security (TLS)

, SNMP, Securing the Web: SSL

Software Defined Networking

Announcement. Final exam: Wed, June 9, 9:30-11:18 Scope: materials after RSA (but you need to know RSA) Open books, open notes. Calculators allowed.

CSC Network Security

CSC 474 Information Systems Security

TLS and SRTP for Skype Connect. Technical Datasheet

SECURE SOCKETS LAYER (SSL)

Outline. Transport Layer Security (TLS) Security Protocols (bmevihim132)

Web Security Considerations

Lecture 7: Transport Level Security SSL/TLS. Course Admin

Chapter 17. Transport-Level Security

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

Network Fundamentals Carnegie Mellon University

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

ISM/ISC Middleware Module

Overview. SSL Cryptography Overview CHAPTER 1

Timing,... in Firewall Testing

Layering a computing infrastructure. Middleware. The new infrastructure: middleware. Spanning layer. Middleware objectives. The new infrastructure

Network Security Web Security and SSL/TLS. Angelos Keromytis Columbia University

Communication Security for Applications

Software Engineering 4C03 Research Project. An Overview of Secure Transmission on the World Wide Web. Sean MacDonald

Making your web application. White paper - August secure

Secure Socket Layer/ Transport Layer Security (SSL/TLS)

Programming with cryptography

Security Engineering Part III Network Security. Security Protocols (I): SSL/TLS

The Secure Sockets Layer (SSL)

TLS-RSA-PSK. Channel Binding using Transport Layer Security with Pre Shared Keys

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

MatrixSSL Developer s Guide

Web Security: SSL/TLS

Master of Science in Computer Science

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

Secure Software Programming and Vulnerability Analysis

Network Security Essentials Chapter 5

PHOENIX: SECURE FILE TRANSFER USING SSL

Doctor of Philosophy in Computer Science

Introducing Formal Methods. Software Engineering and Formal Methods

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Information Security

A Link Layer Discovery Protocol Fuzzer

Computer and Network Security

Secure Sockets Layer

Learning Network Security with SSL The OpenSSL Way

Recent (2014) vulnerabilities in SSL implementations. Leiden University. The university to discover.

SSL Secure Socket Layer

Chapter 7 Transport-Level Security

Low-Level TLS Hacking

Lecture 31 SSL. SSL: Secure Socket Layer. History SSL SSL. Security April 13, 2005

Secure Sockets Layer (SSL) / Transport Layer Security (TLS)

The Beautiful Features of SSL And Why You Want to Use Them?

Overview SSL/TLS HTTPS SSH. TLS Protocol Architecture TLS Handshake Protocol TLS Record Protocol. SSH Protocol Architecture SSH Transport Protocol

Lab 7. Answer. Figure 1

SSL Secure Socket Layer

Transport Layer Security Protocols

SSL/TLS. What Layer? History. SSL vs. IPsec. SSL Architecture. SSL Architecture. IT443 Network Security Administration Instructor: Bo Sheng

Achilles Assurance Platform. Dr. Nate Kube Founder / CTO Wurldtech

Vulnerabilità dei protocolli SSL/TLS

Transport Level Security

TLS/SSL in distributed systems. Eugen Babinciuc

Other VPNs TLS/SSL, PPTP, L2TP. Advanced Computer Networks SS2005 Jürgen Häuselhofer

Smart Card support Embedded Within OpenSSL to Secure Virtual Machines

Security. Learning Objectives. This module will help you...

Extraction of certified programs with effects from proofs with monadic types in Coq

Today s Topics SSL/TLS. Certification Authorities VPN. Server Certificates Client Certificates. Trust Registration Authorities

Formal Verification and Linear-time Model Checking

Assertion Synthesis Enabling Assertion-Based Verification For Simulation, Formal and Emulation Flows

Mobile IP Part I: IPv4

Project 4: IP over DNS Due: 11:59 PM, Dec 14, 2015

Practical Invalid Curve Attacks on TLS-ECDH

Network Access Control and Cloud Security

Cryptography and Network Security Sicurezza delle reti e dei sistemi informatici SSL/TSL

SSL: Secure Socket Layer

Security Protocols and Infrastructures. h_da, Winter Term 2011/2012

XPROBE-NG. What s new with upcoming version of the tool. Fyodor Yarochkin Armorize Technologies

Inductive Analysis of Security Protocols in Isabelle/HOL with Applications to Electronic Voting

Cryptography and Network Security IPSEC

Network Access Control and Cloud Security

Spirent Abacus. SIP over TLS Test 编 号 版 本 修 改 时 间 说 明

Project 3, Fall 2001 Stateful Functionality in IP Layer Out: Thursday, November 1, 2001 Due: Tuesday, December 4, 2001

Secure Socket Layer. Security Threat Classifications

Overview of SSL. Outline. CSC/ECE 574 Computer and Network Security. Reminder: What Layer? Protocols. SSL Architecture

Foundational Proof Certificates

T Cryptography and Data Security

The CompCert verified C compiler

Scalable Extraction, Aggregation, and Response to Network Intelligence

Verifying Specifications with Proof Scores in CafeOBJ

HW/Lab 3: SSL/TLS. CS 336/536: Computer Network Security DUE 11am on Nov 16 (Monday)

Network Security Protocols

Transcription:

Specification-Based Verification and Testing of Internet Protocols David Nowak and Yutaka Oiwa RCIS, AIST

Summary A research project funded by NICT From October 2010 to March 2013 (Jointly with Lepidum, Inc.) Objective: Design a methodology to certify implementation of Internet protocols Leader: Etsuya Shibayama (AIST & The University of Tokyo) AIST Participants: Reynald Affeldt (AIST) David Nowak (AIST) Yutaka Oiwa (AIST) Kuniyasu Suzaki (AIST)

Complementarity of formal verification and testing We combine theorem proving and testing. Technique Proof Assistant Mathematical proof Model checking Abstraction, State-space exploration Result Correctness proof Correctness proof, Bug discovery Object Source code Abstracted source code Testing Sampling Bug discovery Runtime behavior Scalability Low Medium High Expressivity High (Higher-order logic) Low (Temporal logic) Medium

Overview of the project RFC in English Formalization Specification in Coq of packets parsing and printing Certified Implem. in C Protocol Interpreter Executable specification Test-case generation, fuzzing, coverage analysis, rollback Derivation data control Virtual Machine Implem. (runtime image) rollback, fault injection

Case study: TLS A cryptographic layer on top of existing communication protocols TLS Handshake Alert Change Cipher Spec Application Data Record TCP IP

Overview of the project RFC in English Formalization Specification in Coq of packets parsing and printing Certified Implem. in C Protocol Interpreter Executable specification Test-case generation, fuzzing, coverage analysis, rollback Derivation data control Virtual Machine Implem. (runtime image) rollback, fault injection

Data-dependent parsing for TLS To specify TLS packets, there is a need for dependent types. Example: Record Handshake : Set := { msg_type : HandshakeType ; body : HandshakeType_type msg_type }. We also need dependent types to parse variable-length packets. x y 256*x + y We will use dependent types available in the proof assistant Coq.

Parsing monad A monad is an abstract data type that allows to embed imperative features in a purely functional language (like Coq). Definition state : Type := in_channel * out_channel * nat. Definition parser (A:Type) : Type := state -> exception (A * state). Definition ret {A:Type}(a:A) : parser A := fun s => value (a,s). Definition bind {A B:Type}(p:parser A)(f:A -> parser B) : parser B := fun s => match p s with value (a,s') => f a s' error msg => error msg end.

Dependent parsing monad For data-dependent parsing, we need a dependently typed bind: Definition bind_dep {A:Type}{B:A->Type}(p:parser A)(f:forall a:a, parser (B a)) : parser {a:a & B a} := fun s => match p s with value (a,s') => match f a s' with value (b, s'') => value (existt (fun a => B a) a b, s'') error msg => error msg end error msg => error msg end.

Example: parsing handshake packets We parse in order the packet s type, its length and its body: Definition parse_handshake' : parser {ht : HandshakeType & HandshakeType_type ht} := bind_dep parse_handshaketype ( fun ht => len <<= parse_z 3 ; match ht return parser (HandshakeType_type ht) with hello_request => parse_exact (Zabs_nat len) parse_hellorequest client_hello => parse_exact (Zabs_nat len) parse_clienthello server_hello => parse_exact (Zabs_nat len) parse_serverhello certificate => parse_exact (Zabs_nat len) parse_certificate server_hello_done => parse_exact (Zabs_nat len) parse_serverhellodone end ). Definition parse_handshake : parser Handshake := h <<= parse_handshake' ; ret { msg_type := projt1 h ; body := projt2 h }.

Parsing/Printing monad In some sense, they are inverse to each other. Parsers and printers are often implemented separately. Redundancy Potential inconsistency We will use invertible syntax descriptions: a monadic approach that unifies parsing and printing

Overview of the project RFC in English Formalization Machine-readable, Human-readable specification Certified Implem. in C Derivation Protocol Interpreter Executable specification Test-case generation, fuzzing, coverage analysis, rollback data control Virtual Machine Implem. (runtime image) rollback, fault injection

Roadmap of the following parts: To design a specification language that is: Precise enough to extract parsing/encoding programs automatically Parsing part done in work in the the previous slides This Coq work shows us how to do theoretic things here, very precisely! Type design, dependent types, etc If it can be done in Coq, we can do it anywhere :-) Human-friendly enough to be read as document Add some human-friendly nuts where needed E.g. BNF, state machine description, etc Add hints for fuzzing in the next stage

Roadmap of the following parts: Extract correct testing program (reference impl.) from the specification Just interprets the input specification Derive incorrect testing program, too Mix the fuzzings with the extracted program E.g. trailing garbage, data overrun, incorrect input for case branches Needs more hints in the input specification than above

Roadmap of the following parts: Build a black-box test program Talk with black-box test targets Non-deterministically choose several correct or incorrect behaviors on the fly Use program rollback to trace all possible cases to see what happens Test all correct and incorrect cases thoroughly Use VM to rollback execution of target program

Roadmap of the following parts: (Rough) Plans FY2010: explore design choices in Coq See what will be needed to model parsing problems FY2011: Design spec language for correct cases Auto-extract testing program from the spec Build a test-bed system for black-box testing FY2012: testing incorrect cases Add fuzzing hints to the language Integrates with VM roll-back control