Scalable Dynamic Analysis of Binary Code

Relevanta dokument
Styrteknik: Binära tal, talsystem och koder D3:1

Grafisk teknik IMCDP IMCDP IMCDP. IMCDP(filter) Sasan Gooran (HT 2006) Assumptions:

Grafisk teknik IMCDP. Sasan Gooran (HT 2006) Assumptions:

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

Isometries of the plane

Grafisk teknik. Sasan Gooran (HT 2006)

Information technology Open Document Format for Office Applications (OpenDocument) v1.0 (ISO/IEC 26300:2006, IDT) SWEDISH STANDARDS INSTITUTE

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

Collaborative Product Development:

Workplan Food. Spring term 2016 Year 7. Name:

CUSTOMER READERSHIP HARRODS MAGAZINE CUSTOMER OVERVIEW. 63% of Harrods Magazine readers are mostly interested in reading about beauty

Module 6: Integrals and applications

Writing with context. Att skriva med sammanhang

Support Manual HoistLocatel Electronic Locks

#minlandsbygd. Landsbygden lever på Instagram. Kul bild! I keep chickens too. They re brilliant.

Lösenordsportalen Hosted by UNIT4 For instructions in English, see further down in this document

Välkommen in på min hemsida. Som företagsnamnet antyder så sysslar jag med teknisk design och konstruktion i 3D cad.

Adress 15. August 2014

LARS. Ett e-bokningssystem för skoldatorer.

Självkörande bilar. Alvin Karlsson TE14A 9/3-2015

Examensarbete Introduk)on - Slutsatser Anne Håkansson annehak@kth.se Studierektor Examensarbeten ICT-skolan, KTH

The present situation on the application of ICT in precision agriculture in Sweden

Bridging the gap - state-of-the-art testing research, Explanea, and why you should care

Michael Q. Jones & Matt B. Pedersen University of Nevada Las Vegas

Semantic and Physical Modeling and Simulation of Multi-Domain Energy Systems: Gas Turbines and Electrical Power Networks

Introduktion till vetenskaplig metodik. Johan Åberg

1. Varje bevissteg ska motiveras formellt (informella bevis ger 0 poang)

Typografi, text & designperspektiv

Säkerhetsfunktioner rstå varandra? Finns behov av att avvika från normal säkerhetsfunktion s vissa betingelser under uppstart, ändringar i processen

Verktyg som behövs. LX HD Sit-Stand Desk Mount LCD Arm SVENSKA. 20" (508 mm) lbs ( kg)

Tentamen (Exempel) Datorteknik Y, TSEA28

Tentamen (Exempel) Datorteknik Y, TSEA28

Master Thesis. Study on a second-order bandpass Σ -modulator for flexible AD-conversion Hanna Svensson. LiTH - ISY - EX -- 08/ SE

SVENSK STANDARD SS :2010

En bild säger mer än tusen ord?

EXPERT SURVEY OF THE NEWS MEDIA

Preschool Kindergarten

Utvärdering SFI, ht -13

Gradientbaserad Optimering,

- den bredaste guiden om Mallorca på svenska! -

Tentamen. Datorteknik Y, TSEA28

RUP är en omfattande process, ett processramverk. RUP bör införas stegvis. RUP måste anpassas. till organisationen till projektet

Stiftelsen Allmänna Barnhuset KARLSTADS UNIVERSITET

Byggdokument Angivning av status. Construction documents Indication of status SWEDISH STANDARDS INSTITUTE

Design by Voice. Azzaro

Rastercell. Digital Rastrering. AM & FM Raster. Rastercell. AM & FM Raster. Sasan Gooran (VT 2007) Rastrering. Rastercell. Konventionellt, AM

LX Desk Mount LCD Arm

Isolda Purchase - EDI

- den bredaste guiden om Mallorca på svenska!

Ringmaster RM3 - RM 5 RM3 RM 4 RM 5

