SlideShare a Scribd company logo
Pinpointing Vulnerabilities
Yue Chen, Mustakimur Khandaker, Zhi Wang
Florida State University
12th ACM Asia Conference on Computer and Communications Security
Question
• When an attack is detected, how to locate the
underlying vulnerability?
2Pinpointing Vulnerabilities | AsiaCCS '17
Attack Vulnerability
Example
• A control-flow violation is detected at line 6.
• The vulnerability lies at line 4 (buffer overflow).
3Pinpointing Vulnerabilities | AsiaCCS '17
Root Cause
Symptom
Attack Detection v.s. Vulnerability Locating
• Control-flow Integrity (CFI)
– Detect the control-flow graph violation (e.g., on
function returns)
• Taint Analysis
– Detect tainted data being loaded to PC
• System Call Interposition
– Detect abnormal syscalls made by the payload
Pinpointing Vulnerabilities | AsiaCCS '17 4
Manifestation of attack rarely coincides
with the vulnerabilities
Ravel – Three Components
• Online attack detector
• Record & replay with instrumentation
• Offline vulnerability locator
Pinpointing Vulnerabilities | AsiaCCS '17 5
RAVEL:
Root-cause
Analysis of
Vulnerabilities from
Exploitation
Log
Ravel – Strengths
1. Reliably reproduce real-world attacks in the lab
environment
2. Low online performance overhead
– Locating vulnerabilities is time-consuming
3. Extensible:
– New attack detection and vulnerability locating
techniques can be easily integrated
– (already support a variety of vulnerability locating
techniques)
Pinpointing Vulnerabilities | AsiaCCS '17 6
Attack Detection
• Ravel uses existing attack detection methods
– Program crash (or other exceptions)
– Abnormal system calls (sequence/arguments)
– Control-flow integrity violation (to be included)
• New methods can be easily adopted by Ravel
Pinpointing Vulnerabilities | AsiaCCS '17 7
Record & Replay
• What to record & replay?
– All the non-deterministic inputs (e.g., network packets)
• Where to record & replay?
– Application interface
– Library interface
– Virtual machine interface
– System call interface
Pinpointing Vulnerabilities | AsiaCCS '17 8
Record & Replay
• What to record & replay?
– All the non-deterministic inputs (e.g., network packets)
• Where to record & replay?
– Application interface
– Library interface
– Virtual machine interface
– System call interface
Pinpointing Vulnerabilities | AsiaCCS '17 9
More robust against attacks, with low cost
Record
Pinpointing Vulnerabilities | AsiaCCS '17 10
System call return values
Userspace data structures modified by syscalls
Data copied from kernel to userspace
Asynchronous signals
Special instructions (e.g., RDTSC)
Synchronization primitives
Replay with Instrumentation
• Some syscalls replayed without real execution
– e.g., gettimeofday
• Some syscalls need to be re-executed
– e.g., mmap
• Replay under a binary translation (BT) engine
– BT collects detailed memory accesses by the target
– Replay distinguishes syscalls made by the target from
those made by BT
Pinpointing Vulnerabilities | AsiaCCS '17 11
Vulnerability Locator
Data-flow Analysis
Race Condition
Use-after-free
Double-free
Integer Errors
Pinpointing Vulnerabilities | AsiaCCS '17 12
Data-flow Analysis
• Analyze def-use relations between instructions
• Define: writes to a memory address
• Use: reads from a memory address
Pinpointing Vulnerabilities | AsiaCCS '17 13
A B
write read
define use
Data-flow Analysis
• Analyze def-use relations between instructions
• Define: writes to a memory address
• Use: reads from a memory address
Pinpointing Vulnerabilities | AsiaCCS '17 14
A B
Data-flow Analysis
• Precompute a data-flow graph (DFG)
– DFG: the valid def-use relations in the program
– Our prototype uses dynamic analysis
– Extra relations regarded as violations
• Violation to DFG indicates the vulnerability location
– It could be the def or the use, but which one?
– Refine the results with heuristics
Pinpointing Vulnerabilities | AsiaCCS '17 15
Data-flow Analysis
• Precompute a data-flow graph (DFG)
– DFG: the valid def-use relations in the program
– Our prototype uses dynamic analysis
– Extra relations regarded as violations
• Violation to DFG indicates the vulnerability location
– It could be the def or the use, but which one?
– Refine the results with heuristics
Pinpointing Vulnerabilities | AsiaCCS '17 16
Data-flow Analysis
• Precompute a data-flow graph (DFG)
– DFG: the valid def-use relations in the program
– Our prototype uses dynamic analysis
– Extra relations regarded as violations
• Violation to DFG indicates the vulnerability location
– It could be the def or the use, but which one?
– Refine the results with heuristics
Pinpointing Vulnerabilities | AsiaCCS '17 17
Data-flow Analysis Heuristics
• One def, many uses:
def is closer to the vulnerability
– Example: buffer overflow
Pinpointing Vulnerabilities | AsiaCCS '17 18
use
use
use
Normal
Violating
Data-flow Analysis Heuristics
• One def, many uses:
def is closer to the vulnerability
– Example: buffer overflow
Pinpointing Vulnerabilities | AsiaCCS '17 19
use
def
use
use
Normal
Violating
Data-flow Analysis Heuristics
• One def, many uses:
def is closer to the vulnerability
– Example: buffer overflow
• Many defs, one use:
use is closer to the vulnerability
– Example: information leakage
• …
Pinpointing Vulnerabilities | AsiaCCS '17 20
use
def
use
use
Data-flow Analysis Heuristics
• One def, many uses:
def is closer to the vulnerability
– Example: buffer overflow
• Many defs, one use:
use is closer to the vulnerability
– Example: information leakage
• …
Pinpointing Vulnerabilities | AsiaCCS '17 21
use
def
use
use
Integer Errors
• Focus on common integer errors
– Start from common functions/instructions that take
integer operands
• E.g., memcpy, recvfrom; movs, stos…
– Search backwards for integer errors
• Example:
memcpy ( void * destination, const void * source, size_t num );
Search from num backwards for integer errors.
Pinpointing Vulnerabilities | AsiaCCS '17 22
Integer Errors
• Assignment truncation (e.g., 0x12345678 → 0x5678)
– To detect: assign from a longer to a shorter integer type
• Integer overflow/underflow (e.g., 0xFFFFFFFF + 1)
– To detect: check the RFLAGS register
• Signedness error (e.g., unsigned_int_var = signed_int_var)
– To detect: collect hints from functions and instructions
• Instructions: jg, jge, ja, jae, cmovg, cmova, idiv, div, etc.
• Functions: memmove, strncat, etc.
• Benign integer errors?
– Related to a reported vulnerability!
Pinpointing Vulnerabilities | AsiaCCS '17 23
Integer Errors
• Assignment truncation (e.g., 0x12345678 → 0x5678)
– To detect: assign from a longer to a shorter integer type
• Integer overflow/underflow (e.g., 0xFFFFFFFF + 1)
– To detect: check the RFLAGS register
• Signedness error (e.g., unsigned_int_var = signed_int_var)
– To detect: collect hints from functions and instructions
• Instructions: jg, jge, ja, jae, cmovg, cmova, idiv, div, etc.
• Functions: memmove, strncat, etc.
• Benign integer errors?
– Related to a reported vulnerability!
Pinpointing Vulnerabilities | AsiaCCS '17 24
Use-after-free and Double-free
• Ravel instruments memory allocation/free
functions to track the memory life-time
• Use-after-free: freed memory is accessed again
• Double-free: memory freed more than once
without re-allocation
Pinpointing Vulnerabilities | AsiaCCS '17 25
Race Condition
• When race condition happens, the execution
deviates from the recorded one
– as we do not implement strict R&R
• When detected, use the happens-before relation
to check for race conditions
Pinpointing Vulnerabilities | AsiaCCS '17 26
Implementation
• Record & replay:
– FreeBSD release 10.2
– Kernel modification + small user-space utility
• Vulnerability locator:
– Extended from Valgrind
Pinpointing Vulnerabilities | AsiaCCS '17 27
Evaluation – Effectiveness
• Buffer overflow
• Integer errors
• Information leakage
• Use-after-free and double-free
• Format string vulnerabilities
Pinpointing Vulnerabilities | AsiaCCS '17 28
CVE-2013-2028 of Nginx
Pinpointing Vulnerabilities | AsiaCCS '17 29
CVE-2013-2028 of Nginx
Pinpointing Vulnerabilities | AsiaCCS '17 30
signedunsigned
signed comparison
CVE-2013-2028 of Nginx
Pinpointing Vulnerabilities | AsiaCCS '17 31
signedunsigned larger than expected
signed comparison
CVE-2013-2028 of Nginx
Pinpointing Vulnerabilities | AsiaCCS '17 32
signedunsigned larger than expected
buffer overflow
signed comparison
CVE-2013-2028 of Nginx
Pinpointing Vulnerabilities | AsiaCCS '17 33
signedunsigned larger than expected
buffer overflow
signed comparison Ravel
Data-flow
Violation
Signedness
Conflict
Memory
Exception
Evaluation – Effectiveness
• More examples are in the paper (Heartbleed, etc.)
Pinpointing Vulnerabilities | AsiaCCS '17 34
Evaluation – Performance
Performance overhead of Ravel’s online components relative to the original FreeBSD system
Pinpointing Vulnerabilities | AsiaCCS '17 35
Pinpointing Vulnerabilities
Q&A
Pinpointing Vulnerabilities | AsiaCCS '17 36
http://YueChen.me
Backup Slides
Pinpointing Vulnerabilities | AsiaCCS '17 37
Attack Detection Example
• Typical scenario example:
Pinpointing Vulnerabilities | AsiaCCS '17 38
Attack
Attacker guesses
memory addresses
Program crashes
(due to ASLR, DEP, etc.)
Victim forks
a new process
Attack Detection Example
• Typical scenario example:
Pinpointing Vulnerabilities | AsiaCCS '17 39
Attack Fork
Attacker guesses
memory addresses
Program crashes
(due to ASLR, DEP, etc.)
Victim forks
a new process

