40
General approach to exploit detection and signature generation White-box Need the source code Gray-box More accurate. But need to monit or a program's execution flow Black-box Detect and analyze an exploit using the outputs of a vulnerable program.

General approach to exploit detection and signature generation White-box Need the source code Gray-box More accurate. But need to monitor a program's

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

General approach to exploit detection and signature generation

White-box Need the source code

Gray-box More accurate. But need to monitor a pro

gram's execution flow Black-box

Detect and analyze an exploit using the outputs of a vulnerable program.

Page 2: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Packet vaccine approach

A black-box approach. Faster, but does not use much on

data format information.

Page 3: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

ShieldGen approach Gray-box approach General Gray-box approach is inherently sp

ecific to the attack input used in the data flow analysis.

Generalize attack-specific symbolic predicate-based signatures to cover significantly more attack variants with data format-informed probing to the oracle in ShieldGen.

Page 4: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Packet Vaccine: Black-box Exploit Detection and Signature Generation

Xiaofeng Wang, Zhuowei Li, Jun Xu, Michael K. Reiter, Chongyung Kil, Jong Youl Choi

Presented by Zhaosheng Zhu

Page 5: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Outline

Introduction to Packet Vaccine Related work Design of the packet vaccine

mechanism Implementation and Evaluation Application (Good Points) Limitations (Bad Points) Conclusion

Page 6: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Introduction to Packet Vaccine

The principle of vaccine Packet vaccine:

Identify anomalous tokens in packet payloads Randomize the contents of tokens to get a

vaccine Generate a signature during exception

Page 7: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Design of the packet vaccine mechanism

Page 8: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Design: 1. Vaccine Generation

Build a target address set: T = [bs – aus, bs] U [bh, bh + auh] U S

Aggregate the application payloads of the packets in one session into a dataflow, carry out a proper decoding

For every byte session, do replacement Construct vaccine packet using the new

data flows

Page 9: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Example

Page 10: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Design: 2. Exploit Detection and Vulnerability Diagnosis

Correlate each byte sequence that equals to the forensic string with the exception

Validation test Randomize all byte sequences Generate new vaccine Check Repeat

Page 11: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Design: 3. Signature Generation

Constructs packet vaccines or probes by randomizing address-like strings

It detects exploit by observing memory exception upon packet vaccine injection

Generates signatures by finding in the attack input the bytes that cannot take random values

Page 12: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Byte-based vaccine injection

Can be paralleled at most cases

Page 13: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Implementation Target address set is extracted from proc files Process monitor is developed using ptrace Kernel mode is necessary for CR2 Signature generation:

Prober Verifier

Sequential vaccine injection (performance penalty)

Page 14: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Evaluation

Linux exploits Windows-based exploits: Code

Red II Heap-based overflow

Page 15: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Evaluation

Comparison with MEP signatures MEP signature contains richer

information Quality of MEP diminishes with the

availability for multiple exploit instances and application information

MEP is slower

Page 16: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Application

An architecture to protect Internet servers using packet vaccine

Page 17: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Application (good points) Fast

Up to an order of magnitude faster than gray-box approaches

Not use source code Effective

Immune to interference Low overhead

No need to install anything on host Lightweight Collector

Page 18: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Limitations Its main probing scheme randomizes each byte

rather than leveraging data format information Works more reliably for text-based protocols

than the binary ones because of the lack of protocol knowledge for binary data formats.

Briefly mentioned the benefit of leveraging protocol specifications.

Unclear what type of protocol specification language considered and how protocol specifications leveraged.

Can only detect control flow hijacking attacks cannot detect exploits of the WMF vulnerability

Page 19: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Conclusion

Packet vaccine is a fast, blackbox technique for exploit detection

But not good enough in some case. If given input data format we have better approach: ShieldGen.

Page 20: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

ShieldGen: Automatic Data Patch Generation for Unknown Vulnerabilities

with Informed Probing

Weidong Cui Marcus Peinado Helen J. Wang Michael E. Locasto

Presented by Zhaosheng Zhu

Page 21: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Outline

What is ShieldGen Related work and Comparison System Design Evaluation and Performance Some future work Conclusion

Page 22: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

What is ShieldGen

A system for automatically generating a data patch or a vulnerability signature for an unknown vulnerability.

Leverage knowledge of the data format

Use data-patch instead of traditional software patch.

Page 23: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

SheildGen system overview

Page 24: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Related work

Poly-graph Significant false negatives and false positives

Nemean Generalization is dependent on the attack instance.

Covers Signatures does not contain any protocol context.

Packet vaccine Randomized each byte rather than leveraging data form

at information. Not efficient enough. Can only detect control-flow hijacking attack

Page 25: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

The Oracle: a Zero-Day Attack Detector

Used the Vigilante’s zero-day detector Based on dynamic data flow analysis Implement three vulnerability

condition Arbitrary execution control (AEC) Arbitrary code execution (ACE) Arbitrary function arguments (AFA)

Page 26: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Data Format Spec and Data Analyzer

Two assumptions to the input data Data formats are known No encryption or obfuscation are used.

Two types of analyzers File data: application level protocol, host-based Network data

High-speed parsing w/ preprocessed protocol parser E.g., binpac and GAPA

We use GAPA as our Data analyzer

Page 27: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

System design

Design goals No false positive Minimizing the number of false negatives Minimizing the number of probes.

Page 28: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Data patch generation

Page 29: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Some methods to reduce probes Recognizing iterative elements Obeying protocol semantics and

reduce illegitimate probes. High possibility that the

vulnerability predicate is only dependent on the last message

Page 30: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Probe generation algorithm Three Steps

Buffer Overrun heuristic for character strings

Iteration removal Eliminating irrelevant field conditions

Page 31: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Buffer overrun heuristics If the offending byte lies in the middle of a byte

or unicode string then ShieldGen diagnoses a buffer overrun and adds the following condition as a refinement:

sizeof(buffer) > offendingByte offset – bufferStart offset

Page 32: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Iteration removal Many popular input formats include

arbitrary sequences of largely independent elements (Records). Any input which contains a malicious record is an attack.

Generating probes with removing some of the iterative elements.

Iterative elements can be removed if probes still exploit successfully.

Page 33: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Eliminating irrelevant field conditions Constructing probes over the

remaining data fields to eliminate don’t-care fields and to find additional values of the data fields for which the attack succeeds.

Evaluating one field at one time

Page 34: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Evaluation

Run ShieldGen for three well known vulnerabilities SQL vulnerability RPC vulnerability WMF (Window Metafile) vulnerability

Page 35: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Filter quality of ShieldGen For a larger sample of real-world

vulnerabilities

Page 36: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Failure cases and analysis

Complex conditions Unchecked array indices Other special cases

Page 37: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Future work

Quality of the data format specification In our scheme the quality of data

format specification matters. Complex filter conditions

Page 38: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Future work

Probing time Reference VM is preferred

Attacks not delivered by the last message

Page 39: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Conclusion

Leverage data information to construct new attack instance

Generate high quality vulnerability signatures Fewer don’t care fields Fewer false negatives

Page 40: General approach to exploit detection and signature generation White-box  Need the source code Gray-box  More accurate. But need to monitor a program's

Thanks!