MAKE DKOM ATTACKS GREAT AGAIN

MARIANO GRAZIANO

Bologna, Italy - 29/10/2016 1

whoami ‣

Security researcher at Cisco in the Talos group



Ph.D. Telecom ParisTech/Eurecom



Hackademic



Malware analysis / memory forensics

2

ROOTKIT

“Software to maintain a persistent and stealthy access on a compromised machine”

3

HOW? RING 3 RING 0 RING -1

RING -2 RING -3

PRIVILEGES

4

HOW? RING 3 RING 0 RING -1

RING -2 RING -3

PRIVILEGES

5

DETECTION

HOW? COMMON ROOTKITS

RING 3 RING 0 RING -1

RING -2 RING -3

PRIVILEGES

6

DETECTION

HOW? RING 3

DETECTION

RING 0 -

RING -1

-

“Subvirt: Implementing malware with virtual RING -1 machines“ - S&P 06 Blue Pill - Joanna Rutkowska - Syscan 06 Vitriol - Dino Dai Zovi - BHUS 06 RING -2 RING -3

PRIVILEGES

7

HOW? RING 3 -

RING -2

-

DETECTION

Duflot SMM research “SMM rootkits: A 0new breed of OS independent malware” - SP 08 RING “System Management Mode Hacks” - Phrack #65 - ’08 “Real SMM Rootkit: Reversing and Hooking BIOS SMI Handlers” Phrack #66 - ’09 RING -1 “Implementing SMM PS/2 Keyboard sniffer” - Beist - 2009 NSA http://blog.cr4.sh/2016/02/exploiting-smm-callout-vulnerabilities.html RING -2 RING -3

PRIVILEGES

8

HOW?

9

HOW? RING 3

DETECTION

RING 0 -

RING -3

-

“Introducing Ring -3 Rootkits” - Tereshkin & Wojtczuk - BHUS’09 “Understanding DMA Malware” - RING Stewin-1et al. - DIMVA ‘12 http://me.bios.io/Resources RING -2 RING -3

PRIVILEGES

10

HOW? DKOM BOOTKITS

ROP ROOTKITS

BLUEPILLS

FIRMWARE 11

HOW? DKOM BOOTKITS

ROP ROOTKITS

BLUEPILLS

FIRMWARE 12

ROP  ROOTKIT? ‣

Motivation



“Return-oriented rootkits: Bypassing kernel code integrity protection mechanisms” - USENIX Security 09



“Persistent Data-only Malware: Function Hooks without Code” - NDSS ‘14

13

ROP  ROOTKIT? ‣

Persistence technique: ‣

CVE-2013-2094



sysenter ‣

IA32_SYSENTER_ESP (0x175)



IA32_SYSENTER_EIP (0x176)

14

ROP  ROOTKIT? Chuck ROP chains:

15

DKOM

“Direct Kernel Object Manipulation”

16

TRADITIONAL  DKOM

EPROCESS

EPROCESS

17

EPROCESS

TRADITIONAL  DKOM

EPROCESS

EPROCESS

EPROCESS

18

DKOM  vs  PROCESSES ‣

DKOM is a generic technique



Processes: ‣

Windows: KPROCESS/EPROCESS/PEB



Linux: task_struct



OSX: proc/task 19

(E)PROCESS?

20

(E)PROCESS?

21

(K)PROCESS?

22

PROCESS?

23

PROCESS? ‣



EPROCESS info: ‣

Creation and exit time



PID and PPID



Pointer to the handle table



VAD, etc

PEB info: ‣

Pointer to the Image Base Address



Pointer to the DLLs loaded



Heap size, etc 24

DKOM  DEFENSES ‣

Kernel data integrity solutions: ‣



invariants ‣

external systems



memory analysis

data partitioning

25

VOLATILITY  -­‐  PSLIST

26

DEMO

“DKOM DEMO”

27

E-­‐DKOM