More Related Content

PDF
Ravel: Pinpointing Vulnerabilities
PPTX
Linux binary analysis and exploitation
PDF
AllBits presentation - Lower Level SW Security
PDF
Practical RISC-V Random Test Generation using Constraint Programming
PDF
Intro. to static analysis
PPTX
A Source-To-Source Approach to HPC Challenges
PDF
Deterministic Galois: On-demand, Portable and Parameterless
PDF
Self-defending software: Automatically patching errors in deployed software ...
Ravel: Pinpointing Vulnerabilities
Linux binary analysis and exploitation
AllBits presentation - Lower Level SW Security
Practical RISC-V Random Test Generation using Constraint Programming
Intro. to static analysis
A Source-To-Source Approach to HPC Challenges
Deterministic Galois: On-demand, Portable and Parameterless
Self-defending software: Automatically patching errors in deployed software ...

What's hot (17)

PPT
Static Code Analysis and AutoLint
PDF
ebpf and IO Visor: The What, how, and what next!
PPTX
How to Connect SystemVerilog with Octave
PPT
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
PPTX
Combining Phase Identification and Statistic Modeling for Automated Parallel ...
PDF
CNIT 127 Ch 16: Fault Injection and 17: The Art of Fuzzing
PDF
Return oriented programming
PDF
Detecting hardware virtualization rootkits
PPTX
Week1 Electronic System-level ESL Design and SystemC Begin
PDF
Session 6 sv_randomization
PPTX
Introduction to System verilog
PPT
Coverage Solutions on Emulators
PPTX
Systemc overview 2010
PPTX
SystemC Ports
PDF
Isolating the Ghost in the Machine: Unveiling Post Exploitation Threatsrsac
PPT
Pipeline hazard
PDF
Fault simulation – application and methods
Static Code Analysis and AutoLint
ebpf and IO Visor: The What, how, and what next!
How to Connect SystemVerilog with Octave
SystemVerilog Assertions verification with SVAUnit - DVCon US 2016 Tutorial
Combining Phase Identification and Statistic Modeling for Automated Parallel ...
CNIT 127 Ch 16: Fault Injection and 17: The Art of Fuzzing
Return oriented programming
Detecting hardware virtualization rootkits
Week1 Electronic System-level ESL Design and SystemC Begin
Session 6 sv_randomization
Introduction to System verilog
Coverage Solutions on Emulators
Systemc overview 2010
SystemC Ports
Isolating the Ghost in the Machine: Unveiling Post Exploitation Threatsrsac
Pipeline hazard
Fault simulation – application and methods
Ad

