• No results found

Visual Forensic Analysis and

N/A
N/A
Protected

Academic year: 2021

Share "Visual Forensic Analysis and"

Copied!
63
0
0

Loading.... (view fulltext now)

Full text

(1)

Visual Forensic Analysis and

Reverse Engineering of

Reverse Engineering of

Binary Data

Gregory Conti Gregory Conti Erik Dean United States Military Academy West Point, New York [email protected] [email protected]
(2)

Outline

• The Problem – Tiny Windows

y

• Background and Motivation

• Related Work

• Related Work

• Moving Beyond Hex

• System Design

• Case Studies

• Demos

(3)

data doc operated on by applications file doc xls txt… file exe executed by OS ELF PE... 01010 10101

01010 other special cases core dump

pagefile.sys hiberfil sys 01010

hiberfil.sys…

memory process memory cache

network

cache… packets…

(4)

Ida Pro OllyDBG

BinNavi (Zynamics) BinDiff (Zynamics) high

insight BinDiff (Zynamics)… insight Filemon 011 Regmon… objdump hex editors h d lower original application hexdump

grep & diff strings

insight

general purpose precise application g

(5)

strings /grep/diff

H:\Datasets>strings 20040517_homeISP.pcap | more Strings v2.4

Copyright (C) 1999-2007 Mark Russinovich Sysinternals - www.sysinternals.com 0hF M@y 7bs Z19Z Z19Z MICROSOFT NETWORKS WINDOWS USER

Microsoft Security Bulletin MS03-043

Buffer Overrun in Messenger Service Could Allow Code Execution (828035)

Affected Software:

Microsoft Windows NT Workstation Microsoft Windows NT Workstation Microsoft Windows NT Server 4.0 Microsoft Windows 2000

(6)
(7)
(8)

WinHex

(9)

Ida Pro OllyDBG

BinNavi (Zynamics) BinDiff (Zynamics) high

insight BinDiff (Zynamics)… insight Filemon 011 Regmon… objdump hex editors h d lower original application hexdump

grep & diff strings

insight

general purpose precise application g

(10)

Ida Pro OllyDBG

BinNavi (Zynamics) BinDiff (Zynamics) high

insight BinDiff (Zynamics)… insight Filemon 011 Regmon… objdump hex editors h d lower original application hexdump

grep & diff strings

insight

general purpose precise application g

(11)

SysInternals

FileMon

RegMon

g

Process Monitor

http://technet.microsoft.com/en-us/sysinternals/default.aspx

Process Monitor

...

(12)

Wireshark

(13)

OllyDbg

(14)

IDA Pro

v5.15
(15)

F-Secure Malware

(16)

Zynamics BinDiff

(17)

Zynamics BinNavi

(18)

Ida Pro OllyDBG

BinNavi (Zynamics) BinDiff (Zynamics) high

insight BinDiff (Zynamics)… insight Filemon 011 Regmon… objdump hex editors h d lower original application hexdump

grep & diff strings

insight

general purpose precise application g

(19)

Framework

• File Independent Level

– Entropy

– Byte Frequency N Gram Analysis – N-Gram Analysis – Strings

– Hex / Decimal / ASCIIHex / Decimal / ASCII – Bit Plot (2D/3D)

– File Statistics

• File Specific Level

– Complete or Partial Knowledge of File Structure

Structure

(20)

Syntax Highlighting for Hex Dumps

(Kaminsky) (Kaminsky)

(21)

nwdiff

http://www.geocities.jp/belden_dr/ToolNwdiff_Eng.html http://computer.forensikblog.de/en/2006/02/compare_binary_files_with_nwdiff.html

(22)

Dot Plots & Visual BinDiff

(Kaminsky) (Kaminsky)

Self-Similarity in Diffing Two Files

(23)

Textual

Hex/ASCII

Traditional

Textual

Graphical

Hex/ASCII

Detail View

(strings...)

Utilities

Displays

Machine Assisted Mapping and Navigation

(24)

Towards a Visual Hex Editor

• Identify Unknown Binaries • Malware Analysisy

• Analyze Unknown/Undocumented File Format • Locate Embedded Objects

E di / E ti – Encoding / Encryption

• Audit Files for Vulnerabilities • Compare files (Diffing)Compare files (Diffing)

• Cracking

• Cryptanalysis

• Perform Forensic Analysis • File System Analysis

• Reporting • Reporting • File Fuzzing

(25)

Goals

• Handle Large Files

• Many Insightful Windows

• Big Picture Context

• Improved Navigation

• Data Files / Executable Files

/

• Hex Editor best practices is the

foundation

(26)

Design

• Robust extensible framework

• Open source

• Context Independent File Analysis

• Context Independent File Analysis

• Semantic File Analysis

• Useful

• Multiple coordinated views

p

• Combine Functionality of current

tools and extend with visuals

(27)

Filtering + Encoding

• Identifying something

– REGEX

Æ

algorithmic

• Using this knowledge

g

g

to..

– highlight

g g

– fade

– remove

remove

(28)

• Textual: Text/ASCII Strings ByteCloud • Textual: Text/ASCII, Strings, ByteCloud

• Graphical: Bitplot, BytePlot, RGBPlot, BytePresence, ByteFrequency, Digram, Dotplot

(29)

Traditional Views

(30)

Strange Attractors and TCP/IP

Sequence Number Analysis

Sequence Number Analysis

(Michal Zalewski)