PROFINET MELLAN EL6631 OCH EK9300

Vässa kraven och förbättra samarbetet med hjälp av Behaviour Driven Development Anna Fallqvist Eriksson

1.1 Invoicing Requirements

Om oss DET PERFEKTA KOMPLEMENTET THE PERFECT COMPLETION 04 EN BINZ ÄR PRECIS SÅ BRA SOM DU FÖRVÄNTAR DIG A BINZ IS JUST AS GOOD AS YOU THINK 05

Arbetsplatsträff 8 mars 2011

This exam consists of four problems. The maximum sum of points is 20. The marks 3, 4 and 5 require a minimum

Goals for third cycle studies according to the Higher Education Ordinance of Sweden (Sw. "Högskoleförordningen")

Rev No. Magnetic gripper 3

District Application for Partnership

UTLYSNING AV UTBYTESPLATSER VT12 inom universitetsövergripande avtal

PORTSECURITY IN SÖLVESBORG

Här kan du checka in. Check in here with a good conscience

c a OP b Digitalteknik och Datorarkitektur 5hp ALU Design Principle 1 - Simplicity favors regularity add $15, $8, $11

Quick-guide to Min ansökan

Byggritningar Ritsätt Fästelement. Construction drawings Representation of fasteners SWEDISH STANDARDS INSTITUTE

Digitala System: Datorteknik ERIK LARSSON

Tentamen. Datorteknik Y, TSEA28

1. Compute the following matrix: (2 p) 2. Compute the determinant of the following matrix: (2 p)

SVENSK STANDARD SS

Algoritmer och Komplexitet ht 08. Övning 6. NP-problem

Solowheel. Namn: Jesper Edqvist. Klass: TE14A. Datum:

Viktig information för transmittrar med option /A1 Gold-Plated Diaphragm

SVENSK STANDARD SS-EN ISO 19108:2005/AC:2015

The Finite Element Method, FHL064

Tentamen. Datorteknik Y, TSEA28

Tentamen. Datorteknik Y, TSEA28

OFTP2: Secure transfer over the Internet

Tentamen. Datorteknik Y, TSEA28

De senaste åren har det hänt en hel del på ATO Fritid

Tentamen. Datorteknik Y, TSEA28

Health café. Self help groups. Learning café. Focus on support to people with chronic diseases and their families

Förändrade förväntningar

How to format the different elements of a page in the CMS :

Problem som kan uppkomma vid registrering av ansökan

ISO general purpose metric screw threads Selected sizes for screws, bolts and nuts

GeoGebra in a School Development Project Mathematics Education as a Learning System

HANTERING AV UPS CX

Inkvarteringsstatistik. Göteborg & Co

Review of Malmö University s Quality Assurance Processes 2018

Ecolin - Natural silence!

DRIVERS PG 2-9 DRIVERS

Tentamen (Exempel) Datorteknik Y, TSEA28

Annonsformat desktop. Startsida / områdesstartsidor. Artikel/nyhets-sidor. 1. Toppbanner, format 1050x180 pxl. Format 1060x180 px + 250x240 pxl.

Automatization of test rig for microwave ovens

The Municipality of Ystad

Registrerade / Registered 14/05/2009. No Ordförande / The President. Wubbo de Boer REGISTRERINGSBEVIS CERTIFICATE OF REGISTRATION

Tentamen. Datorteknik Y, TSEA28

Inkvarteringsstatistik. Göteborg & Co. Februari 2012


Transkript:

Linköping Studies in Science and Technology Dissertations, No. 1993 Ulf Kargén FACULTY OF SCIENCE AND ENGINEERING Linköping Studies in Science and Technology, Dissertations, No. 1993, 2019 Department of Computer and Information Science Linköping University SE-581 83 Linköping, Sweden Scalable Dynamic Analysis of Binary Code www.liu.se Scalable Dynamic Analysis of Binary Code Ulf Kargén 2019