Similar to Pinpointing Vulnerabilities (Ravel) (20)

PDF
Advanced System Security and Digital Forensics
PDF
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
PDF
Csw2016 d antoine_automatic_exploitgeneration
PDF
RIoT (Raiding Internet of Things) by Jacob Holcomb
PDF
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
PPTX
Static analysis: looking for errors ... and vulnerabilities?
PDF
ICS Threat Scenarios
PDF
From Thousands of Hours to a Couple of Minutes: Automating Exploit Generation...
PDF
Detection of vulnerabilities in programs with the help of code analyzers
PPT
526_topic12_13.ppt
PPT
Detecting and Preventing Memory Attacks#
PDF
Secure Programming With Static Analysis
PDF
A Smart Fuzzing Approach for Integer Overflow Detection
PDF
[Bop] Block Oriented Programming Automating Data-only Attacks
PDF
Software Security - Static Analysis Tools
PDF
SemFuzz: Semantics-based Automatic Generation of Proof-of-Concept Exploits
PDF
Flaw Finder
PDF
[USENIX-WOOT] Introduction to Procedural Debugging through Binary Libification
PPTX
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
Advanced System Security and Digital Forensics
BlueHat Seattle 2019 || Open Source Security, vulnerabilities never come alone
Csw2016 d antoine_automatic_exploitgeneration
RIoT (Raiding Internet of Things) by Jacob Holcomb
DEF CON 27 - CHRISTOPHER ROBERTS - firmware slap
Static analysis: looking for errors ... and vulnerabilities?
ICS Threat Scenarios
From Thousands of Hours to a Couple of Minutes: Automating Exploit Generation...
Detection of vulnerabilities in programs with the help of code analyzers
526_topic12_13.ppt
Detecting and Preventing Memory Attacks#
Secure Programming With Static Analysis
A Smart Fuzzing Approach for Integer Overflow Detection
[Bop] Block Oriented Programming Automating Data-only Attacks
Software Security - Static Analysis Tools
SemFuzz: Semantics-based Automatic Generation of Proof-of-Concept Exploits
Flaw Finder
[USENIX-WOOT] Introduction to Procedural Debugging through Binary Libification
BlueHat v17 || KERNELFAULT: R00ting the Unexploitable using Hardware Fault In...
Ad

