Topics in Information Security, Prof. Avishai Wool Ohad Ben-Cohen ohadbc at eng.tau.ac.il Ohad Ben-Cohen ohadbc at eng.tau.ac.il Intrusion Detection via.

Slides:



Advertisements
Similar presentations
Artemis: Practical Runtime Monitoring of Applications for Execution Anomalies Long Fei and Samuel P. Midkiff School of Electrical and Computer Engineering.
Advertisements

Runtime Techniques for Efficient and Reliable Program Execution Harry Xu CS 295 Winter 2012.
HARDWARE SOFTWARE PARTITIONING AND CO-DESIGN PRINCIPLES MADHUMITA RAMESH BABU SUDHI PROCH 1/37.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
Design of a Framework for Testing Security Mechanisms for Program-Based Attacks Ben “Security” Breech and Lori Pollock University of Delaware.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
TaintCheck and LockSet LBA Reading Group Presentation by Shimin Chen.
1 Chapter 7: Runtime Environments. int * larger (int a, int b) { if (a > b) return &a; //wrong else return &b; //wrong } int * larger (int *a, int *b)
Security Protection and Checking in Embedded System Integration Against Buffer Overflow Attacks Zili Shao, Chun Xue, Qingfeng Zhuge, Edwin H.-M. Sha International.
Anomaly Detection Using Call Stack Information Security Reading Group July 2, 2004 Henry Feng, Oleg Kolesnikov, Prahlad Fogla, Wenke Lee, Weibo Gong Presenter:
KB-IDS. Academic Advisor: Dr. Yuval Elovici Technical Advisor: Asaf Shabtai Team Members: Eliya Rahamim Elad Ankry Uri Kanonov.
Signal Signal : - is a notification sent to a process to notify it of some event - interrupts whatever the process is doing and force it to handle a signal.
Overview of program analysis Mooly Sagiv html://
Testing Static Analysis Tools using Exploitable Buffer Overflows from Open Source Code Zitser, Lippmann & Leek Presented by: José Troche.
Alleviating False Alarm Problem of Static Buffer Overflow Analysis Youil Kim
Security Exploiting Overflows. Introduction r See the following link for more info: operating-systems-and-applications-in-
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
Today’s Topics Introducing process: the basic mechanism for concurrent programming –Process management related system calls Process creation Process termination.
C questions A great programmer codes excellent code in C and Java. The code does video decoding. Java code works faster then C on my computer. how come?
Computer Science Detecting Memory Access Errors via Illegal Write Monitoring Ongoing Research by Emre Can Sezer.
Operating Systems Chapter 2
Watching Software Run Brian ChessNov 18, Success is foreseeing failure. – Henry Petroski.
WHEN GOOD CODE GOES BAD! A SHOWCASE OF MODERN PROGRAMMING MISHAPS (SensePost 2006)
Concurrent Programming. Concurrency  Concurrency means for a program to have multiple paths of execution running at (almost) the same time. Examples:
Kyushu University Koji Inoue ICECS'061 Supporting A Dynamic Program Signature: An Intrusion Detection Framework for Microprocessors Koji Inoue Department.
Retroactive Auditing Xi Wang Nickolai Zeldovich Frans Kaashoek MIT CSAIL.
Exception Compiler Baojian Hua
Static Program Analysis of Embedded Software Ramakrishnan Venkitaraman Graduate Student, Computer Science Advisor: Dr. Gopal Gupta
Exception Compiler Baojian Hua
Highly Scalable Distributed Dataflow Analysis Joseph L. Greathouse Advanced Computer Architecture Laboratory University of Michigan Chelsea LeBlancTodd.
An Undergraduate Course on Software Bug Detection Tools and Techniques Eric Larson Seattle University March 3, 2006.
What is exactly Exploit writing?  Writing a piece of code which is capable of exploit the vulnerability in the target software.
Abstract Data Type (ADT) – visit 3/4 1.'is_mem_av()' Semantics Definitions: none, strong and weak semantics ULz data type and sketch of data structure,
PA3: Improving Performance with I/O Multiplexing Part 1-1: Nov. 7, Part 1-2: Nov. 10 Part 2-1: Nov. 17, Part 2-2: Nov.20.
Shellcode Development -Femi Oloyede -Pallavi Murudkar.
Chapter 1: Fundamental of Testing Systems Testing & Evaluation (MNN1063)
Protecting C Programs from Attacks via Invalid Pointer Dereferences Suan Hsi Yong, Susan Horwitz University of Wisconsin – Madison.
String Analysis for Binaries Mihai Christodorescu Nicholas Kidd Wen-Han Goh University of Wisconsin, Madison.
Sampling Dynamic Dataflow Analyses Joseph L. Greathouse Advanced Computer Architecture Laboratory University of Michigan University of British Columbia.
A Survey on Runtime Smashed Stack Detection 坂井研究室 M 豊島隆志.
Information Security - 2. A Stack Frame. Pushed to stack on function CALL The return address is copied to the CPU Instruction Pointer when the function.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 11, 2011.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Tarek Abdelzaher Vikram Adve CS241 Systems Programming System Calls and I/O.
RPC Model, Stubs and Skeletons Divya Nampalli
MOPS: an Infrastructure for Examining Security Properties of Software Authors Hao Chen and David Wagner Appears in ACM Conference on Computer and Communications.
1988 Morris Worm … estimated 10% penetration 2001 Code Red … 300,00 computers breached 2003 Slammer/Sapphire … 75,00 infections in 10 min Zotob …
1988 Morris Worm … estimated 10% penetration 2001 Code Red … 300,00 computers breached 2003 Slammer/Sapphire … 75,00 infections in 10 min Zotob …
CS241 Systems Programming Discussion Section Week 2 Original slides by: Stephen Kloder.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
String Analysis for Binaries Mihai Christodorescu Nicholas Kidd Wen-Han Goh
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Recitation 7 – 3/18/02 Outline fork and scheduling Signals
Path-Based Fault Correlations
Lazy Preemption to Enable Path-Based Analysis of Interrupt-Driven Code
  Performance Pitfalls in Large-Scale Java Applications Translated from COBOL Toshio Suganuma Toshiaki Yasue Tamiya Onodera Toshio Nakatani Presented.
APEx: Automated Inference of Error Specifications for C APIs
Seminar in automatic tools for analyzing programs with dynamic memory
Ik-Soon Kim December 18, 2010 Embedded Software Platform Team
CS 465 Buffer Overflow Slides by Kent Seamons and Tim van der Horst
Mock Object Creation for Test Factoring
CSE451 Fall 2008 Section 1 Roxana Geambasu
CS703 - Advanced Operating Systems
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
GSM Global System for Mobile Communications, 1992
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
C. M. Overstreet Old Dominion University Spring 2006
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
MOPS: an Infrastructure for Examining Security Properties of Software
C. M. Overstreet Old Dominion University Fall 2007
Sampling Dynamic Dataflow Analyses
Presentation transcript:

Topics in Information Security, Prof. Avishai Wool Ohad Ben-Cohen ohadbc at eng.tau.ac.il Ohad Ben-Cohen ohadbc at eng.tau.ac.il Intrusion Detection via Static Analysis Intrusion Detection via Static Analysis

Topics in Information Security, Prof. Avishai Wool Based on

Topics in Information Security, Prof. Avishai Wool void sayhi(char *param) { char buf[96]; printf(“what’s u’r name?”); gets(buf); printf(“hi %s!\n”, buf); } What’s Wrong ?

Topics in Information Security, Prof. Avishai Wool Buffer Overflow

Topics in Information Security, Prof. Avishai Wool char buf[96]; printf(“what’s u’r name?”); gets(buf); printf(“hi %s!\n”, buf); exit(0); bad. /* evil code */ execve(“/bin/sh”); /* evil code */ execve(“/bin/sh”);

Topics in Information Security, Prof. Avishai Wool Model of Behaviour Rule Based or Observations Monitor and Alarm! AI  Statistical Statistical  False Positives HIDS by System Calls (k=1) Model of Behaviour Rule Based or Observations Monitor and Alarm! AI  Statistical Statistical  False Positives HIDS by System Calls (k=1) Intrusion Detection ?

Topics in Information Security, Prof. Avishai Wool char buf[96]; printf(“what’s u’r name?”); gets(buf); printf(“hi %s!\n”, buf); exit(0); Example 1 OK !

Topics in Information Security, Prof. Avishai Wool fd = open(“/etc/passwd”); if(time() < YEAR2009) read(fd, buf, 50); else write(fd,”new-user”); close(fd); Example 2 False Positive

Topics in Information Security, Prof. Avishai Wool char buf[50]; if(!fork()) execve(“stam_job”); gets(buf); printf(“got %s\n”, buf); exit(0); Example 3 False Negative

Topics in Information Security, Prof. Avishai Wool i = read(fd, buf, 50); if(i == 50) { write(fd, buf, 50); } close(fd); read write close Solution (four of them, not exactly) 1. Build a syscall Graph (NDFA) 2. Monitor syscalls 3. Kill if diverges 2. Monitor syscalls 3. Kill if diverges

Topics in Information Security, Prof. Avishai Wool Need source code Static, not Statistical  0 false positives ! may have false negatives Large branching factor…  Tough computations Need source code Static, not Statistical  0 false positives ! may have false negatives Large branching factor…  Tough computations Result

Topics in Information Security, Prof. Avishai Wool i = read(fd, buf, 50); func(); write(fd, buf, 50); func(); close(fd); read write close Functions func(): gettimeofday(); settimeofday(); gettimeofday settimeofday

Topics in Information Security, Prof. Avishai Wool i = read(fd, buf, 50); func(); write(fd, buf, 50); func(); close(fd); read write close Impossible Paths ! func(): gettimeofday(); settimeofday(); gettimeofday settimeofday

Topics in Information Security, Prof. Avishai Wool i = read(fd, buf, 50); func(); write(fd, buf, 50); func(); close(fd); context free grammar func(): gettimeofday(); settimeofday(); read write close gettimeofday settimeofday stack

Topics in Information Security, Prof. Avishai Wool (*func)(); Signals setjmp(); libraries dynamic linking Threads, execve()s (*func)(); Signals setjmp(); libraries dynamic linking Threads, execve()s Real World Problems

Topics in Information Security, Prof. Avishai Wool i = read(fd, buf, 50); (*func)(); close(fd); read close Function Pointers A()B()C()

Topics in Information Security, Prof. Avishai Wool signal(i, handlerA); signal(j, handlerB); signal(k, handlerC); i = read(fd, buf, 50); close(fd); read close Signals handlerA()handlerB()handlerC()

Topics in Information Security, Prof. Avishai Wool i = read(fd, buf, 50); close(fd); read close Signals handlerA()handlerB()handlerC()

Topics in Information Security, Prof. Avishai Wool setjmp(x); i = read(fd, buf, 50); setjmp(y); close(fd); longjmp(?); read close setjmp/longjmp x-statey-state

Topics in Information Security, Prof. Avishai Wool Graphs via gcc+manual fixes Used Java Framework (JIT) Heavy computational task Stop if Latencies > 1 hour Ignored common sys calls Analyze Parameters, too Graphs via gcc+manual fixes Used Java Framework (JIT) Heavy computational task Stop if Latencies > 1 hour Ignored common sys calls Analyze Parameters, too Experiments

Topics in Information Security, Prof. Avishai Wool Experiments

Topics in Information Security, Prof. Avishai Wool One Model Per App Small branchings  Precise Precise  no impossible paths Mimicry Attacks Precise Models too Expensive Jave framework too slow Failed to run Precise Models One Model Per App Small branchings  Precise Precise  no impossible paths Mimicry Attacks Precise Models too Expensive Jave framework too slow Failed to run Precise Models Conclusions

Topics in Information Security, Prof. Avishai Wool The End

Topics in Information Security, Prof. Avishai Wool begin: fd = open(“file”); while(1) { i = read(fd, buf, 50); if(i) goto begin; } exit(0); open read exit 1. what is the correct callgraph ? open read exit open read exit open read exit a) b) c) d) HomeWork

Topics in Information Security, Prof. Avishai Wool 2.What is IDA Pro ? 3.What are the sketches that make the background of this presentation ? any idea how were they created ? 4.Do you think Snort (see Elad’d hw) has 0 false positives like the paper claims to achieve ? 5.Bonus: which movie were the two swords in the background taken from ? HW – cont. (tip: all answers are short!) HW – cont. (tip: all answers are short!)