• http://lcamtuf.coredump.cx/oldtcp/tcpseq.htmlhttp://lcamtuf.coredump.cx/oldtcp/tcpseq.html • http://lcamtuf.coredump.cx/newtcp/

(31)

Digraph View

black hat

bl

(98,108)

la

(108,97)

la

(108,97)

ac (97,99)

k

(99 107)

ck

(99,107)

k

_

(107,32)

_h (32,104)

ha

(104 97)

ha

(104,97)

at (97,116)

(32)

Digraph View

0,1, ... 255 Byte 0 Byte 1 32,108 ... 98,108 Byte 255 Byte 255
(33)

d d

uuencoded compression

encryption incrementing words

constrained pairs slashdot.org .txt

(34)

Bit Plot

1 640 1 1 1 0 1 480 ... 480
(35)

Byte Plot

1 640 1 255 108 0 40 480 ... 480
(36)

Byte Plot Example

(Word Document) (Word Document)

(37)
(38)

RGB Plot

255 108 1 640 108 0 1 40 128 255 0 0 0 0 480 200 0 0 480
(39)

Dot Plots

• Jonathan

Helfman’s

“Dotplot

p

Patterns: A

Literal Look at

Pattern

Languages.”

g

g

• Dan Kaminsky,

CCC & BH 2006

CCC & BH 2006

(40)

DotPlots

Byte 0, Byte 1, ... Byte N Byte 0

Byte 1

... O(N

2)

(41)

Dynamic DotPlots

Byte 0, Byte 1, ... Byte N Byte 0

Byte 1

500x500

... O(N)

(42)

DotPlot Examples

(43)

DotPlot Examples

(44)

Compressed Audio English Text

(45)

Byte Clouds

Tag Cloud

Smashing the Stack Smashing the Stack for Fun and Profit

http://tagcrowd.com/

(46)
(47)
(48)
(49)
(50)
(51)

Redacted

Redacted

(52)

Weaknesses

• entire file may be extracted from

y

bit/byte/RGB

– May trigger AV or IDS

May trigger AV or IDS

– 8bit/byte steg

• Screams for big monitor

• Screams for big monitor

(53)
(54)

A Look to the Future…

• Visual Front Ends for Offensive Tools • Visual Cryptanalysis Support

• Human Insights Passed to Machine Processors • User centric Evaluation

• User-centric Evaluation

• More Inspiration from General InfoVis Community • Visual Fingerprints / Smart Booksg p /

• Web-based Visualization (AJAX) • User-task Analyses

T e Use Case Based Designs – True Use Case Based Designs

– Engagement of Users Beyond Students

• Examination of Full Range of Security Data

(55)

Future Work

• Plug-ins / Editable Config Files

– Visualizations – Encodings

• Saving state

– Memory Maps

• Improving Interaction

– What works / What doesn’t

• Multiple Files / File Systems

• REGEX search

(56)

DAVIX

(Jan Monsch and Raffy Marty) ( a o sc a d a y a y)

(57)
(58)
(59)

Communities

http://secviz.org/ http://vizsec.org/

“The place to share, discuss,

challenge, and learn about security visualization.”

“vizSEC is a research community for computer security visualization.”

Raffy Marty Splunk

John Goodall

(60)

VizSEC 2008

(61)

More Information

• “Visual Reverse

Engineering of Binary

g

g

y

and Data Files.” Gregory

Conti, Erik Dean,

Matthew Sinda, Benjamin

Sangster. VizSEC 2008.

A ailable Septembe – Available September

• Security Data

Visualization

Visualization

(No Starch Press)

• Applied Security

• Applied Security

Visualization

(62)

Acknowledgements

Damon Becknell, Jon Bentley, Jean

,

y,

Blair, Sergey Bratus, Chris

Compton, Tom Cross, Ron Dodge,

p

,

,

g ,

Carrie Gates, Chris Gates, Joe

Grand, Julian Grizzard, Toby

,

,

y

Kohlenberg, Oleg Kolesnikov,

Frank Mabry, Raffy Marty, Brent

y,

y

y,

Nolan, Gene Ressler, Ben

Sangster, Matt Sinda, and Ed

g

,

,

Sobiesk

(63)

"In fact, master reversers

,

like Fravia recommend

cracking while intoxicated

with a mixture of strong

with a mixture of strong

alcoholic beverages.

While for health reasons

we cannot recommend

this method, you may find

that a relaxing cup of hot

tea unwinds your mind

tea unwinds your mind

and allows you to think in

reverse."

References

Related documents

An analysis of marine fish marketing system in Tuticorin was done for the period 2004-2008, using different indicators like marketing margins, percentage share o f

In summary, this research added to the body of knowledge about campus sexual assault by exploring the lived experience of six college women who experienced a sexual assault

If the tenant remains in noncompliance at the expiration of the 12- day period, whether or not the 12-day period falls within one lease period or overlaps 2 lease periods, the

Basic Key Indicators VaR Monte Carlo Simulation Distributions Script for Bank Structure VaR Result Advanced Measurement Approach (AMA) Hierarchic Network for OR

 Further research is needed to investigate the effect of high reinforcement ratio and different compressive strengths on the flexural performance of continuous

The questions that have informed my own work about how, where, and when maternal perspectives interrupt aesthetic experience are asked in another register by Baraitser when she

Targeted observations along the extent of the Pal-5 tails exist in the NOAO Science Archive that would allow user-generated catalogs to be created to permit other types of analysis,

:T]\TaZT]Si^fT[e^^aWTc7TQaTTdfbT]iXY]idbcTabP[be^^aWTc0aP\TTbX]