Transparent Monitoring of a Process Self in a Virtual Environment



Similar documents
Intrusion Detection via Static Analysis

How to Sandbox IIS Automatically without 0 False Positive and Negative

Security and Integrity of a Distributed File Storage in a Virtual Environment

x86 ISA Modifications to support Virtual Machines

Building accurate intrusion detection systems. Diego Zamboni Global Security Analysis Lab IBM Zürich Research Laboratory

Intrusion Detection via Static Analysis

CMSC 421, Operating Systems. Fall Security. URL: Dr. Kalpakis

Security Management of Cloud-Native Applications. Presented By: Rohit Sharma MSc in Dependable Software Systems (DESEM)

Korset: Code-based Intrusion Detection for Linux

Securing software by enforcing data-flow integrity

Application Intrusion Detection

Distributed System Monitoring and Failure Diagnosis using Cooperative Virtual Backdoors

End to End Defense against Rootkits in Cloud Environment. Design- Part 2

Compromise-as-a-Service

Automating Mimicry Attacks Using Static Binary Analysis

COS 318: Operating Systems. Virtual Machine Monitors

I Control Your Code Attack Vectors Through the Eyes of Software-based Fault Isolation. Mathias Payer, ETH Zurich

Hands-on Hacking Unlimited

Secure In-VM Monitoring Using Hardware Virtualization

How to Automatically and Accurately Sandbox Microsoft IIS

Chapter 15 Operating System Security

POMPDs Make Better Hackers: Accounting for Uncertainty in Penetration Testing. By: Chris Abbott

Eugene Tsyrklevich. Ozone HIPS: Unbreakable Windows

Lecture 17: Mobile Computing Platforms: Android. Mythili Vutukuru CS 653 Spring 2014 March 24, Monday

Implementing Large-Scale Autonomic Server Monitoring Using Process Query Systems. Christopher Roblee Vincent Berk George Cybenko

CSC574 - Computer and Network Security Module: Intrusion Detection

Operating System Structures

Architecture of the Kernel-based Virtual Machine (KVM)

The Plan Today... System Calls and API's Basics of OS design Virtual Machines

Carlos Villavieja, Nacho Navarro Arati Baliga, Liviu Iftode

Unix Security Technologies. Pete Markowsky <peterm[at] ccs.neu.edu>

Automatic Extraction of Accurate Application-Specific Sandboxing Policy

CS52600: Information Security

ASSURE: Automatic Software Self- Healing Using REscue points. Automatically Patching Errors in Deployed Software (ClearView)

UNOBSERVABLE INTRUSION DETECTION BASED ON CALL TRACES IN PARAVIRTUALIZED SYSTEMS

Exploiting the x86 Architecture to Derive Virtual Machine State Information

Full and Para Virtualization

Application Security Testing. Erez Metula (CISSP), Founder Application Security Expert

Secure Programming with Static Analysis. Jacob West

Agenda. SQL Injection Impact in the Real World Attack Scenario (1) CHAPTER 8 SQL Injection

POACHER TURNED GATEKEEPER: LESSONS LEARNED FROM EIGHT YEARS OF BREAKING HYPERVISORS. Rafal Wojtczuk

Replication on Virtual Machines

Flexible Intrusion Detection Systems for Memory-Constrained Embedded Systems

USING LOCAL NETWORK AUDIT SENSORS AS DATA SOURCES FOR INTRUSION DETECTION. Integrated Information Systems Group, Ruhr University Bochum, Germany

Survey on virtual machine security

Betriebssysteme KU Security

Korset: Automated, Zero False-Alarm Intrusion Detection for Linux

Between Mutual Trust and Mutual Distrust: Practical Fine-grained Privilege Separation in Multithreaded Applications

Splitting Interfaces: Making Trust Between Applications and Operating Systems Configurable

HIMA: A Hypervisor-Based Integrity Measurement Agent

How I hacked PacketStorm ( )

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

Confinement Problem. The confinement problem Isolating entities. Example Problem. Server balances bank accounts for clients Server security issues:

Experimental Comparison of Concolic and Random Testing for Java Card Applets

Making the Most Out of OS Virtual Machine Technology. Alexandra Fedorova

Security Overview of the Integrity Virtual Machines Architecture

Operating System Interface Obfuscation and the Revealing of Hidden Operations

Virtualization. Types of Interfaces

Adjusting Prevention Policy Options Based on Prevention Events. Version 1.0 July 2006

Access Control Fundamentals

Virtual machines and operating systems

A Survey on Virtual Machine Security

VIRTUALIZATION INTROSPECTION SYSTEM ON KVM-BASED CLOUD COMPUTING PLATFORMS. Advisor: Software Security Lab.

End to End Defense against Rootkits in Cloud Environment Sachin Shetty

GSM. Global System for Mobile Communications, Security in mobile phones. System used all over the world. Sikkerhed04, Aften Trusler

Virtualization Technology. Zhiming Shen

Virtualization System Security

CSE543 - Introduction to Computer and Network Security. Module: Reference Monitor

Software Active Online Monitoring Under. Anticipatory Semantics

