SlideShare uma empresa Scribd logo
1 de 100
Baixar para ler offline
Understanding the fundamentals of attacks
What is happening when someone writes an exploit?
Halvar Flake / Thomas Dullien
November 3, 2016
The /home owners association
Table of contents
1. The need to define “exploit”
2. Defining bug-free and buggy software
3. Intended states, CPU states, and weird states
4. Input streams as instruction streams
5. Provably exploitable and provably unexploitable code
6. What does all of this mean?
7. Summary
1
The need to define “exploit”
What, exactly, is an ‘exploit’?
What, exactly, is an exploit?
Central concept in computer security.
Valuable currency: Used to be barter-traded, now is traded for $$$.
Could you define it so that an old-school computer scientist understands?
2
What, exactly, is an ‘exploit’?
In spite of centrality of the concept, it is ill-defined.
Informal definitions abound, from overly abstract to overly concrete:
“A program that allows you to do something that you are not
supposed to be able to do.”
“I recognize an exploit when I see it.”
“Magic”
“When you overwrite EIP”
3
Why is the lack of a definition a problem?
Problem 1:
Since we do not have clear definitions, we fall into scholastic arguments:
“Adding a cookie to the heap here will stop exploits - it breaks
the technique described in Phrack!”
“It is just a single bit error, and hence not exploitable.”
Since we do not have clear definitions, these statements cannot be
reasoned about properly.
4
Why is the lack of a definition a problem?
Computer security is full of non-scientific statements, assertions, and
unquantifiable handwaving.
Mitigations are supposed to “raise the bar”, but:
Bar-raising
1. How much will the bar be raised?
2. Will it cost the attacker time once, or will it cost him time on each
exploit?
3. Is the cost (performance, complexity) worth the gain?
Our discussions are similar to “how many angels can balance on the tip
of a needle”.
5
Why is the lack of a definition a problem?
Most defenders have no first-hand experience with a modern exploit.
With security jobs doubling every 4 years, scholasticism is a real problem.
Incentive structures are harmful:
Happy defender
1. Come up with overspecific
countermeasures
2. Show progress to superiors
& get promoted
Happy attacker
1. Bypass overspecific
countermeasures
2. Hack all the things
3. Show progress to superiors
& get promoted
6
Why is the lack of a definition a problem?
Problem 2:
We fail at teaching it properly, and instead teach a “bag of tricks”
The broken exploitation curriculum:
1. Learn about stack smashing
2. Learn about heap implementation X, Y, and Z
3. Learn about SQL injection
4. Learn about ASLR and other mitigations
5. Learn about XSS
6. Learn about other overly special cases
Disjoint, disparate, and terrible at transmitting principles. Too many
people “miss the forest for the trees” as a result.
7
Why is there no good theoretical body on exploits?
“Philosophy of science is about as useful to scientists as
ornithology is to birds” (Feynman)
Exploit practitioners know the intuitions they need, and have no incentive
to formalize or disseminate their mental models.
8
This talk
Explains the “right” way to think about exploits and exploit writing1
.
Introduces an attacker model for memory corruptions that allows us to
reason about large classes of attacks.
Discusses a few theoretical results & their consequences.
Omits proofs and extreme formalism.
... but remains a theoretical CS talk, so don’t fall asleep!
1“Right” as subjectively judged by me, but I have impeccable taste in exploits.
9
Credit where it is due
Intuitions behind this talk are known to many exploit practitioners.
“Folk theorems” - results are known, but not formally written down
anywhere.
The LANGSEC2
community have contributed strongly to the discussion
and evolution of ideas.
2L. Sassaman, M. L. Patterson, S. Bratus, J. Vanegue etc. ...
10
Defining bug-free and buggy
software
Recap: Finite state machines
A graph of states, and input drives the machine along edges
(“transitions”) to other states.
State 1 State 2 State 3
‘A’ ‘B’
‘A’
‘D’ ‘E’
If you are unfamiliar with finite-state machines, think of such diagrams: 11
The intended (finite state) machine
Why write software? Because you wish to address a problem.
You want to have a machine that does something specific for you.
Ideally, you want to have a specific finite-state machine that addresses
your problem.
12
The intended (finite state) machine
Unfortunately, you do not have this machine: All you have is a
general-purpose computer.
So you build an emulator that emulates the machine you would like to
have on a general-purpose computer.
Programming is, at its heart, construction of finite-state-machine
emulators. 3
3Some people may disagree, but it is true for finite-RAM (e.g. real) machines
13
The intended (finite state) machine
The machine that addresses the problem is the intended finite state
machine: The machine you wanted to build.
By definition, it is bug-free: It does exactly what you want it to do, and
nothing else.
All theory is grey, so let’s define a small IFSM: A system that stores 5000
password / secret-value combinations
14
The IFSM
A simple secret-keeping machine:
A: Read password/secret
B: Store pair in memory
C:
Remove pair from memory
Output the requested secret
D: Output error message
New password?
Fewer than 5000 stored?
Pass/secret not equal 0?
Existing password?
Pass/secret equal 0?
Already 5000 stored?
15
The IFSM, slightly more formal
A simple secret-keeping machine:
Read input password/secret
read(p)
read(s)
Store pair in memory (B)
Memory ← Memory ∪ {(p, s)}
Output the requested secret (C)
Memory ← {(p , s ) ∈ Memory | p = p}
print(s )
Output error message (D)
print(0)
IF condition b:
∀(p , s ) ∈ Memory : p = p
|Memory| ≤ 4999
s = 0, p = 0
IF condition c:
∃(p , s ) ∈ Memory : p = p
s = 0
IF condition d:
s = 0
∨p = 0
∨ |Memory| = 5000
16
Implementing the IFSM
This machine can be implemented in many ways.
We will examine 2 different implementations.
Memory in the IFSM is a set. Computers do not know sets.
Our two implementations will emulate Memory via (1) a flat array and
via (2) a linked list.
17
Flat-array implementation: Writing
Divides memory into pairs of memory cells.
Pairs are either empty (and both 0), or represent secret/password combo.
Insertion is linear scan for empty pair and writing there.
Removal is linear scan for correct pair and removing it.
We refer to such a pair as (p, s).
18
Flat-array implementation: Writing
Transition (B): Memory ← Memory ∪ {(p, s)}.
Search for first pair with p = 0, write data there.
19
Flat-array implementation: Writing
Transition (B): Memory ← Memory ∪ {(p, s)}.
Search for first pair with p = 0, write data there.
20
Flat-array implementation: Writing
Transition (B): Memory ← Memory ∪ {(p, s)}.
Search for first pair with p = 0, write data there.
P S
21
Flat-array implementation: Writing
Transition (B): Memory ← Memory ∪ {(p, s)}.
Search for first pair with p = 0, write data there.
P S
22
Flat-array implementation: Reading
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Searching for a specific p and removing the pair.
P S
23
Flat-array implementation: Reading
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Searching for a specific p and removing the pair.
P S
Linear sweep until right p is found.
24
Flat-array implementation: Reading
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Searching for a specific p and removing the pair.
P S
Linearly sweep until right p is found. Output corresponding s.
25
Flat-array implementation: Reading
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Searching for a specific p and removing the pair.
Linearly sweep until right p is found. Output corresponding s. Zero
memory cell.
26
Flat-array implementation: Reading
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Searching for a specific p and removing the pair.
Linearly sweep until right p is found. Output corresponding s. Zero
memory cell.
27
The linked-list implementation
Linearly sweeping memory is computationally expensive and not very
CSy.
Let us replace the flat array with a linked list for free and used tuples.
Divide memory into 3-tuples: (p, s, next). Keep track of two list heads
for free and used tuples.
28
Linked-List implementation
29
Linked-List implementation
Keep all used blocks in a linked list.
30
Linked-List implementation
Keep all free blocks in a linked list.
31
Linked-List implementation
Keep two list heads in registers.
32
Linked-list implementation details
Very detailed step-by-step slides for what happens are in the appendix,
but most people will be familiar with linked-list unlinks.
We will look at the machine implementation in more detail later.
Right now, we need to define what security properties are.
33
Security properties of the IFSM
The security properties of the IFSM are “what we want to be true” for
the IFSM.
This is needed to define “winning” for an attacker: He wins when he
defeats the security properties of the IFSM.
The security property is just a statement about input and output
sequences of the IFSM.
34
Security properties of the IFSM
A secret-keeping machine should not allow the secrets to be retrieved by
someone who does not know the password.
“If the system stores a pair (p, s) it should be practically infeasible for
the attacker to obtain s if he does not know p”.
35
Intended states, CPU states, and
weird states
Intended states
There is one IFSM state for each possible configuration of Memory.
At the same time, we saw that there can be multiple states of the CPU
that represent the same IFSM state (sets do not care about ordering).
You can map between intended states and sets of CPU states: Every
state of the IFSM can be represented by one or more CPU states.
But many CPU states do not represent any state of the IFSM.
36
CPU states
CPU states can fall into one of three categories:
Sane states: A CPU state which corresponds to a state of the IFSM.
Transitory states: A CPU state which inevitably irrespective of further
input or output leads to a sane state. These occur when the emulator
emulates a transition arrow of the IFSM using multiple instructions.
Weird states: A CPU state that does not correspond to a state of the
IFSM, and hence cannot be interpreted as a representation of the IFSM.
37
Weird states
How can the CPU enter a weird state?
Programming mistakes
Bitflips in DRAM
Broken data on your harddisk that gets paged in
... and a myriad of other ways ...
38
Emulated transitions on weird states
The program that executes on the CPU usually cannot know it has
entered a weird state.
It will happily continue executing until an exception occurrs.
This means that it will emulate transitions intended for a sane state on a
weird state.
This transforms one weird state into (usually) another weird state.
39
Emulated transitions on weird states
Once a weird state is entered, many other weird states can be reached by
applying the transitions intended for sane states on them.
A new computational device emerges, the weird machine.
The weird machine is the computing device that arises from the
operation of the emulated transitions of the IFSM on weird states.
...time for a radical change of perspective...
40
Input streams as instruction
streams
Normal model of computation
State 1 State 2 State 3 State 4 State 5
Input Input
Instruction Instruction Instruction Instruction
Program
Data
41
Normal model of computation
Summarize the middle transitions.
State 1 State 4 State 5
Input Input
Instruction(s) Instruction(s)
Program
Data
42
Attacker model of computation
State 1 State 4 State 5
Input Input
Instruction(s) Instruction(s)
Data
Program
43
Switching perspective
Any computing device that accepts input and reacts to this input by
executing a different program path can be viewed as a computing device
where the inputs are the program.
If no weird state can ever be entered, this is no problem, and intended.
If there is a way to enter a weird state, all hell breaks loose: The attacker
is now programming your computer.
44
The essence of exploitation
Given a method to enter a weird state from a set of particular sane
states, exploitation is the process of
setup (choosing the right sane state),
instantiation (entering the weird state) and
programming of the weird machine
so that security properties of the IFSM are violated.
45
Provably exploitable and
provably unexploitable code
Attacker model
Cryptography has a variety of attacker models of different strengths.
Plaintext-only. Chosen-ciphertext. Chosen-plaintext. Adaptive
chosen-plaintext.
These attacker models define what an attacker is allowed to do and
generalize many real-world attacks.
They are usually quite powerful, and allow reasoning about large classes
of attacks and defenses.
46
Attacker model
Let us introduce a simple (yet powerful) attacker model for memory
corruptions:
A chosen-bitflip-once attacker is allowed to corrupt exactly one bit of
memory exactly once, when the machine is waiting for input.
There are many other attacker models that are sensible and imaginable -
but we won’t discuss them here.
47
Attacker model
Our attacker model works as follows:
1. Attacker gets to send inputs to the machine
2. Defender gets to send an input (p, s) to the machine
3. Attacker gets to send inputs to the machine
4. Attacker gets to flip exactly one bit of his choosing
5. Attacker gets to send more inputs to the machine to obtain s
The chosen-bitflip-once attacker is a fairly strong attacker model, but not
unreasonably so.
48
Proving exploitability of the linked-list variant
The time-honored way of showing exploitability is providing an exploit.
We follow the same route: We describe a sequence of operations that
allows the attacker to obtain the secret.
49
Exploiting the linked-list implementation
Initial state is a list of empty 3-tuples.
free
head
=0
50
Exploiting the linked-list implementation
Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence.
free
head
=9
p0 s0 n0 p1 s1 n1 p2 s2 n2
51
Exploiting the linked-list implementation
Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends
(pd , sd ).
p0 s0 n0 p1 s1 n1 p2 s2 n2 pd sd nd
free
head
=12
52
Exploiting the linked-list implementation
Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends
(pd , sd ). Attacker sends (p2, X).
p0 s0 n0 p1 s2 n3 p2 s2 n2 pd sd nd
free
head
=6
53
Exploiting the linked-list implementation
Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends
(pd , sd ). Attacker sends (p2, X), (p1, X).
p0 s0 n0 p1 s1 n1 p2 s2 n2 pd sd nd
free
head
=3
54
Exploiting the linked-list implementation
Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends
(pd , sd ). Attacker sends (p2, X), (p1, X), (p3, s3).
p0 s0 n0 p3 s3 n3 p2 s2 n2 pd sd nd
free
head
=6
55
Exploiting the linked-list implementation
Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends
(pd , sd ). Attacker sends (p2, X), (p1, X), (p3, s3), (p4, s4).
p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd
free
head
=12
56
Exploiting the linked-list implementation
The machine is still in an entirely sane state.
p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd
free
head
=12
57
Exploiting the linked-list implementation
The attacker gets to corrupt one bit, incrementing n3.
p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd
free
head
=12
58
Exploiting the linked-list implementation
The attacker gets to corrupt one bit, incrementing n3. He then sends in
(s4, X).
p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd
free
head
=12
59
Exploiting the linked-list implementation
The machine follows the linked list, interprets the stored s4 as password,
and outputs n4.
p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd
free
head
=12
60
Exploiting the linked-list implementation
The machine follows the linked list, interprets the stored s4 as password,
and outputs n4. It then sets the three cells to be free and overwrites the
stored pd with the free-head.
p0 s0 n0 p3 s3 n3 p4 s4 n4 12 sd nd
free
head
=7 61
Exploiting the linked-list implementation
The machine follows the linked list, interprets the stored s4 as password,
and outputs n4. It then sets the three cells to be free and overwrites the
stored pd with the free-head. Attacker sends (12, X) and obtains sd .
p0 s0 n0 p3 s3 n3 p4 s4 n4 12 sd nd
free
head
=7 62
Proving non-exploitability of the flat-array variant
The proof-of-exploitability was constructive.
Proving non-exploitability has a different flavor.
It is simply enumerating all initially reachable weird states and showing
they lead nowhere.
63
Proving non-exploitability of the flat-array variant
By flipping a bit, an attacker can enter one of the following states:
1. A sane state where he modifies a previously-saved p by one bit.
2. A sane state where he modifies a previously-saved s by one bit.
3. A weird state where a password-field of a (0, 0)-pair is set to = 0
but the secret field of the pair is 0.
4. A weird state where a secret-field of a (0, 0)-pair is set to = 0.
The sane states do not give him any advantage in obtaining sd . What
about the weird states?
64
Proving non-exploitability of the flat-array variant
Examine the initial weird states:
3. A weird state where a password-field of a (0, 0)-pair is set to = 0
but the secret field of the pair is 0.
3.1 The machine can be made to spit out 0 given the right password,
then reverts to a sane state.
3.2 This is weird behavior, but does not violate security properties
4. A weird state where a secret-field of a (0, 0)-pair is set to = 0.
4.1 The machine will treat the pair as empty and overwrite it, reverting
to a sane state.
4.2 This is weird behavior, but does not violate security properties
The attacker is out of options.
65
What does all of this mean?
Interpreting all of this (1 of N)
Exploitation has very little to do with hijacking RIP/EIP.
All programs we considered had perfect control-flow integrity, and no
instruction pointer was hijacked.
Exploitation is programming a weird machine.
66
Properties of weird machines
Weird machines get more powerful as the emulator for the IFSM gets
more complex.
It seems that the presence of a linked list in the same address space
where a bit gets flipped may already imply “anything can happen” if the
attacker can cause unlink/link operations.
Weird machines are created out of the IFSM emulator. They are not
designed to be programmed, and the attacker writes “weird machine
assembler”.
67
Properties of weird machines
Since the weird machine arises from its “host”, different versions of the
same “host” may create similar weird machines.
This leads to attacker specialization: “X is the expert for IE exploitation.”
Attackers also end up writing libraries for recurrent exploitation of the
same targets. Nobody wants to write assembler from scratch, especially
not weird machine assembler.
68
Interpreting all of this (2 of N)
Many mitigations break one particular weird machine program.
Many mitigations can be “programmed around” by the attacker.
Many mitigations can be “bypassed once” (for a given target), then the
attacker has a “library” to repeat the feat when he finds the next bug.
69
Interpreting all of this (3 of N)
It is actually possible to write non-exploitable programs.
Exploring the space of non-exploitable programs seems worthwhile.
What datastructures can be implemented in non-exploitable manner?
At what computational cost?
70
Interpreting all of this (4 of N)
“Provably correct” is not the same as non-exploitable. These are
orthogonal concepts.
“Provably correct” means there is no software-only path to induce a
weird state.
Non-exploitable means all weird states a given attacker can reach resolve
to harmless sane states.
71
Interpreting all of this (5 of N)
“Turing-complete” is a fashionable way of showing the power of an
offensive technique in some academic papers.
It is a misuse of the term. It is trivial to produce a IFSM that simulates a
two-counter machine that is “Turing-complete”, but no security
properties are violated.
The right way of showing power is demonstrating violation of security
properties.
If you want to show more, demonstrate violation of all possible security
properties. So you want to show you can reach any pathological state.
(Turing-complete computation on arbitrary memory can do this).
72
Interpreting all of this (6 of N)
When trying to write non-exploitable programs, it is very hard to keep
“indirection” under control.
If one memory cell refers to another (directly or indirectly), it is often not
easy to assure it remains sane.
Theoretical computer science distinguishes between RAM machines with
indirect addressing and without. Is something similar at play here?
73
Summary
Summary
Exploitation is programming emergent weird machines.
It does not require EIP/RIP, and is not a bag of tricks.
Theory of exploitation is still in embryonic stage.
A lot of interesting questions - where will we stand in 10 years?
74
Questions?
74
Acknowledgements
A lot of people have discussed the topic with me and thus influenced my
views. In random order: Felix Lindner, Ralf-Philipp Weinmann, Willem
Pinckaers, Vincenzo Iozzo, Julien Vanegue, Sergey Bratus, William
Whistler, Sean Heelan, Sebastian Krahmer.
A lot of thanks for their patience and insight.
I have spoken to so many people about exploitation in recent years. If
you feel you should’ve been listed here, just assume you were :-)
I also have to thank Mara Tam for useful feedback and outside
perspective.
75
References
Creating a proper full bibliography is difficult and out of scope for this
conference talk. Some starting points:
[3] [2] [1]
References I
S. Bratus, J. Bangert, A. Gabrovsky, A. Shubina, M. E. Locasto, and
D. Bilar.
’weird machine’ patterns.
In C. Blackwell and H. Zhu, editors, Cyberpatterns, Unifying Design
Patterns with Security and Attack Patterns, pages 157–171.
Springer, 2014.
L. Sassaman, M. L. Patterson, S. Bratus, and M. E. Locasto.
Security applications of formal language theory.
IEEE Systems Journal, 7(3):489–500, 2013.
J. Vanegue.
The weird machines in proof-carrying code.
In IEEE Symposium on Security and Privacy Workshops, pages
209–213, 2014.
Appendix slides
Linked-list implementation
Transition (B): Memory ← Memory ∪ {(p, s)}.
Take first element from free-list head.
Linked-list implementation: Writing
How do we store something in memory?
Take first element from free head. Adjust free-list head.
Linked-list implementation
How do we store something in memory?
Take first element from free head. Adjust free-list head. Fill in p, s.
Linked-list implementation
How do we store something in memory?
Take first element from free-list head. Adjust free-list head. Fill in p, s.
Fill in next from the used-list head.
Linked-list implementation
How do we store something in memory?
Take first element from free-list head. Adjust free-list head. Fill in p, s.
Fill in next from the used-list head.
Linked-list implementation
How do we store something in memory?
Take first element from free-list head. Adjust free-list head. Fill in p, s.
Fill in next from the used-list head. Adjust used-list head.
Fill in next from the used-list head. Adjust used-list head.
Linked-list implementation
Transition (B): Memory ← Memory ∪ {(p, s)}.
Take first element from free-list head. Adjust free-list head. Fill in p, s.
Fill in next from the used-list head. Adjust used-list head. Done.
Linked-list implementation
Meditative slide for everybody to rest for a minute.
Linked-list implementation
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Follow used-list until p is found.
Linked-list implementation
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Follow used-list until p is found. Look at next.
Linked-list implementation
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Follow used-list until p is found. Adjust next that led us here so that the
block with p is removed from the used-list.
Linked-list implementation
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Follow used-list until p is found. Adjust next that led us here so that the
block with p is removed from the used-list.
Output s, and replace next with free-list head.
Linked-list implementation
Transition C: Memory ← {(p , s ) ∈ Memory|p = p}.
Follow used-list until p is found. Adjust next that led us here so that the
block with p is removed from the used-list.
Output s, and replace next with free-list head. Adjust free-list head.

