TaintCheck and LockSet LBA Reading Group Presentation by Shimin Chen.

Slides:



Advertisements
Similar presentations
ROP is Still Dangerous: Breaking Modern Defenses Nicholas Carlini et. al University of California, Berkeley USENIX Security 2014 Presenter: Yue Li Part.
Advertisements

Smashing the Stack for Fun and Profit
1 InfoShield: A Security Architecture for Protecting Information Usage in Memory Georgia Tech Weidong Shi – Georgia Tech Josh Fryman – Intel Corporation.
Introduction to Information Security ROP – Recitation 5 nirkrako at post.tau.ac.il itamarg at post.tau.ac.il.
Goldilocks: Efficiently Computing the Happens-Before Relation Using Locksets Tayfun Elmas 1, Shaz Qadeer 2, Serdar Tasiran 1 1 Koç University, İstanbul,
Dec 5, 2007University of Virginia1 Efficient Dynamic Tainting using Multiple Cores Yan Huang University of Virginia Dec
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Eraser: A Dynamic Data Race Detector for Multithreaded Programs STEFAN SAVAGE, MICHAEL BURROWS, GREG NELSON, PATRICK SOBALVARRO and THOMAS ANDERSON.
Assembly Code Verification Using Model Checking Hao XIAO Singapore University of Technology and Design.
1 CHAPTER 8 BUFFER OVERFLOW. 2 Introduction One of the more advanced attack techniques is the buffer overflow attack Buffer Overflows occurs when software.
Atomicity in Multi-Threaded Programs Prachi Tiwari University of California, Santa Cruz CMPS 203 Programming Languages, Fall 2004.
TAintscope A Checksum-Aware Directed fuzzing Tool for Automatic Software Vulnerability Detection Tielei Wang1, Tao Wei1, Guofei Gu2, Wei Zou1 1Peking.
Inline Assembly Section 1: Recitation 7. In the early days of computing, most programs were written in assembly code. –Unmanageable because No type checking,
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
LIFT: A Low-Overhead Practical Information Flow Tracking System for Detecting Security Attacks Feng Qin, Cheng Wang, Zhenmin Li, Ho-seop Kim, Yuanyuan.
1 Achieving Trusted Systems by Providing Security and Reliability (Research Project #22) Project Members: Ravishankar K. Iyer, Zbigniew Kalbarczyk, Jun.
Assembly תרגול 8 פונקציות והתקפת buffer.. Procedures (Functions) A procedure call involves passing both data and control from one part of the code to.
September 22, 2014 Pengju (Jimmy) Jin Section E
1 RISE: Randomization Techniques for Software Security Dawn Song CMU Joint work with Monica Chew (UC Berkeley)
1 RAKSHA: A FLEXIBLE ARCHITECTURE FOR SOFTWARE SECURITY Computer Systems Laboratory Stanford University Hari Kannan, Michael Dalton, Christos Kozyrakis.
/ PSWLAB Eraser: A Dynamic Data Race Detector for Multithreaded Programs By Stefan Savage et al 5 th Mar 2008 presented by Hong,Shin Eraser:
CS252: Systems Programming Ninghui Li Final Exam Review.
Vulnerability-Specific Execution Filtering (VSEF) for Exploit Prevention on Commodity Software Authors: James Newsome, James Newsome, David Brumley, David.
Dr. José M. Reyes Álamo 1.  The 80x86 memory addressing modes provide flexible access to memory, allowing you to easily access ◦ Variables ◦ Arrays ◦
Analyzing and Detecting Network Security Vulnerability Weekly report 1Fan-Cheng Wu.
Multitasking Mr. Mahendra B. Salunke Asst. Prof. Dept. of Computer Engg., STES SITS, Narhe, Pune-41 STES Sinhgad Institute of Tech. & Science Dept. of.
Parallelizing Security Checks on Commodity Hardware E.B. Nightingale, D. Peek, P.M. Chen and J. Flinn U Michigan.
Mitigation of Buffer Overflow Attacks
EECS 583 – Class 21 Research Topic 3: Dynamic Taint Analysis University of Michigan December 5, 2012.
Eraser: A Dynamic Data Race Detector for Multithreaded Programs STEFAN SAVAGE, MICHAEL BURROWS, GREG NELSON, PATRICK SOBALVARRO, and THOMAS ANDERSON Ethan.
The x86 Architecture Lecture 15 Fri, Mar 4, 2005.
Automatic Diagnosis and Response to Memory Corruption Vulnerabilities Presenter: Jianyong Dai Jun Xu, Peng Ning, Chongkyung Kil, Yan Zhai, Chris Bookhot.
Exploitation possibilities of memory related vulnerabilities
Exploit Defenses: ASLR, W X, TaintCheck Brad Karp UCL Computer Science CS GZ03 / th December, 2007.
Buffer Overflow Proofing of Code Binaries By Ramya Reguramalingam Graduate Student, Computer Science Advisor: Dr. Gopal Gupta.
Buffer Overflow Attack Proofing of Code Binary Gopal Gupta, Parag Doshi, R. Reghuramalingam, Doug Harris The University of Texas at Dallas.
CNIT 127: Exploit Development Ch 1: Before you begin.
Introduction to Information Security ROP – Recitation 5.
Protecting C Programs from Attacks via Invalid Pointer Dereferences Suan Hsi Yong, Susan Horwitz University of Wisconsin – Madison.
Identifying Arbitrary Memory Access Vulnerabilities in Privilege-Separated Software 1 Hong Hu, Zheng Leong Chua, Zhenkai Liang, Prateek Saxena National.
Argos Emulator Georgios Portokalidis Asia Slowinska Herbert Bos Vrije Universiteit Amsterdam.
HARD: Hardware-Assisted lockset- based Race Detection P.Zhou, R.Teodorescu, Y.Zhou. HPCA’07 Shimin Chen LBA Reading Group Presentation.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
X86 Assembly Language We will be using the nasm assembler (other assemblers: MASM, as, gas)
Eraser: A dynamic Data Race Detector for Multithreaded Programs Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, Thomas Anderson Presenter:
Introduction to InfoSec – Recitation 3 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (infosec15 at modprobe.net)
Paradyn Project Paradyn / Dyninst Week Madison, Wisconsin April 12-14, 2010 Paradyn Project Safe and Efficient Instrumentation Andrew Bernat.
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Detecting Data Races in Multi-Threaded Programs
Introduction to Information Security
Mitigation against Buffer Overflow Attacks
Olatunji Ruwase* Shimin Chen+ Phillip B. Gibbons+ Todd C. Mowry*
Pinpointing Vulnerabilities
Multithreading Tutorial
Introduction to Information Security
Introduction to Compilers Tim Teitelbaum
Taint tracking Suman Jana.
Authors: James Newsome, Dawn Song
SUDS: An Infrastructure for Creating Bug Detection Tools
1Intel Research Pittsburgh 2CMU 3EPFL 4UT Austin
Multithreading Tutorial
All You Ever Wanted to Know About Dynamic Taint Analysis & Forward Symbolic Execution (but might have been afraid to ask) Edward J. Schwartz, Thanassis.
MIPS Procedure Calls CSE 378 – Section 3.
The Microprocessor & Its Architecture
Week 2: Buffer Overflow Part 1.
Multithreading Tutorial
Multithreading Tutorial
Eraser: A dynamic data race detector for multithreaded programs
Computer Architecture and System Programming Laboratory
Presentation transcript:

TaintCheck and LockSet LBA Reading Group Presentation by Shimin Chen

Papers TaintCheck: "Dynamic taint analysis for automatic detection, analysis, and signature generation of exploits on commodity software." J. Newsome and D. Song. NDSS 2005.Dynamic taint analysis for automatic detection, analysis, and signature generation of exploits on commodity software LockSet: "Eraser: A dynamic race detector for multi-threaded programs." S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. ACM TOCS, 15(4), 1997.Eraser: A dynamic race detector for multi-threaded programs

TaintCheck Goal: Detecting Overwrite Attacks Most commonly occurring security exploits are overwrite attacks Exploit software bugs:  Buffer overrun: e.g. strcpy()  Integer overflow  Bad printf statement: e.g. printf (buf) Overwrite sensitive data values:  Return address on stack  Global Offset Table (GOT): dynamic library function pointers  Format strings

TaintCheck Overview Label data originating from or arithmetically derived from untrusted sources (e.g. the network) as tainted Keep track of the propagation of tainted data as the program executes Detect when tainted data is used in dangerous ways (e.g. used as jump target address) Dynamic binary instrumentation: e.g. Valgrind

Taintcheck State 1 bit for every register (e.g. eax, ebx, ecx, edx, esi, edi, esp, ebp) 1 bit for every byte in the application 0 – not tainted; 1 – tainted (the paper also proposed more sophisticated state schemes maintaining linked lists to track taint propagation)

TaintSeed: What Data Should Be Marked as Tainted? Input data returned by system calls:  read, recv, etc. Mark the taint bit for every byte of the input data buffer Configurable based on  Socket? Standard input? File user ID?

TaintTracker: How should the taint attribute propagate? Instrument every instruction Given an operation: d = s1 op s2 Compute: taint_d = taint_s1 OR taint_s2 Handle corner cases: e.g. xor eax, eax

TaintAssert: What usage of tainted data should raise an alarm as an attack? Check every indirect jump instruction:  If jump target address in a register, check the taint bit of the register  If jump target address in memory, check the taint bit for the memory location Check format strings of printf-like calls Other checks: e.g. syscall args Report error if tainted

Usages without Alarm EFLAGS  Program control flow typically determined by input data Addresses used in data movement inst  Common to use input data as array index Too many false positives if alarmed

Taintcheck Evaluation Functionality: Performance: up to 37X slowdown

Taintcheck for Automatic Signature Generation

LockSet Overview Goal: detecting violation of locking convention in multi- threaded program Every shared object must be protected by one or a set of locks consistently throughout the program C(v): the lock set for object v locks_held(t): the set of locs held by thread t

Improvements Initialization Read-shared data Read-write lock

LockSet State For every 4-byte application word, keep a 4-byte (32-bit) information  2 bits to encode one of the four states  30 bits to encode first thread ID (exclusive) or lockset address (shared/shared-modified) 2 bits30 bits state Address of lock set / owner ID

Valgrind Implementation Monitor pthread calls:  pthread_mutex_lock / pthread_mutex_unlock  Modify locks_held(t) Monitor malloc/free calls:  Initialize states Instrument each memory reference:  Compute lock set intersection Improvements: monitor pthread_create / pthread_join for dealing with exclusive data ownership change

Limitations Cannot deal with barrier synchronization  In scientific computing, a program consists of multiple stages separated with barriers  Shared data usage pattern can be very different across stages  An object v can be accessed correctly by T1 in stage A and by T2 in stage B without locking