HECTOR a software model checker with cooperating analysis plugins. Nathaniel Charlton and Michael Huth Imperial College London

Virtual Machine Security

Automatic Logging of Operating System Effects to Guide Application-Level Architecture Simulation

Format string exploitation on windows Using Immunity Debugger / Python. By Abysssec Inc

Virtual Machines. Virtualization

Specification and Analysis of Contracts Lecture 1 Introduction

Threat Modeling. Frank Piessens ) KATHOLIEKE UNIVERSITEIT LEUVEN

Complete Web Application Security. Phase1-Building Web Application Security into Your Development Process

What is Web Security? Motivation

Securing your Virtual Datacenter. Part 1: Preventing, Mitigating Privilege Escalation

VMkit A lightweight hypervisor library for Barrelfish

Static Analysis. Find the Bug! : Analysis of Software Artifacts. Jonathan Aldrich. disable interrupts. ERROR: returning with interrupts disabled

Understanding Precision in Host Based Intrusion Detection

locuz.com Professional Services Security Audit Services

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Survey On Hypervisors

UNCLASSIFIED Version 1.0 May 2012

EECS 354 Network Security. Introduction

Towards practical reactive security audit using extended static checkers 1

Run-Time Deep Virtual Machine Introspection & Its Applications

Web Application Security

Comprehensive Security for Internet-of-Things Devices With ARM TrustZone

Plain English Guide To Common Criteria Requirements In The. Field Device Protection Profile Version 0.75

Presentation of Diagnosing performance overheads in the Xen virtual machine environment

Cloud Computing. Up until now

INTRUSION DETECTION SYSTEM (IDS) D souza Adam Jerry Joseph I MCA

Enforcing Data Quality Rules for a Synchronized VM Log Audit Environment Using Transformation Mapping Techniques

On Gray-Box Program Tracking for Anomaly Detection

Full System Emulation:

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

An overwhelming majority of IaaS clouds leverage virtualization for their foundation.

Transcription:

Transparent Monitoring of a Process Self in a Virtual Environment PhD Lunchtime Seminar Università di Pisa 24 Giugno 2008

Outline Background Process Self Attacks Against the Self Dynamic and Static Analysis Virtualization Static Analysis Run-Time Support Conclusions

Process Self Considered Problem Protecting a process from attacks that alter the intended behavior of the process program. We want to preserve the original semantics of the program. We are not interested in logic errors, such as: authentication errors (weak passwords); malicious behavior.

Process Self A Sense of Self for Processes Notion of process self: the program the process executes. Based on traces of system calls: dynamic analysis; static analysis. Assumption: a process can implement security critical operations only through system calls. We are not interested in Denial of Service Attacks (DOS).

Process Self System Calls

Attacks Against the Self Definitions

Attacks Against the Self Definitions Software bug: an error in a computer program that prevents it from behaving as intended. Vulnerability: a bug that has security implications for the computer system executing the program. Exploit: a program that takes advantage of a vulnerability to violate the system security policy. Attack: the effective exploitation of a vulnerability through the execution of an exploit.

Attacks Against the Self Buffer Overflow A vulnerability: the program stores more data into a buffer than the memory space reserved for it. The attacker may overwrite data that controls the program executions: control-hijacking attack: the attacker is able to diverge the control flow of the process to execute its own instructions; malicious code is executed instead of the original one. If the program has the rights of invoking any system call, the attacker gains control of the system.

Attacks Against the Self Process Virtual Memory Layout The problem is related to the run-time support: 1. process virtual memory layout; 2. function calling conventions.

Attacks Against the Self Function Calling Conventions

Dynamic and Static Analysis Dynamic Analysis Forrest (1996) described a model for the process self through sequences of system calls. The algorithm has two stages: scan traces of normal behavior and build up a database of normal patterns, i.e. observed sequences of system calls; scan new traces that might contain abnormal behavior, looking for patterns not present in the normal database. High number of false positives.

Dynamic and Static Analysis Dynamic Analysis Slide a window of size k+1 across the trace and record which calls follow which within the sliding window. Suppose k = 3 and are given the following sequence of system calls to define normal behavior: open, read, mmap, mmap, open, getrlimit, mmap, close If we were given a new trace of calls: open, read, mmap, open, open, getrlimit, mmap, close This trace would generate 4 mismatches: if the miss rate exceeds the threshold abnormal activity.

Dynamic and Static Analysis Static Analysis Proposal by Wagner and Dean (2001). Use static analysis to derive a specification from the program source code and to reduce false alarms. Approach: 1. derive the specification of expected system calls by statically analyzing the source code; 2. model the application as a transition system; 3. monitor system call trace at run-time; 4. check for compliance to the model.

Dynamic and Static Analysis Static Analysis: Trivial Model g() { fd=open( foo,p_rdonly); read(fd,...); close(fd); } Build the model S as the set of systems calls that the application can ever make: S = {open, read, close}. Enforcement: if any system call not in S is observed, raise an alarm. Properties: simple, easy, efficient; fail to detect many attacks.