Mais conteúdo relacionado

Mais procurados

FUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTINGFUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTINGMuH4f1Z
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisChong-Kuan Chen
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareBrandon Arvanaghi
 
Hacking with Remote Admin Tools (RAT)
 Hacking with Remote Admin Tools (RAT) Hacking with Remote Admin Tools (RAT)
Hacking with Remote Admin Tools (RAT)Zoltan Balazs
 
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016grecsl
 
Breadcrumbs to Loaves: BSides Austin '17
Breadcrumbs to Loaves: BSides Austin '17Breadcrumbs to Loaves: BSides Austin '17
Breadcrumbs to Loaves: BSides Austin '17Brandon Arvanaghi
 
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop camDefcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop camPriyanka Aash
 
Fuzzing underestimated method of finding hidden bugs
Fuzzing underestimated method of finding hidden bugsFuzzing underestimated method of finding hidden bugs
Fuzzing underestimated method of finding hidden bugsPawel Rzepa
 
Ransomware - what is it, how to protect against it
Ransomware - what is it, how to protect against itRansomware - what is it, how to protect against it
Ransomware - what is it, how to protect against itZoltan Balazs
 
Security & ethical hacking p2
Security & ethical hacking p2Security & ethical hacking p2
Security & ethical hacking p2ratnalajaggu
 
