Rule-based static analysis of network protocol implementations Octavian Udrea, Cristian Lumezanu, and Jeffrey S. Foster Usenix Security Symposium 2006.

Slides:



Advertisements
Similar presentations
Management Information Base for Version 2 of the Simple Network Management Protocol Presented by Zhou Ji (MIB for SNMPv2) By SNMPv2 Working Group.
Advertisements

CPSC 388 – Compiler Design and Construction
Exercise 1 Generics and Assignments. Language with Generics and Lots of Type Annotations Simple language with this syntax types:T ::= Int | Bool | T =>
CS412/413 Introduction to Compilers Radu Rugina Lecture 37: DU Chains and SSA Form 29 Apr 02.
Native x86 Decompilation Using Semantics-Preserving Structural Analysis and Iterative Control-Flow Structuring Edward J. Schwartz *, JongHyup Lee ✝, Maverick.
The Interface Definition Language for Fail-Safe C Kohei Suenaga, Yutaka Oiwa, Eijiro Sumii, Akinori Yonezawa University of Tokyko.
GATEKEEPER MOSTLY STATIC ENFORCEMENT OF SECURITY AND RELIABILITY PROPERTIES FOR JAVASCRIPT CODE Salvatore Guarnieri & Benjamin Livshits Presented by Michael.
1 Software Testing and Quality Assurance Lecture 13 - Planning for Testing (Chapter 3, A Practical Guide to Testing Object- Oriented Software)
Abhinn Kothari, 2009CS10172 Parth Jaiswal 2009CS10205 Group: 3 Supervisor : Huzur Saran.
Software Testing and Quality Assurance
SE 450 Software Processes & Product Metrics Reliability: An Introduction.
1 Control Flow Analysis Mooly Sagiv Tel Aviv University Textbook Chapter 3
Wresting Control from BGP: Scalable Fine-grained Route Control UCSD / AT&T Research Usenix —June 22, 2007 Dan Pei, Tom Scholl, Aman Shaikh, Alex C. Snoeren,
Data Flow Analysis Compiler Design October 5, 2004 These slides live on the Web. I obtained them from Jeff Foster and he said that he obtained.
Context-sensitive Analysis. Beyond Syntax There is a level of correctness that is deeper than grammar fie(a,b,c,d) int a, b, c, d; { … } fee() { int f[3],g[0],
Chapter Three THE RESEARCH PROCESS
BASE: Using Abstraction to Improve Fault Tolerance Rodrigo Rodrigues, Miguel Castro, and Barbara Liskov MIT Laboratory for Computer Science and Microsoft.
Unit 1 Protocols Learning Objectives: Understand the need to detect and correct errors in data transmission.
Swami NatarajanJuly 14, 2015 RIT Software Engineering Reliability: Introduction.
Detection and Resolution of Anomalies in Firewall Policy Rules
ISA–The Instrumentation, Systems, and Automation Society SP99 Work Group 2 TR#2 “Second Edition” Long Beach Meeting April 28, 2004.
 Question of Fact  Question of Belief  Question of Policy  (PP )
Supporting Strong Cache Coherency for Active Caches in Multi-Tier Data-Centers over InfiniBand S. Narravula, P. Balaji, K. Vaidyanathan, S. Krishnamoorthy,
Modern Concurrency Abstractions for C# by Nick Benton, Luca Cardelli & C´EDRIC FOURNET Microsoft Research.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
An anti-hacking guide.  Hackers are kindred of expert programmers who believe in freedom and spirit of mutual help. They are not malicious. They may.
VEX: VETTING BROWSER EXTENSIONS FOR SECURITY VULNERABILITIES XIANG PAN.
Secure Web Applications via Automatic Partitioning Stephen Chong, Jed Liu, Andrew C. Meyers, Xin Qi, K. Vikram, Lantian Zheng, Xin Zheng. Cornell University.
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
Recursive Descent Parsing for XML Developers Roger L. Costello 15 October
Weaponizing Wireless Networks: An Attack Tool for Launching Attacks against Sensor Networks Thanassis Giannetsos Tassos Dimitriou Neeli R. Prasad.
Flow-Augmented Call Graph: A New Foundation for Taming API Complexity Qirun Zhang
When In-Network Processing Meets Time: Complexity and Effects of Joint Optimization in Wireless Sensor Networks Department of Computer Science, Wayne State.
Bug Localization with Machine Learning Techniques Wujie Zheng
1 ISAT 252: Analytical Methods IV Knowledge-Based Systems (KBS) and Declarative Programming KBS development and KBSDT Details Reading Assignment: Corvid.
Branch Regulation: Low-Overhead Protection from Code Reuse Attacks.
Dynamic Source Routing in ad hoc wireless networks Alexander Stojanovic IST Lisabon 1.
Java Coding Standards and Best Practices Coding Standards Introduction: After completing this chapter, you will able to keep your code up to standards.
First BlueJ Day Houston, 2006 Unit Testing with BlueJ Bruce Quig Deakin University.
NAME Evaluation Report Name of author(s) Name of institution Year.
Measuring Relative Attack Surfaces Michael Howard, Jon Pincus & Jeannette Wing Presented by Bert Bruce.
Presented by: Ashgan Fararooy Referenced Papers and Related Work on:
Management Information Base for Version 2 of the Simple Network Management Protocol (MIB for SNMPv2)
DETECTING TARGETED ATTACKS USING SHADOW HONEYPOTS AUTHORS: K. G. Anagnostakisy, S. Sidiroglouz, P. Akritidis, K. Xinidis, E. Markatos, A. D. Keromytisz.
1 Typing XQuery WANG Zhen (Selina) Something about the Internship Group Name: PROTHEO, Inria, France Research: Rewriting and strategies, Constraints,
Bug Localization with Association Rule Mining Wujie Zheng
1 RealProct: Reliable Protocol Conformance Testing with Real Nodes for Wireless Sensor Networks Junjie Xiong, Edith C.-Ngai, Yangfan Zhou, Michael R. Lyu.
ICOS BOF EAP Applicability Bernard Aboba IETF 62, Minneapolis, MN.
Introduction Problem Statement Research Goals Conclusion Contact / More Information { shimin, ltahvild Componentizing legacy system.
CS536 Types 1. Roadmap Back from our LR Parsing Detour Name analysis – Static v dynamic – Scope Today – Type checking 2 Scanner Parser Tokens Semantic.
Applicability Analysis of Software Testing for Actual Operating Railway Software Jong-Gyu Hwang 1, Hyun-Jeong Jo 1, Baek-Hyun Kim 1, Jong-Hyun Baek 1 1.
Building Security In January 2009 Workshop Harry Hochheiser, Building Security In: January 2009 Workshop Harry Hochheiser Towson.
Real-Time Streaming Protocol draft-ietf-mmusic-rfc2326bis-01.txt Magnus Westerlund.
CS412/413 Introduction to Compilers Radu Rugina Lecture 18: Control Flow Graphs 29 Feb 02.
I NTRUSION P REVENTION S YSTEM (IPS). O UTLINE Introduction Objectives IPS’s Detection methods Classifications IPS vs. IDS IPS vs. Firewall.
Speaker:Chiang Hong-Ren An Investigation and Implementation of Botnet Detection Schemes.
Biological Model Engineering Peter Saffrey, Department of Medicine Cakes Talk Monday, October 20, 2008.
McGraw-Hill/Irwin © 2003 The McGraw-Hill Companies, Inc.,All Rights Reserved. Part One INTRODUCTION TO BUSINESS RESEARCH.
Part One INTRODUCTION TO BUSINESS RESEARCH
CSCE 313 Network Socket MP8 DUE: FRI MAY 5, 2017
Automatic Network Protocol Analysis
High Coverage Detection of Input-Related Security Faults
Outline Announcements Fault Tolerance.
RealProct: Reliable Protocol Conformance Testing with Real Nodes for Wireless Sensor Networks Junjie Xiong
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
BugHint: A Visual Debugger Based on Graph Mining
Teaching with angr: A Symbolic Execution Curriculum and CTF
Building a Game in Scratch
IntScope: Automatically Detecting Integer overflow vulnerability in X86 Binary Using Symbolic Execution Tielei Wang, TaoWei, ZhingiangLin, weiZou Purdue.
1 Chapter 8: Introduction to Hypothesis Testing. 2 Hypothesis Testing The general goal of a hypothesis test is to rule out chance (sampling error) as.
Presentation transcript:

Rule-based static analysis of network protocol implementations Octavian Udrea, Cristian Lumezanu, and Jeffrey S. Foster Usenix Security Symposium 2006 Speaker: Chang Huan Wu 2008/10/29

2 Outline Introduction Rule-Based Protocol Specification Analysis of Protocol Source Code Experiment Results Conclusions

3 Introduction - Motivation Network protocols must be reliable and secure – Most works focuses on abstract protocols – Implementation can introduce vulnerabilities Goal: Check that implementations match specifications

4 Introduction - Architecture

5 Rule-Based Protocol Specification A simple protocol 0. int main(void) { 1. int sock, val = 1, recval; 2. send(sock, &val, sizeof(int)); 3. while(1) { 4. recv(sock, &recval, sizeof(int)); 5. if (recval == val) 6. val += 2; 7. send(sock, &val, sizeof(int)); 8. } 9. } 1. Start by sending n = 1 2. If n is received, send n Otherwise resend n

6 Rule-Based Protocol Specification Developed rules from specification document such as an RFC or IETF standard Ex. (2) means “ if recv in, and in equals n, then we have to send out, which is in’s value plus 1, and we change current state by setting n:= out ” n: ghost variable, representing protocol state

7 Analysis of Protocol Source Code Construct a control-flow graph (CFG) from the program source code Each statement forms a node, and there is an edge from s 1 to s 2 if statement s 1 occurs immediately before statement s 2

8 Analysis – Rule 1 (1/3) Ø (empty hypothesis) => send(_, out, _) out[0..3] = 1 n := 1 Fact: {} (Matches the empty hypothesis)

9 Analysis – Rule 1 (2/3) Ø (empty hypothesis) => send(_, out, _) out[0..3] = 1 n := 1 Fact: {val = 1}

10 Analysis – Rule 1 (3/3) Ø (empty hypothesis) => send(_, out, _) out[0..3] = 1 n := 1 Fact: {val = 1, out = &val} Show: Fact → (out[0..3] = 1) Action: n := 1

11 Analysis – Rule 3 (1/3) recv(_, in, _) in[0..3] ≠ n => send(_, out, _) out[0..3] = n Fact: {val = 1, n = 1, in = &recval, in[0..3] ≠ n}

12 Analysis – Rule 3 (2/3) recv(_, in, _) in[0..3] ≠ n => send(_, out, _) out[0..3] = n Fact: {val = 1, n = 1, in = &recval, in[0..3] ≠ n, recval ≠ val}

13 Analysis – Rule 3 (3/3) recv(_, in, _) in[0..3] ≠ n => send(_, out, _) out[0..3] = n Fact: {val = 1, n = 1, in = &recval, in[0..3] ≠ n, recval ≠ val, out = &val} Show: Fact → (out[0..3] = n)

14 Analysis – Rule 2 (1/4) recv(_, in, _) in[0..3] = n => send(_, out, _) out[0..3] = n Fact: {val = 1, n = 1, in = &recval, in[0..3] = n}

15 Analysis – Rule 2 (2/4) recv(_, in, _) in[0..3] = n => send(_, out, _) out[0..3] = n Fact: {val = 1, n = 1, in = &recval, in[0..3] = n, recval = val}

16 Analysis – Rule 2 (3/4) recv(_, in, _) in[0..3] = n => send(_, out, _) out[0..3] = n Fact: {val = 3, n = 1, in = &recval, in[0..3] = n, recval = val}

17 Analysis – Rule 2 (4/4) recv(_, in, _) in[0..3] = n => send(_, out, _) out[0..3] = n Fact: {val = 3, n = 1, in = &recval, in[0..3] = n, recval = val, out = &val} Show: Fact → (out[0..3] = in[0..3] +1) Fail!!!

18 Experiment Results (1/3) Evaluated Pistachio by analyzing the LSH implementation of SSH2 and the RCP implementation from Cygwin’s package Chose these systems because of their extensive bug databases and the number of different versions available

19 Experiment Results (2/3) 96 rules for SSH2 58 rules for RCP

20 Experiment Results (3/3) Add some rules that is strongly recommended but not required by specification 9 new for LSH, 7 new for RCP

21 Sample compatibility bug Spec: reply to every version In LSH version 0.2.9

22 Sample functionality bug Spec: can’t use “none” method In LSH version 0.1.3

23 Sample buffer overflow strcpy() is not safe In LSH version 0.9.1

24 Conclusion Defined a rule-based method for the specification of network protocols which closely mimics protocol descriptions in RFC or similar documents Shown how static analysis techniques can be employed in checking protocol implementations against the rule-based specification

25 Comments It is important that network protocols must be reliable and secure Can only handle rule violation False-positive rate is kind of high