Dynamic and Static Analysis Static Analysis: Callgraph Model Idea: retain some ordering information. Model: represent the system call trace as an NDFA: derived from the control-flow graph; transitions: system calls + transfer of control; non-deterministic: cannot predict which branch to take. Enforcement: simulate the NDFA on the observed trace: non-accepting state raises an alarm.

Dynamic and Static Analysis Static Analysis: Callgraph Model f(int x) { x?getuid():geteuid(); x++; } g() { fd=open( foo,p_rdonly); f(0); close(fd); f(1); exit(0) } Properties: more precise that trivial model; no false positives; impossible paths are allowed: w Entry(f ) Exit(f ) v.

Dynamic and Static Analysis Static Analysis: Further Models Abstract stack model builds and simulates a NDPDA and compares the application call stack with a set of call stacks. Dick Model includes null system calls to eliminate impossible paths. VPStatic extracts context information about stack activity of the monitored program to define a deterministic model.

Dynamic and Static Analysis Static Analysis?

is a virtualization-based monitoring system aimed at protecting a process self. Virtualization Technology: Xen. Based on static analysis of the code: legal traces of system calls that the process can invoke. It can can pair an invariant with each point of the program where a system call is issued: virtual machine introspection to evaluate invariants.

Virtualization Virtualization Virtual Machine Monitor (VMM): manages Virtual Machines (VMs), i.e. execution environments that emulate, at software, the behavior of the underlying physical machine. A standard machine can support several VMs, each running a distinct OS.

Static Analysis Grammar of System Call Sequences We deduce the possible valid sequences of system calls that the process can issue from the source code: we encode them using a context-free grammar. Meta-compilation-compilation approach. At runtime, a sequence of system calls is valid only if it is a prefix of at least one string generated by the grammar.

Static Analysis Grammar of System Call Sequences: An Example int n = 5; foo() { n--; open(); write() if(n) foo(); close(); } int main(int argc) { if(argc) foo(); else { open(); read(); close(); } } main foo open read close; foo open write ( foo )? close;

Static Analysis Grammar of System Call Sequences: ghttpd <MAIN> <COUNT_VHOSTS> <MALLOC> <READINCONFIG> <A> <OPENLOG> socket <B> setsockopt bind <B> listen <B> <CLOSELOG> <GETPWNAM>... <A> <INETD_SERVER> ɛ <B> <PERROR> <SYSLOG> <CLOSELOG> exit ɛ... <INETD_SERVER> (exit)?... <COUNT_VHOSTS>......

Run-Time Support Architecture architecture is based on two virtual machines: the Monitored VM (Mon-VM), i.e. the VM executing the process to be monitored; the Introspection VM (I-VM), i.e. the VM monitoring the process through virtual machine introspection: parser; assertion checker; introspection library.

Run-Time Support Monitored VM It runs the monitored process. HiMod: Linux Kernel Module to hijack system calls. Only a subset of system calls is traced: most critical ones.

Run-Time Support Introspection VM The I-VM runs the monitoring systems. The Analyst applies the consistency checks. It exploits the introspection library to access the Mon-VM.

Run-Time Support Introspection VM A Bison-generated parser to check the process CFG. Evaluate invariants. These are generated dynamically (e.g. Daikon). The Introspection Library allows the Analyst to access any region of memory of the process and VCPU registers: visibility: access Mon-VM s state from a lower level; robustness: introspect Mon-VM from a distinct VM.

Run-Time Support Here Comes Trouble: Mimicry Attacks If an exploit contains only allowed system call subtraces, the intrusion will remain undetected. Attacks based on parameters of system calls.

Run-Time Support Invariant Examples Invariants help in limiting mimicry attacks. Syscalls parameters assertions. They exploit data-flow properties: relations among values of syscall parameters: check that the file descriptor of a read system call is the same returned by a previous open. Assertions on files. They help avoiding symlink attacks: check that the path of a requested file is under a known dir.

Run-Time Support Invariant Examples Buffer length assertions: e.g.: check that the length of the string passed to a vulnerable function is not larger than the local buffer. Invariants on conditional statements. They reduce the non-determinism of the grammar: syscall 1 if(uid==0) syscall 2 else syscall 3. (If the trace is syscall 1 syscall 2 check that uid==0).

Run-Time Support Trusted Computing Base (TCB) The set of all computer components that are critical to security. Xen small size : 100K vs 100M LoC of a modern OS. Xen narrow interface: 30 hypercalls vs 300 syscalls. I-VM: small kernel, no users, no open ports. Mon-VM: HiMod needs to be protected.

Run-Time Support Process Monitoring

Run-Time Support Process Monitoring

Run-Time Support Process Monitoring

Conclusions Summing-up Virtualization-based monitoring system: robustness; transparency. Notion of process self: system call context-free grammar; invariants. Acceptable overhead (<15%).

Conclusions Future Works Static deduction of invariants: e.g. abstract interpretation. Complete transparency on Mon-VM: IDT-hijacking; NX-BIT; VMexit on int instructions. Monitoring child processes. Signal handling: stack unwinding.

Conclusions Acknowledgments This work has been done in collaboration with: Fabrizio Baiardi Dario Maggiari Francesco Tamberi

Conclusions Questions?