The Nightmare Fuzzing Suite and Blind Code Coverage Fuzzer
The Nightmare Fuzzing Suite and Blind Code Coverage FuzzerThe Nightmare Fuzzing Suite and Blind Code Coverage Fuzzer
The Nightmare Fuzzing Suite and Blind Code Coverage FuzzerJoxean Koret
 
Password Stealing & Enhancing User Authentication Using Opass Protocol
Password Stealing & Enhancing User Authentication Using Opass ProtocolPassword Stealing & Enhancing User Authentication Using Opass Protocol
Password Stealing & Enhancing User Authentication Using Opass ProtocolPrasad Pawar
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked LookJason Lang
 
Distributed Fuzzing Framework Design
Distributed Fuzzing Framework DesignDistributed Fuzzing Framework Design
Distributed Fuzzing Framework Designbannedit
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildCTruncer
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operationsSunny Neo
 

Mais procurados (20)

Luis Grangeia IBWAS
Luis Grangeia IBWASLuis Grangeia IBWAS
Luis Grangeia IBWAS
 
FUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTINGFUZZING & SOFTWARE SECURITY TESTING
FUZZING & SOFTWARE SECURITY TESTING
 
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware AnalysisInside the Matrix,How to Build Transparent Sandbox for Malware Analysis
Inside the Matrix,How to Build Transparent Sandbox for Malware Analysis
 
CheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted MalwareCheckPlease: Payload-Agnostic Targeted Malware
CheckPlease: Payload-Agnostic Targeted Malware
 
Hacking with Remote Admin Tools (RAT)
 Hacking with Remote Admin Tools (RAT) Hacking with Remote Admin Tools (RAT)
Hacking with Remote Admin Tools (RAT)
 
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
Deploying a Shadow Threat Intel Capability at Thotcon on May 6, 2016
 
Breadcrumbs to Loaves: BSides Austin '17
Breadcrumbs to Loaves: BSides Austin '17Breadcrumbs to Loaves: BSides Austin '17
Breadcrumbs to Loaves: BSides Austin '17
 
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop camDefcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
 
Fuzzing underestimated method of finding hidden bugs
Fuzzing underestimated method of finding hidden bugsFuzzing underestimated method of finding hidden bugs
Fuzzing underestimated method of finding hidden bugs
 
Ransomware - what is it, how to protect against it
Ransomware - what is it, how to protect against itRansomware - what is it, how to protect against it
Ransomware - what is it, how to protect against it
 
OWASP Much ado about randomness
OWASP Much ado about randomnessOWASP Much ado about randomness
OWASP Much ado about randomness
 
Security & ethical hacking p2
Security & ethical hacking p2Security & ethical hacking p2
Security & ethical hacking p2
 
The Nightmare Fuzzing Suite and Blind Code Coverage Fuzzer
The Nightmare Fuzzing Suite and Blind Code Coverage FuzzerThe Nightmare Fuzzing Suite and Blind Code Coverage Fuzzer
The Nightmare Fuzzing Suite and Blind Code Coverage Fuzzer
 
Password Stealing & Enhancing User Authentication Using Opass Protocol
Password Stealing & Enhancing User Authentication Using Opass ProtocolPassword Stealing & Enhancing User Authentication Using Opass Protocol
Password Stealing & Enhancing User Authentication Using Opass Protocol
 
Buffer Overflow Attacks
Buffer Overflow AttacksBuffer Overflow Attacks
Buffer Overflow Attacks
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
Distributed Fuzzing Framework Design
Distributed Fuzzing Framework DesignDistributed Fuzzing Framework Design
Distributed Fuzzing Framework Design
 
Ever Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the WildEver Present Persistence - Established Footholds Seen in the Wild
Ever Present Persistence - Established Footholds Seen in the Wild
 
.NET for hackers
.NET for hackers.NET for hackers
.NET for hackers
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
 

Destaque

Halvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedHalvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedArea41
 
How effective is the combination of my main product and ancillary
How effective is the combination of my main product and ancillaryHow effective is the combination of my main product and ancillary
How effective is the combination of my main product and ancillaryCraig Dennett
 
Buying or Selling an Investment Advisory Firm: A Lawyer\'s Perspective
Buying or Selling an Investment Advisory Firm: A Lawyer\'s PerspectiveBuying or Selling an Investment Advisory Firm: A Lawyer\'s Perspective
Buying or Selling an Investment Advisory Firm: A Lawyer\'s Perspectivejimeccleston
 
#GetsmART: Lessons from the Artists BLC15 Minikeynote
#GetsmART: Lessons from the Artists BLC15 Minikeynote#GetsmART: Lessons from the Artists BLC15 Minikeynote
#GetsmART: Lessons from the Artists BLC15 MinikeynoteAmy Burvall
 
Las nuevas tecnologías
Las nuevas tecnologíasLas nuevas tecnologías
Las nuevas tecnologíasMayra Canela
 
9.2.12 The Missional Church - Matthew 16:13-27
9.2.12 The Missional Church - Matthew 16:13-279.2.12 The Missional Church - Matthew 16:13-27
9.2.12 The Missional Church - Matthew 16:13-27Cody Nazarene Church
 
WSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi Solomon
WSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi SolomonWSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi Solomon
WSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi SolomonWSPDC & FEDSPUG
 
Seven most important metrics for video email marketing.
Seven most important metrics for video email marketing. Seven most important metrics for video email marketing.
Seven most important metrics for video email marketing. Vidoomail
 
WeChangeMakers: Dmajor's TFT keynote
WeChangeMakers: Dmajor's TFT keynoteWeChangeMakers: Dmajor's TFT keynote
WeChangeMakers: Dmajor's TFT keynote경만 고
 
Open Badges: A fit for purpose credit mechanism
Open Badges: A fit for purpose credit mechanismOpen Badges: A fit for purpose credit mechanism
Open Badges: A fit for purpose credit mechanismAmye Kenall
 
People in the Landscape
People in the LandscapePeople in the Landscape
People in the Landscapemaditabalnco
 
Who are the pharma social media butterflies?
Who are the pharma social media butterflies?Who are the pharma social media butterflies?
Who are the pharma social media butterflies?Ogilvy Health
 
Better Life Insurance Risk Assessment by Leveraging Medical Innovations
Better Life Insurance Risk Assessment by Leveraging Medical InnovationsBetter Life Insurance Risk Assessment by Leveraging Medical Innovations
Better Life Insurance Risk Assessment by Leveraging Medical InnovationsCognizant
 
大切なビジネスデータはownCloudに簡単バックアップ
大切なビジネスデータはownCloudに簡単バックアップ大切なビジネスデータはownCloudに簡単バックアップ
大切なビジネスデータはownCloudに簡単バックアップYuki Takahashi
 
Buzzword Bingo 2014
Buzzword Bingo 2014Buzzword Bingo 2014
Buzzword Bingo 2014ron mader
 
Digital Locker User Manual
Digital Locker User ManualDigital Locker User Manual
Digital Locker User ManualAmit Ranjan
 
Le Parc Rjz & Cyrela
Le Parc    Rjz & CyrelaLe Parc    Rjz & Cyrela
Le Parc Rjz & Cyrelaimoveisdorio
 

Destaque (20)

Halvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromisedHalvar Flake: Why Johnny can’t tell if he is compromised
Halvar Flake: Why Johnny can’t tell if he is compromised
 
Three things that rowhammer taught me by Halvar Flake
Three things that rowhammer taught me by Halvar FlakeThree things that rowhammer taught me by Halvar Flake
Three things that rowhammer taught me by Halvar Flake
 
Die....
Die....Die....
Die....
 
How effective is the combination of my main product and ancillary
How effective is the combination of my main product and ancillaryHow effective is the combination of my main product and ancillary
How effective is the combination of my main product and ancillary
 
Buying or Selling an Investment Advisory Firm: A Lawyer\'s Perspective
Buying or Selling an Investment Advisory Firm: A Lawyer\'s PerspectiveBuying or Selling an Investment Advisory Firm: A Lawyer\'s Perspective
Buying or Selling an Investment Advisory Firm: A Lawyer\'s Perspective
 
#GetsmART: Lessons from the Artists BLC15 Minikeynote
#GetsmART: Lessons from the Artists BLC15 Minikeynote#GetsmART: Lessons from the Artists BLC15 Minikeynote
#GetsmART: Lessons from the Artists BLC15 Minikeynote
 
Las nuevas tecnologías
Las nuevas tecnologíasLas nuevas tecnologías
Las nuevas tecnologías
 
9.2.12 The Missional Church - Matthew 16:13-27
9.2.12 The Missional Church - Matthew 16:13-279.2.12 The Missional Church - Matthew 16:13-27
9.2.12 The Missional Church - Matthew 16:13-27
 
WSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi Solomon
WSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi SolomonWSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi Solomon
WSPDC June 2013: Working with Large Lists in SharePoint 2010 by Zewdi Solomon
 
Seven most important metrics for video email marketing.
Seven most important metrics for video email marketing. Seven most important metrics for video email marketing.
Seven most important metrics for video email marketing.
 
Economía Popular y Solidaria
Economía Popular y SolidariaEconomía Popular y Solidaria
Economía Popular y Solidaria
 
WeChangeMakers: Dmajor's TFT keynote
WeChangeMakers: Dmajor's TFT keynoteWeChangeMakers: Dmajor's TFT keynote
WeChangeMakers: Dmajor's TFT keynote
 
Open Badges: A fit for purpose credit mechanism
Open Badges: A fit for purpose credit mechanismOpen Badges: A fit for purpose credit mechanism
Open Badges: A fit for purpose credit mechanism
 
People in the Landscape
People in the LandscapePeople in the Landscape
People in the Landscape
 
Who are the pharma social media butterflies?
Who are the pharma social media butterflies?Who are the pharma social media butterflies?
Who are the pharma social media butterflies?
 
Better Life Insurance Risk Assessment by Leveraging Medical Innovations
Better Life Insurance Risk Assessment by Leveraging Medical InnovationsBetter Life Insurance Risk Assessment by Leveraging Medical Innovations
Better Life Insurance Risk Assessment by Leveraging Medical Innovations
 
大切なビジネスデータはownCloudに簡単バックアップ
大切なビジネスデータはownCloudに簡単バックアップ大切なビジネスデータはownCloudに簡単バックアップ
大切なビジネスデータはownCloudに簡単バックアップ
 
Buzzword Bingo 2014
Buzzword Bingo 2014Buzzword Bingo 2014
Buzzword Bingo 2014
 
Digital Locker User Manual
Digital Locker User ManualDigital Locker User Manual
Digital Locker User Manual
 
Le Parc Rjz & Cyrela
Le Parc    Rjz & CyrelaLe Parc    Rjz & Cyrela
Le Parc Rjz & Cyrela
 

Semelhante a Understanding the fundamentals of attacks

20101017 program analysis_for_security_livshits_lecture03_security
20101017 program analysis_for_security_livshits_lecture03_security20101017 program analysis_for_security_livshits_lecture03_security
20101017 program analysis_for_security_livshits_lecture03_securityComputer Science Club
 
amer-network-sihubconferances-security.ppt
amer-network-sihubconferances-security.pptamer-network-sihubconferances-security.ppt
amer-network-sihubconferances-security.pptnavidkamrava
 
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit AutomationMoabi.com
 
Crypto workshop part 3 - Don't do this yourself
Crypto workshop part 3 - Don't do this yourselfCrypto workshop part 3 - Don't do this yourself
Crypto workshop part 3 - Don't do this yourselfhannob
 
Crash Analysis with Reverse Taint
Crash Analysis with Reverse TaintCrash Analysis with Reverse Taint
Crash Analysis with Reverse Taintmarekzmyslowski
 
Learn awesome hacking tricks
Learn awesome hacking tricksLearn awesome hacking tricks
Learn awesome hacking tricksSudhanshu Mishra
 
Machine Learning and Inductive Inference
Machine Learning and Inductive InferenceMachine Learning and Inductive Inference
Machine Learning and Inductive Inferencebutest
 
Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Paul Houle
 
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory AnalysisMoabi.com
 
Analysis of Godot Engine's Source Code
Analysis of Godot Engine's Source CodeAnalysis of Godot Engine's Source Code
Analysis of Godot Engine's Source CodePVS-Studio
 
Cryptography for developers
Cryptography for developersCryptography for developers
Cryptography for developersKai Koenig
 
Monitoring a program that monitors computer networks
Monitoring a program that monitors computer networksMonitoring a program that monitors computer networks
Monitoring a program that monitors computer networksAndrey Karpov
 
A look at computer security
A look at computer securityA look at computer security
A look at computer securityAhmed Mekkawy
 
Cyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptxCyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptxYashSomalkar
 

Semelhante a Understanding the fundamentals of attacks (20)

20101017 program analysis_for_security_livshits_lecture03_security
20101017 program analysis_for_security_livshits_lecture03_security20101017 program analysis_for_security_livshits_lecture03_security
20101017 program analysis_for_security_livshits_lecture03_security
 
amer-network-sihubconferances-security.ppt
amer-network-sihubconferances-security.pptamer-network-sihubconferances-security.ppt
amer-network-sihubconferances-security.ppt
 
Windows Hacking
Windows HackingWindows Hacking
Windows Hacking
 