“Evolutionary Direct Kernel Object Manipulation”

“Subverting Operating System Properties through Evolutionary DKOM Attacks” Mariano Graziano, Lorenzo Flore, Andrea Lanzi, Davide Balzarotti DIMVA 2016, San Sebastian, Spain

28

E-­‐DKOM Data structure of interest

29

Time

E-­‐DKOM Violation of a temporal property

30

E-­‐DKOM Violation of a temporal property

The attack cannot be detected looking at a single snapshot

31

STATE  vs  PROPERTY



Traditional DKOM affects the state and are discrete



Evolutionary DKOM (E-DKOM) affects the evolution in time of a given property and are continuous

32

LINUX  CFS  SCHEDULER

33

LINUX  CFS  SCHEDULER

target

34

LINUX  CFS  SCHEDULER

target right-most 35

LINUX  CFS  SCHEDULER

target

Set targetvruntime > rightmostvruntime right-most 36

LINUX  CFS  SCHEDULER

target

We affect the evolution of the data structure over time. We altered the scheduler property (fair execution)

target 37

DEMO

“E-DKOM DEMO”

38

DEFENSES?



Reference monitor that mimics the OS property: ‣

OS specific



Difficult to generalize

39

DEFENSE  FRAMEWORK

40

DEFENSE  FRAMEWORK

41

DEFENSE  FRAMEWORK

42

FUTURE ‣

Minimalism



Possibile trends: ‣

Infections for the masses



Stealthy and multi stage attacks



Cat and mouse game



Microsoft approach: ‣

Credential Guard



Application Guard 43

CONCLUSION ‣

Rootkit technology evolution



New attack based on data structure evolution



Experiment on the Linux CFS scheduler



Defense based on hypervisor



General mitigation/solution very hard

44

THE  END THANK YOU

45

email: [email protected] twitter: @emd3l

make dkom attacks great again - Mariano Graziano

E-‐DKOM. “Evolutionary Direct Kernel Object Manipulation”. “Subverting Operating System Properties through Evolutionary DKOM Attacks”. Mariano Graziano, Lorenzo Flore, Andrea Lanzi, Davide Balzarotti. DIMVA 2016, San Sebastian, Spain. 28 ...

12MB Sizes 0 Downloads 153 Views

Recommend Documents

Make CAMRA Great Again - Manifesto.pdf
Broadening CAMRA's scope 13. Integrating brewers into the campaign 14. Improving education on cask ale and cellaring 15. Encouraging diversity 16. Modernising our defence of pubs 17. Focus on Value, not Price 18. Modernising the campaign 19. FAQs 20.

Crippled America: How to Make America Great Again
Buy Crippled America How to Make America Great Again by Donald J Trump ISBN 9781501137969 from Amazon s Book Store Everyday low … Crippled ...

Read Time to Get Tough: Make America Great Again ...
Read Time to Get Tough: Make America Great Again! PDF. Download ... House Speaker Paul Ryan said, ?Donald ... money?massive money. That's what I do for ...

Mariano Moreno MSO.pdf
La otra, comandada por el co- modoro Anson. Vernon tomó Portobe- llo e intentó tomar Cartagena de Indias. Sufrió un tremendo desastre en el ata- que.

mariano blatt-paradise outer space.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. mariano ...

Leonardo Mariano Santander - Currículo.pdf
4D, Corel Draw, Dev C++, GIMP, Inkscape, Notepad++, Processing, Unity3D. ATIVIDADE VOLUNTÁRIA. Trabalho quinzenal no Asilo São Vincente de Paula.

mariano blatt-paradise outer space.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. mariano ...

The Harmonic Series Diverges Again and Again - Steve Kifowit's ...
is one of the most celebrated infinite series of mathematics. As a counterexam- ple, few series more clearly illustrate that the convergence of terms to zero is not sufficient to guarantee the convergence of a series. As a known series, only a handfu