Linköping Studies in Science and Technology Disserta ons, No. 1993 Scalable Dynamic Analysis of Binary Code Ulf Kargén Linköping University Department of Computer and Informa on Science Division of Database and Informa on Techniques SE-581 83 Linköping, Sweden Linköping 2019

I I I

0 2

A B A C B C

1. r2 = load r0 2. r3 = load r1 3. r2 = add r2, r3 4. r4 = cmp_greater r2, 0 5. branch_if r4, line_7 6. r2 = 1 7. r3 = load r5 8. r0 = div r3, r2 9. call print A B C

R R

A B A B A C C A = 2 = 3

base exp 1 1 1. float power(int base, int exp) { 2. if(exp == 0) 3. return 1.0; 4. 5. int result = base; 6. for(int i = 1; i < abs(exp); i++) 7. result = result * base; 8. 9. if(exp < 0) 10. return 1.0/result; 11. else 12. return result; 13.} 5 7 7 6 6 9 2 3 12 = 2 = 3 {1, 1, 2, 3, 5, 6, 7, 9, 12} {1, 5, 7, 12} {1, 2, 3, 6, 7, 9, 12} {1, 2, 6, 9}

.. a = read_one_value(file_name) b = a * 2 c = a + b print(c).... a = read_one_value(file_name) shadow_a = check_and_taint(file_name) b = a * 2 shadow_b = shadow_a c = a + b shadow_c = union(shadow_a, shadow_b) print(c) taint_sink(shadow_c).. (a) (b)

O(nd) d n

push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax push %rbp mov sub mov mov movl mov add %rsp,%rbp $0x30,%rsp %edi,-0x24(%rbp) %rsi,-0x30(%rbp) $0x0,-0x14(%rbp) -0x30(%rbp),%rax $0x8,%rax sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi sub $0x8,%rsp mov 0x8(%rsi),%rdi mov $0xa,%edx xor %esi,%esi callq 0x400490 lea -0x1(%rax),%edx cmp $0x1,%edx jbe 0x40050e sub $0x2,%eax test %eax,%eax jle 0x400515 mov $0x1,%edi

4.3. Improving Fuzzing using Dynamic Slicing Mutational Fuzzer Valid PDF file (a) PostScript to PDF converter Valid PostScript file MutaGen (b) Figure 4.2: Conceptual difference between mutational fuzzing (a) and MutaGen (b), for the example case of generating test inputs for PDF readers. and also allows MutaGen to support closed-source generating programs. Using Valgrind allows us to avoid the intricacies of the x86 instruction set, and apply mutations on Valgrind s simplified IR. We use several mutation operators from mutation testing, such as switching addition and subtraction. In contrast to mutation testing we apply mutations to computations rather than branch predicates, since our goal is to mutate the computed output of the generating program rather than drastically changing its internal logic. Therefore, we also use several arithmetic mutation operators, for example adding or subtracting a constant from different instruction operands. Since applying mutations to every executed instruction of the generating program would be very time consuming, we also utilize our backwards dynamic slicer from Paper I to limit the set of instructions that are viable for mutation. We instrument system calls for writing output to a file, and treat every byte of the generating program s output as a combined slicing criterion for backwards slicing. This means that the slice will contain every instruction that is directly involved in computing the program s output. (Or more precisely, every instruction that at least one byte of output has a transitive data dependency on.) We found 49

Papers The papers associated with this thesis have been removed for copyright reasons. For more details about these see: http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-157626

Linköping Studies in Science and Technology Dissertations, No. 1993 Linköping Studies in Science and Technology, Dissertations, No. 1993, 2019 Department of Computer and Information Science Ulf Kargén FACULTY OF SCIENCE AND ENGINEERING Linköping University SE-581 83 Linköping, Sweden Scalable Dynamic Analysis of Binary Code www.liu.se Scalable Dynamic Analysis of Binary Code Ulf Kargén 2019