[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation[HITB Malaysia 2011] Exploit Automation
[HITB Malaysia 2011] Exploit Automation
 
Interpolique
InterpoliqueInterpolique
Interpolique
 
Crypto workshop part 3 - Don't do this yourself
Crypto workshop part 3 - Don't do this yourselfCrypto workshop part 3 - Don't do this yourself
Crypto workshop part 3 - Don't do this yourself
 
Interpolique
InterpoliqueInterpolique
Interpolique
 
Crash Analysis with Reverse Taint
Crash Analysis with Reverse TaintCrash Analysis with Reverse Taint
Crash Analysis with Reverse Taint
 
Learn awesome hacking tricks
Learn awesome hacking tricksLearn awesome hacking tricks
Learn awesome hacking tricks
 
Machine Learning and Inductive Inference
Machine Learning and Inductive InferenceMachine Learning and Inductive Inference
Machine Learning and Inductive Inference
 
Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6Chatbots in 2017 -- Ithaca Talk Dec 6
Chatbots in 2017 -- Ithaca Talk Dec 6
 
[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis[Kiwicon 2011] Post Memory Corruption Memory Analysis
[Kiwicon 2011] Post Memory Corruption Memory Analysis
 
Logs And Backups
Logs And BackupsLogs And Backups
Logs And Backups
 
Truth and Consequences
Truth and ConsequencesTruth and Consequences
Truth and Consequences
 
Analysis of Godot Engine's Source Code
Analysis of Godot Engine's Source CodeAnalysis of Godot Engine's Source Code
Analysis of Godot Engine's Source Code
 
Cryptography for developers
Cryptography for developersCryptography for developers
Cryptography for developers
 
Monitoring a program that monitors computer networks
Monitoring a program that monitors computer networksMonitoring a program that monitors computer networks
Monitoring a program that monitors computer networks
 
Grounded Pointers
Grounded PointersGrounded Pointers
Grounded Pointers
 
A look at computer security
A look at computer securityA look at computer security
A look at computer security
 
Cyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptxCyber Security Workshop Presentation.pptx
Cyber Security Workshop Presentation.pptx
 

Mais de Cyber Security Alliance

Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Cyber Security Alliance
 
iOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itiOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itCyber Security Alliance
 
Why huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksWhy huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksCyber Security Alliance
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCyber Security Alliance
 
Introducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsIntroducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsCyber Security Alliance
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemCyber Security Alliance
 
Easy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fEasy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fCyber Security Alliance
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Cyber Security Alliance
 
Offline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupOffline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupCyber Security Alliance
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...Cyber Security Alliance
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptCyber Security Alliance
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureCyber Security Alliance
 

Mais de Cyber Security Alliance (20)

Bug Bounty @ Swisscom
Bug Bounty @ SwisscomBug Bounty @ Swisscom
Bug Bounty @ Swisscom
 
Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?Robots are among us, but who takes responsibility?
Robots are among us, but who takes responsibility?
 
iOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce itiOS malware: what's the risk and how to reduce it
iOS malware: what's the risk and how to reduce it
 
Why huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacksWhy huntung IoC fails at protecting against targeted attacks
Why huntung IoC fails at protecting against targeted attacks
 
Corporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomwareCorporations - the new victims of targeted ransomware
Corporations - the new victims of targeted ransomware
 
Blockchain for Beginners
Blockchain for Beginners Blockchain for Beginners
Blockchain for Beginners
 
Le pentest pour les nuls #cybsec16
Le pentest pour les nuls #cybsec16Le pentest pour les nuls #cybsec16
Le pentest pour les nuls #cybsec16
 
Introducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging appsIntroducing Man in the Contacts attack to trick encrypted messaging apps
Introducing Man in the Contacts attack to trick encrypted messaging apps
 
Rump : iOS patch diffing
Rump : iOS patch diffingRump : iOS patch diffing
Rump : iOS patch diffing
 
An easy way into your sap systems v3.0
An easy way into your sap systems v3.0An easy way into your sap systems v3.0
An easy way into your sap systems v3.0
 
Reverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande ModemReverse engineering Swisscom's Centro Grande Modem
Reverse engineering Swisscom's Centro Grande Modem
 
Easy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 fEasy public-private-keys-strong-authentication-using-u2 f
Easy public-private-keys-strong-authentication-using-u2 f
 
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
 
Offline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setupOffline bruteforce attack on wi fi protected setup
Offline bruteforce attack on wi fi protected setup
 
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
App secforum2014 andrivet-cplusplus11-metaprogramming_applied_to_software_obf...
 
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScriptWarning Ahead: SecurityStorms are Brewing in Your JavaScript
Warning Ahead: SecurityStorms are Brewing in Your JavaScript
 
Killing any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented featureKilling any security product … using a Mimikatz undocumented feature
Killing any security product … using a Mimikatz undocumented feature
 
Rump attaque usb_caralinda_fabrice
Rump attaque usb_caralinda_fabriceRump attaque usb_caralinda_fabrice
Rump attaque usb_caralinda_fabrice
 
Operation emmental appsec
Operation emmental appsecOperation emmental appsec
Operation emmental appsec
 
Hacking the swisscom modem
Hacking the swisscom modemHacking the swisscom modem
Hacking the swisscom modem
 

Último

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 

Último (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 

Understanding the fundamentals of attacks

  • 1. Understanding the fundamentals of attacks What is happening when someone writes an exploit? Halvar Flake / Thomas Dullien November 3, 2016 The /home owners association
  • 2. Table of contents 1. The need to define “exploit” 2. Defining bug-free and buggy software 3. Intended states, CPU states, and weird states 4. Input streams as instruction streams 5. Provably exploitable and provably unexploitable code 6. What does all of this mean? 7. Summary 1
  • 3. The need to define “exploit”
  • 4. What, exactly, is an ‘exploit’? What, exactly, is an exploit? Central concept in computer security. Valuable currency: Used to be barter-traded, now is traded for $$$. Could you define it so that an old-school computer scientist understands? 2
  • 5. What, exactly, is an ‘exploit’? In spite of centrality of the concept, it is ill-defined. Informal definitions abound, from overly abstract to overly concrete: “A program that allows you to do something that you are not supposed to be able to do.” “I recognize an exploit when I see it.” “Magic” “When you overwrite EIP” 3
  • 6. Why is the lack of a definition a problem? Problem 1: Since we do not have clear definitions, we fall into scholastic arguments: “Adding a cookie to the heap here will stop exploits - it breaks the technique described in Phrack!” “It is just a single bit error, and hence not exploitable.” Since we do not have clear definitions, these statements cannot be reasoned about properly. 4
  • 7. Why is the lack of a definition a problem? Computer security is full of non-scientific statements, assertions, and unquantifiable handwaving. Mitigations are supposed to “raise the bar”, but: Bar-raising 1. How much will the bar be raised? 2. Will it cost the attacker time once, or will it cost him time on each exploit? 3. Is the cost (performance, complexity) worth the gain? Our discussions are similar to “how many angels can balance on the tip of a needle”. 5
  • 8. Why is the lack of a definition a problem? Most defenders have no first-hand experience with a modern exploit. With security jobs doubling every 4 years, scholasticism is a real problem. Incentive structures are harmful: Happy defender 1. Come up with overspecific countermeasures 2. Show progress to superiors & get promoted Happy attacker 1. Bypass overspecific countermeasures 2. Hack all the things 3. Show progress to superiors & get promoted 6
  • 9. Why is the lack of a definition a problem? Problem 2: We fail at teaching it properly, and instead teach a “bag of tricks” The broken exploitation curriculum: 1. Learn about stack smashing 2. Learn about heap implementation X, Y, and Z 3. Learn about SQL injection 4. Learn about ASLR and other mitigations 5. Learn about XSS 6. Learn about other overly special cases Disjoint, disparate, and terrible at transmitting principles. Too many people “miss the forest for the trees” as a result. 7
  • 10. Why is there no good theoretical body on exploits? “Philosophy of science is about as useful to scientists as ornithology is to birds” (Feynman) Exploit practitioners know the intuitions they need, and have no incentive to formalize or disseminate their mental models. 8
  • 11. This talk Explains the “right” way to think about exploits and exploit writing1 . Introduces an attacker model for memory corruptions that allows us to reason about large classes of attacks. Discusses a few theoretical results & their consequences. Omits proofs and extreme formalism. ... but remains a theoretical CS talk, so don’t fall asleep! 1“Right” as subjectively judged by me, but I have impeccable taste in exploits. 9
  • 12. Credit where it is due Intuitions behind this talk are known to many exploit practitioners. “Folk theorems” - results are known, but not formally written down anywhere. The LANGSEC2 community have contributed strongly to the discussion and evolution of ideas. 2L. Sassaman, M. L. Patterson, S. Bratus, J. Vanegue etc. ... 10
  • 13. Defining bug-free and buggy software
  • 14. Recap: Finite state machines A graph of states, and input drives the machine along edges (“transitions”) to other states. State 1 State 2 State 3 ‘A’ ‘B’ ‘A’ ‘D’ ‘E’ If you are unfamiliar with finite-state machines, think of such diagrams: 11
  • 15. The intended (finite state) machine Why write software? Because you wish to address a problem. You want to have a machine that does something specific for you. Ideally, you want to have a specific finite-state machine that addresses your problem. 12
  • 16. The intended (finite state) machine Unfortunately, you do not have this machine: All you have is a general-purpose computer. So you build an emulator that emulates the machine you would like to have on a general-purpose computer. Programming is, at its heart, construction of finite-state-machine emulators. 3 3Some people may disagree, but it is true for finite-RAM (e.g. real) machines 13
  • 17. The intended (finite state) machine The machine that addresses the problem is the intended finite state machine: The machine you wanted to build. By definition, it is bug-free: It does exactly what you want it to do, and nothing else. All theory is grey, so let’s define a small IFSM: A system that stores 5000 password / secret-value combinations 14
  • 18. The IFSM A simple secret-keeping machine: A: Read password/secret B: Store pair in memory C: Remove pair from memory Output the requested secret D: Output error message New password? Fewer than 5000 stored? Pass/secret not equal 0? Existing password? Pass/secret equal 0? Already 5000 stored? 15
  • 19. The IFSM, slightly more formal A simple secret-keeping machine: Read input password/secret read(p) read(s) Store pair in memory (B) Memory ← Memory ∪ {(p, s)} Output the requested secret (C) Memory ← {(p , s ) ∈ Memory | p = p} print(s ) Output error message (D) print(0) IF condition b: ∀(p , s ) ∈ Memory : p = p |Memory| ≤ 4999 s = 0, p = 0 IF condition c: ∃(p , s ) ∈ Memory : p = p s = 0 IF condition d: s = 0 ∨p = 0 ∨ |Memory| = 5000 16
  • 20. Implementing the IFSM This machine can be implemented in many ways. We will examine 2 different implementations. Memory in the IFSM is a set. Computers do not know sets. Our two implementations will emulate Memory via (1) a flat array and via (2) a linked list. 17
  • 21. Flat-array implementation: Writing Divides memory into pairs of memory cells. Pairs are either empty (and both 0), or represent secret/password combo. Insertion is linear scan for empty pair and writing there. Removal is linear scan for correct pair and removing it. We refer to such a pair as (p, s). 18
  • 22. Flat-array implementation: Writing Transition (B): Memory ← Memory ∪ {(p, s)}. Search for first pair with p = 0, write data there. 19
  • 23. Flat-array implementation: Writing Transition (B): Memory ← Memory ∪ {(p, s)}. Search for first pair with p = 0, write data there. 20
  • 24. Flat-array implementation: Writing Transition (B): Memory ← Memory ∪ {(p, s)}. Search for first pair with p = 0, write data there. P S 21
  • 25. Flat-array implementation: Writing Transition (B): Memory ← Memory ∪ {(p, s)}. Search for first pair with p = 0, write data there. P S 22
  • 26. Flat-array implementation: Reading Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Searching for a specific p and removing the pair. P S 23
  • 27. Flat-array implementation: Reading Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Searching for a specific p and removing the pair. P S Linear sweep until right p is found. 24
  • 28. Flat-array implementation: Reading Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Searching for a specific p and removing the pair. P S Linearly sweep until right p is found. Output corresponding s. 25
  • 29. Flat-array implementation: Reading Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Searching for a specific p and removing the pair. Linearly sweep until right p is found. Output corresponding s. Zero memory cell. 26
  • 30. Flat-array implementation: Reading Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Searching for a specific p and removing the pair. Linearly sweep until right p is found. Output corresponding s. Zero memory cell. 27
  • 31. The linked-list implementation Linearly sweeping memory is computationally expensive and not very CSy. Let us replace the flat array with a linked list for free and used tuples. Divide memory into 3-tuples: (p, s, next). Keep track of two list heads for free and used tuples. 28
  • 33. Linked-List implementation Keep all used blocks in a linked list. 30
  • 34. Linked-List implementation Keep all free blocks in a linked list. 31
  • 35. Linked-List implementation Keep two list heads in registers. 32
  • 36. Linked-list implementation details Very detailed step-by-step slides for what happens are in the appendix, but most people will be familiar with linked-list unlinks. We will look at the machine implementation in more detail later. Right now, we need to define what security properties are. 33
  • 37. Security properties of the IFSM The security properties of the IFSM are “what we want to be true” for the IFSM. This is needed to define “winning” for an attacker: He wins when he defeats the security properties of the IFSM. The security property is just a statement about input and output sequences of the IFSM. 34
  • 38. Security properties of the IFSM A secret-keeping machine should not allow the secrets to be retrieved by someone who does not know the password. “If the system stores a pair (p, s) it should be practically infeasible for the attacker to obtain s if he does not know p”. 35
  • 39. Intended states, CPU states, and weird states
  • 40. Intended states There is one IFSM state for each possible configuration of Memory. At the same time, we saw that there can be multiple states of the CPU that represent the same IFSM state (sets do not care about ordering). You can map between intended states and sets of CPU states: Every state of the IFSM can be represented by one or more CPU states. But many CPU states do not represent any state of the IFSM. 36
  • 41. CPU states CPU states can fall into one of three categories: Sane states: A CPU state which corresponds to a state of the IFSM. Transitory states: A CPU state which inevitably irrespective of further input or output leads to a sane state. These occur when the emulator emulates a transition arrow of the IFSM using multiple instructions. Weird states: A CPU state that does not correspond to a state of the IFSM, and hence cannot be interpreted as a representation of the IFSM. 37
  • 42. Weird states How can the CPU enter a weird state? Programming mistakes Bitflips in DRAM Broken data on your harddisk that gets paged in ... and a myriad of other ways ... 38
  • 43. Emulated transitions on weird states The program that executes on the CPU usually cannot know it has entered a weird state. It will happily continue executing until an exception occurrs. This means that it will emulate transitions intended for a sane state on a weird state. This transforms one weird state into (usually) another weird state. 39
  • 44. Emulated transitions on weird states Once a weird state is entered, many other weird states can be reached by applying the transitions intended for sane states on them. A new computational device emerges, the weird machine. The weird machine is the computing device that arises from the operation of the emulated transitions of the IFSM on weird states. ...time for a radical change of perspective... 40
  • 45. Input streams as instruction streams
  • 46. Normal model of computation State 1 State 2 State 3 State 4 State 5 Input Input Instruction Instruction Instruction Instruction Program Data 41
  • 47. Normal model of computation Summarize the middle transitions. State 1 State 4 State 5 Input Input Instruction(s) Instruction(s) Program Data 42
  • 48. Attacker model of computation State 1 State 4 State 5 Input Input Instruction(s) Instruction(s) Data Program 43
  • 49. Switching perspective Any computing device that accepts input and reacts to this input by executing a different program path can be viewed as a computing device where the inputs are the program. If no weird state can ever be entered, this is no problem, and intended. If there is a way to enter a weird state, all hell breaks loose: The attacker is now programming your computer. 44
  • 50. The essence of exploitation Given a method to enter a weird state from a set of particular sane states, exploitation is the process of setup (choosing the right sane state), instantiation (entering the weird state) and programming of the weird machine so that security properties of the IFSM are violated. 45
  • 51. Provably exploitable and provably unexploitable code
  • 52. Attacker model Cryptography has a variety of attacker models of different strengths. Plaintext-only. Chosen-ciphertext. Chosen-plaintext. Adaptive chosen-plaintext. These attacker models define what an attacker is allowed to do and generalize many real-world attacks. They are usually quite powerful, and allow reasoning about large classes of attacks and defenses. 46
  • 53. Attacker model Let us introduce a simple (yet powerful) attacker model for memory corruptions: A chosen-bitflip-once attacker is allowed to corrupt exactly one bit of memory exactly once, when the machine is waiting for input. There are many other attacker models that are sensible and imaginable - but we won’t discuss them here. 47
  • 54. Attacker model Our attacker model works as follows: 1. Attacker gets to send inputs to the machine 2. Defender gets to send an input (p, s) to the machine 3. Attacker gets to send inputs to the machine 4. Attacker gets to flip exactly one bit of his choosing 5. Attacker gets to send more inputs to the machine to obtain s The chosen-bitflip-once attacker is a fairly strong attacker model, but not unreasonably so. 48
  • 55. Proving exploitability of the linked-list variant The time-honored way of showing exploitability is providing an exploit. We follow the same route: We describe a sequence of operations that allows the attacker to obtain the secret. 49
  • 56. Exploiting the linked-list implementation Initial state is a list of empty 3-tuples. free head =0 50
  • 57. Exploiting the linked-list implementation Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. free head =9 p0 s0 n0 p1 s1 n1 p2 s2 n2 51
  • 58. Exploiting the linked-list implementation Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends (pd , sd ). p0 s0 n0 p1 s1 n1 p2 s2 n2 pd sd nd free head =12 52
  • 59. Exploiting the linked-list implementation Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends (pd , sd ). Attacker sends (p2, X). p0 s0 n0 p1 s2 n3 p2 s2 n2 pd sd nd free head =6 53
  • 60. Exploiting the linked-list implementation Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends (pd , sd ). Attacker sends (p2, X), (p1, X). p0 s0 n0 p1 s1 n1 p2 s2 n2 pd sd nd free head =3 54
  • 61. Exploiting the linked-list implementation Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends (pd , sd ). Attacker sends (p2, X), (p1, X), (p3, s3). p0 s0 n0 p3 s3 n3 p2 s2 n2 pd sd nd free head =6 55
  • 62. Exploiting the linked-list implementation Attacker sends (p0, s0), (p1, s1), (p2, s2) sequence. Defender sends (pd , sd ). Attacker sends (p2, X), (p1, X), (p3, s3), (p4, s4). p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd free head =12 56
  • 63. Exploiting the linked-list implementation The machine is still in an entirely sane state. p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd free head =12 57
  • 64. Exploiting the linked-list implementation The attacker gets to corrupt one bit, incrementing n3. p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd free head =12 58
  • 65. Exploiting the linked-list implementation The attacker gets to corrupt one bit, incrementing n3. He then sends in (s4, X). p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd free head =12 59
  • 66. Exploiting the linked-list implementation The machine follows the linked list, interprets the stored s4 as password, and outputs n4. p0 s0 n0 p3 s3 n3 p4 s4 n4 pd sd nd free head =12 60
  • 67. Exploiting the linked-list implementation The machine follows the linked list, interprets the stored s4 as password, and outputs n4. It then sets the three cells to be free and overwrites the stored pd with the free-head. p0 s0 n0 p3 s3 n3 p4 s4 n4 12 sd nd free head =7 61
  • 68. Exploiting the linked-list implementation The machine follows the linked list, interprets the stored s4 as password, and outputs n4. It then sets the three cells to be free and overwrites the stored pd with the free-head. Attacker sends (12, X) and obtains sd . p0 s0 n0 p3 s3 n3 p4 s4 n4 12 sd nd free head =7 62
  • 69. Proving non-exploitability of the flat-array variant The proof-of-exploitability was constructive. Proving non-exploitability has a different flavor. It is simply enumerating all initially reachable weird states and showing they lead nowhere. 63
  • 70. Proving non-exploitability of the flat-array variant By flipping a bit, an attacker can enter one of the following states: 1. A sane state where he modifies a previously-saved p by one bit. 2. A sane state where he modifies a previously-saved s by one bit. 3. A weird state where a password-field of a (0, 0)-pair is set to = 0 but the secret field of the pair is 0. 4. A weird state where a secret-field of a (0, 0)-pair is set to = 0. The sane states do not give him any advantage in obtaining sd . What about the weird states? 64
  • 71. Proving non-exploitability of the flat-array variant Examine the initial weird states: 3. A weird state where a password-field of a (0, 0)-pair is set to = 0 but the secret field of the pair is 0. 3.1 The machine can be made to spit out 0 given the right password, then reverts to a sane state. 3.2 This is weird behavior, but does not violate security properties 4. A weird state where a secret-field of a (0, 0)-pair is set to = 0. 4.1 The machine will treat the pair as empty and overwrite it, reverting to a sane state. 4.2 This is weird behavior, but does not violate security properties The attacker is out of options. 65
  • 72. What does all of this mean?
  • 73. Interpreting all of this (1 of N) Exploitation has very little to do with hijacking RIP/EIP. All programs we considered had perfect control-flow integrity, and no instruction pointer was hijacked. Exploitation is programming a weird machine. 66
  • 74. Properties of weird machines Weird machines get more powerful as the emulator for the IFSM gets more complex. It seems that the presence of a linked list in the same address space where a bit gets flipped may already imply “anything can happen” if the attacker can cause unlink/link operations. Weird machines are created out of the IFSM emulator. They are not designed to be programmed, and the attacker writes “weird machine assembler”. 67
  • 75. Properties of weird machines Since the weird machine arises from its “host”, different versions of the same “host” may create similar weird machines. This leads to attacker specialization: “X is the expert for IE exploitation.” Attackers also end up writing libraries for recurrent exploitation of the same targets. Nobody wants to write assembler from scratch, especially not weird machine assembler. 68
  • 76. Interpreting all of this (2 of N) Many mitigations break one particular weird machine program. Many mitigations can be “programmed around” by the attacker. Many mitigations can be “bypassed once” (for a given target), then the attacker has a “library” to repeat the feat when he finds the next bug. 69
  • 77. Interpreting all of this (3 of N) It is actually possible to write non-exploitable programs. Exploring the space of non-exploitable programs seems worthwhile. What datastructures can be implemented in non-exploitable manner? At what computational cost? 70
  • 78. Interpreting all of this (4 of N) “Provably correct” is not the same as non-exploitable. These are orthogonal concepts. “Provably correct” means there is no software-only path to induce a weird state. Non-exploitable means all weird states a given attacker can reach resolve to harmless sane states. 71
  • 79. Interpreting all of this (5 of N) “Turing-complete” is a fashionable way of showing the power of an offensive technique in some academic papers. It is a misuse of the term. It is trivial to produce a IFSM that simulates a two-counter machine that is “Turing-complete”, but no security properties are violated. The right way of showing power is demonstrating violation of security properties. If you want to show more, demonstrate violation of all possible security properties. So you want to show you can reach any pathological state. (Turing-complete computation on arbitrary memory can do this). 72
  • 80. Interpreting all of this (6 of N) When trying to write non-exploitable programs, it is very hard to keep “indirection” under control. If one memory cell refers to another (directly or indirectly), it is often not easy to assure it remains sane. Theoretical computer science distinguishes between RAM machines with indirect addressing and without. Is something similar at play here? 73
  • 82. Summary Exploitation is programming emergent weird machines. It does not require EIP/RIP, and is not a bag of tricks. Theory of exploitation is still in embryonic stage. A lot of interesting questions - where will we stand in 10 years? 74
  • 84. Acknowledgements A lot of people have discussed the topic with me and thus influenced my views. In random order: Felix Lindner, Ralf-Philipp Weinmann, Willem Pinckaers, Vincenzo Iozzo, Julien Vanegue, Sergey Bratus, William Whistler, Sean Heelan, Sebastian Krahmer. A lot of thanks for their patience and insight. I have spoken to so many people about exploitation in recent years. If you feel you should’ve been listed here, just assume you were :-) I also have to thank Mara Tam for useful feedback and outside perspective. 75
  • 85. References Creating a proper full bibliography is difficult and out of scope for this conference talk. Some starting points: [3] [2] [1]
  • 86. References I S. Bratus, J. Bangert, A. Gabrovsky, A. Shubina, M. E. Locasto, and D. Bilar. ’weird machine’ patterns. In C. Blackwell and H. Zhu, editors, Cyberpatterns, Unifying Design Patterns with Security and Attack Patterns, pages 157–171. Springer, 2014. L. Sassaman, M. L. Patterson, S. Bratus, and M. E. Locasto. Security applications of formal language theory. IEEE Systems Journal, 7(3):489–500, 2013. J. Vanegue. The weird machines in proof-carrying code. In IEEE Symposium on Security and Privacy Workshops, pages 209–213, 2014.
  • 88. Linked-list implementation Transition (B): Memory ← Memory ∪ {(p, s)}. Take first element from free-list head.
  • 89. Linked-list implementation: Writing How do we store something in memory? Take first element from free head. Adjust free-list head.
  • 90. Linked-list implementation How do we store something in memory? Take first element from free head. Adjust free-list head. Fill in p, s.
  • 91. Linked-list implementation How do we store something in memory? Take first element from free-list head. Adjust free-list head. Fill in p, s. Fill in next from the used-list head.
  • 92. Linked-list implementation How do we store something in memory? Take first element from free-list head. Adjust free-list head. Fill in p, s. Fill in next from the used-list head.
  • 93. Linked-list implementation How do we store something in memory? Take first element from free-list head. Adjust free-list head. Fill in p, s. Fill in next from the used-list head. Adjust used-list head. Fill in next from the used-list head. Adjust used-list head.
  • 94. Linked-list implementation Transition (B): Memory ← Memory ∪ {(p, s)}. Take first element from free-list head. Adjust free-list head. Fill in p, s. Fill in next from the used-list head. Adjust used-list head. Done.
  • 95. Linked-list implementation Meditative slide for everybody to rest for a minute.
  • 96. Linked-list implementation Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Follow used-list until p is found.
  • 97. Linked-list implementation Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Follow used-list until p is found. Look at next.
  • 98. Linked-list implementation Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Follow used-list until p is found. Adjust next that led us here so that the block with p is removed from the used-list.
  • 99. Linked-list implementation Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Follow used-list until p is found. Adjust next that led us here so that the block with p is removed from the used-list. Output s, and replace next with free-list head.
  • 100. Linked-list implementation Transition C: Memory ← {(p , s ) ∈ Memory|p = p}. Follow used-list until p is found. Adjust next that led us here so that the block with p is removed from the used-list. Output s, and replace next with free-list head. Adjust free-list head.