More from Yue Chen (9)

PDF
KARMA: Adaptive Android Kernel Live Patching
PDF
EncExec: Secure In-Cache Execution
PDF
SecPod: A Framework for Virtualization-based Security Systems
PPTX
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
PDF
Impala SQL Support
PDF
Cloudera Impala Source Code Explanation and Analysis
PDF
Inside Parquet Format
PDF
Inside HDFS Append
PDF
How Impala Works
KARMA: Adaptive Android Kernel Live Patching
EncExec: Secure In-Cache Execution
SecPod: A Framework for Virtualization-based Security Systems
Remix: On-demand Live Randomization (Fine-grained live ASLR during runtime)
Impala SQL Support
Cloudera Impala Source Code Explanation and Analysis
Inside Parquet Format
Inside HDFS Append
How Impala Works

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Cost to Outsource Software Development in 2025
PDF
Download FL Studio Crack Latest version 2025 ?
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Complete Guide to Website Development in Malaysia for SMEs
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
L1 - Introduction to python Backend.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Cost to Outsource Software Development in 2025
Download FL Studio Crack Latest version 2025 ?
Computer Software and OS of computer science of grade 11.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Reimagine Home Health with the Power of Agentic AI​
Complete Guide to Website Development in Malaysia for SMEs
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Monitoring Stack: Grafana, Loki & Promtail
Design an Analysis of Algorithms II-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Oracle Fusion HCM Cloud Demo for Beginners
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Wondershare Filmora 15 Crack With Activation Key [2025
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Patient Appointment Booking in Odoo with online payment
Why Generative AI is the Future of Content, Code & Creativity?
L1 - Introduction to python Backend.pptx

Pinpointing Vulnerabilities (Ravel)

  • 1. Pinpointing Vulnerabilities Yue Chen, Mustakimur Khandaker, Zhi Wang Florida State University 12th ACM Asia Conference on Computer and Communications Security
  • 2. Question • When an attack is detected, how to locate the underlying vulnerability? 2Pinpointing Vulnerabilities | AsiaCCS '17 Attack Vulnerability
  • 3. Example • A control-flow violation is detected at line 6. • The vulnerability lies at line 4 (buffer overflow). 3Pinpointing Vulnerabilities | AsiaCCS '17 Root Cause Symptom
  • 4. Attack Detection v.s. Vulnerability Locating • Control-flow Integrity (CFI) – Detect the control-flow graph violation (e.g., on function returns) • Taint Analysis – Detect tainted data being loaded to PC • System Call Interposition – Detect abnormal syscalls made by the payload Pinpointing Vulnerabilities | AsiaCCS '17 4 Manifestation of attack rarely coincides with the vulnerabilities
  • 5. Ravel – Three Components • Online attack detector • Record & replay with instrumentation • Offline vulnerability locator Pinpointing Vulnerabilities | AsiaCCS '17 5 RAVEL: Root-cause Analysis of Vulnerabilities from Exploitation Log
  • 6. Ravel – Strengths 1. Reliably reproduce real-world attacks in the lab environment 2. Low online performance overhead – Locating vulnerabilities is time-consuming 3. Extensible: – New attack detection and vulnerability locating techniques can be easily integrated – (already support a variety of vulnerability locating techniques) Pinpointing Vulnerabilities | AsiaCCS '17 6
  • 7. Attack Detection • Ravel uses existing attack detection methods – Program crash (or other exceptions) – Abnormal system calls (sequence/arguments) – Control-flow integrity violation (to be included) • New methods can be easily adopted by Ravel Pinpointing Vulnerabilities | AsiaCCS '17 7
  • 8. Record & Replay • What to record & replay? – All the non-deterministic inputs (e.g., network packets) • Where to record & replay? – Application interface – Library interface – Virtual machine interface – System call interface Pinpointing Vulnerabilities | AsiaCCS '17 8
  • 9. Record & Replay • What to record & replay? – All the non-deterministic inputs (e.g., network packets) • Where to record & replay? – Application interface – Library interface – Virtual machine interface – System call interface Pinpointing Vulnerabilities | AsiaCCS '17 9 More robust against attacks, with low cost
  • 10. Record Pinpointing Vulnerabilities | AsiaCCS '17 10 System call return values Userspace data structures modified by syscalls Data copied from kernel to userspace Asynchronous signals Special instructions (e.g., RDTSC) Synchronization primitives
  • 11. Replay with Instrumentation • Some syscalls replayed without real execution – e.g., gettimeofday • Some syscalls need to be re-executed – e.g., mmap • Replay under a binary translation (BT) engine – BT collects detailed memory accesses by the target – Replay distinguishes syscalls made by the target from those made by BT Pinpointing Vulnerabilities | AsiaCCS '17 11
  • 12. Vulnerability Locator Data-flow Analysis Race Condition Use-after-free Double-free Integer Errors Pinpointing Vulnerabilities | AsiaCCS '17 12
  • 13. Data-flow Analysis • Analyze def-use relations between instructions • Define: writes to a memory address • Use: reads from a memory address Pinpointing Vulnerabilities | AsiaCCS '17 13 A B write read define use
  • 14. Data-flow Analysis • Analyze def-use relations between instructions • Define: writes to a memory address • Use: reads from a memory address Pinpointing Vulnerabilities | AsiaCCS '17 14 A B
  • 15. Data-flow Analysis • Precompute a data-flow graph (DFG) – DFG: the valid def-use relations in the program – Our prototype uses dynamic analysis – Extra relations regarded as violations • Violation to DFG indicates the vulnerability location – It could be the def or the use, but which one? – Refine the results with heuristics Pinpointing Vulnerabilities | AsiaCCS '17 15
  • 16. Data-flow Analysis • Precompute a data-flow graph (DFG) – DFG: the valid def-use relations in the program – Our prototype uses dynamic analysis – Extra relations regarded as violations • Violation to DFG indicates the vulnerability location – It could be the def or the use, but which one? – Refine the results with heuristics Pinpointing Vulnerabilities | AsiaCCS '17 16
  • 17. Data-flow Analysis • Precompute a data-flow graph (DFG) – DFG: the valid def-use relations in the program – Our prototype uses dynamic analysis – Extra relations regarded as violations • Violation to DFG indicates the vulnerability location – It could be the def or the use, but which one? – Refine the results with heuristics Pinpointing Vulnerabilities | AsiaCCS '17 17
  • 18. Data-flow Analysis Heuristics • One def, many uses: def is closer to the vulnerability – Example: buffer overflow Pinpointing Vulnerabilities | AsiaCCS '17 18 use use use Normal Violating
  • 19. Data-flow Analysis Heuristics • One def, many uses: def is closer to the vulnerability – Example: buffer overflow Pinpointing Vulnerabilities | AsiaCCS '17 19 use def use use Normal Violating
  • 20. Data-flow Analysis Heuristics • One def, many uses: def is closer to the vulnerability – Example: buffer overflow • Many defs, one use: use is closer to the vulnerability – Example: information leakage • … Pinpointing Vulnerabilities | AsiaCCS '17 20 use def use use
  • 21. Data-flow Analysis Heuristics • One def, many uses: def is closer to the vulnerability – Example: buffer overflow • Many defs, one use: use is closer to the vulnerability – Example: information leakage • … Pinpointing Vulnerabilities | AsiaCCS '17 21 use def use use
  • 22. Integer Errors • Focus on common integer errors – Start from common functions/instructions that take integer operands • E.g., memcpy, recvfrom; movs, stos… – Search backwards for integer errors • Example: memcpy ( void * destination, const void * source, size_t num ); Search from num backwards for integer errors. Pinpointing Vulnerabilities | AsiaCCS '17 22
  • 23. Integer Errors • Assignment truncation (e.g., 0x12345678 → 0x5678) – To detect: assign from a longer to a shorter integer type • Integer overflow/underflow (e.g., 0xFFFFFFFF + 1) – To detect: check the RFLAGS register • Signedness error (e.g., unsigned_int_var = signed_int_var) – To detect: collect hints from functions and instructions • Instructions: jg, jge, ja, jae, cmovg, cmova, idiv, div, etc. • Functions: memmove, strncat, etc. • Benign integer errors? – Related to a reported vulnerability! Pinpointing Vulnerabilities | AsiaCCS '17 23
  • 24. Integer Errors • Assignment truncation (e.g., 0x12345678 → 0x5678) – To detect: assign from a longer to a shorter integer type • Integer overflow/underflow (e.g., 0xFFFFFFFF + 1) – To detect: check the RFLAGS register • Signedness error (e.g., unsigned_int_var = signed_int_var) – To detect: collect hints from functions and instructions • Instructions: jg, jge, ja, jae, cmovg, cmova, idiv, div, etc. • Functions: memmove, strncat, etc. • Benign integer errors? – Related to a reported vulnerability! Pinpointing Vulnerabilities | AsiaCCS '17 24
  • 25. Use-after-free and Double-free • Ravel instruments memory allocation/free functions to track the memory life-time • Use-after-free: freed memory is accessed again • Double-free: memory freed more than once without re-allocation Pinpointing Vulnerabilities | AsiaCCS '17 25
  • 26. Race Condition • When race condition happens, the execution deviates from the recorded one – as we do not implement strict R&R • When detected, use the happens-before relation to check for race conditions Pinpointing Vulnerabilities | AsiaCCS '17 26
  • 27. Implementation • Record & replay: – FreeBSD release 10.2 – Kernel modification + small user-space utility • Vulnerability locator: – Extended from Valgrind Pinpointing Vulnerabilities | AsiaCCS '17 27
  • 28. Evaluation – Effectiveness • Buffer overflow • Integer errors • Information leakage • Use-after-free and double-free • Format string vulnerabilities Pinpointing Vulnerabilities | AsiaCCS '17 28
  • 29. CVE-2013-2028 of Nginx Pinpointing Vulnerabilities | AsiaCCS '17 29
  • 30. CVE-2013-2028 of Nginx Pinpointing Vulnerabilities | AsiaCCS '17 30 signedunsigned signed comparison
  • 31. CVE-2013-2028 of Nginx Pinpointing Vulnerabilities | AsiaCCS '17 31 signedunsigned larger than expected signed comparison
  • 32. CVE-2013-2028 of Nginx Pinpointing Vulnerabilities | AsiaCCS '17 32 signedunsigned larger than expected buffer overflow signed comparison
  • 33. CVE-2013-2028 of Nginx Pinpointing Vulnerabilities | AsiaCCS '17 33 signedunsigned larger than expected buffer overflow signed comparison Ravel Data-flow Violation Signedness Conflict Memory Exception
  • 34. Evaluation – Effectiveness • More examples are in the paper (Heartbleed, etc.) Pinpointing Vulnerabilities | AsiaCCS '17 34
  • 35. Evaluation – Performance Performance overhead of Ravel’s online components relative to the original FreeBSD system Pinpointing Vulnerabilities | AsiaCCS '17 35
  • 36. Pinpointing Vulnerabilities Q&A Pinpointing Vulnerabilities | AsiaCCS '17 36 http://YueChen.me
  • 38. Attack Detection Example • Typical scenario example: Pinpointing Vulnerabilities | AsiaCCS '17 38 Attack Attacker guesses memory addresses Program crashes (due to ASLR, DEP, etc.) Victim forks a new process
  • 39. Attack Detection Example • Typical scenario example: Pinpointing Vulnerabilities | AsiaCCS '17 39 Attack Fork Attacker guesses memory addresses Program crashes (due to ASLR, DEP, etc.) Victim forks a new process