Top Banner
Malware Narratives Dmitry Vostokov Software Diagnostics Services Version 1.0 Facebook LinkedIn Twitter
52

Malware Narratives

Jan 14, 2017

Download

Documents

Dmitry Vostokov
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Malware Narratives

Malware Narratives

Dmitry Vostokov Software Diagnostics Services

Version 1.0

Facebook LinkedIn Twitter

Page 2: Malware Narratives

Prerequisites Interest in software diagnostics and malware analysis

© 2013 Software Diagnostics Services

Page 3: Malware Narratives

Why? Communication language

Malware diagnostics as software

diagnostics Big DA+TA (Dump Artifacts + Trace

Artifacts)

© 2013 Software Diagnostics Services

Page 4: Malware Narratives

Software Diagnostics A discipline studying abnormal software structure and behavior in software execution artifacts (such as memory dumps, software and network traces and logs) using pattern-driven, systemic and pattern-based analysis methodologies.

© 2013 Software Diagnostics Services

Page 5: Malware Narratives

Diagnostics Pattern

A common recurrent identifiable problem together with a set of recommendations and possible solutions to apply in a specific context.

© 2013 Software Diagnostics Services

Page 6: Malware Narratives

Pattern Orientation

© 2013 Software Diagnostics Services

Pattern-driven Finding patterns in software artefacts Using checklists and pattern catalogs

Pattern-based Pattern catalog evolution Catalog packaging and delivery

Page 8: Malware Narratives

Malware

Software that uses planned alteration of structure and behavior of software to serve malicious purposes.

© 2013 Software Diagnostics Services

Page 9: Malware Narratives

Memory Analysis Patterns

© 2013 Software Diagnostics Services

Memory Dump Analysis Patterns

Malware Analysis Patterns

Software Diagnostics

Page 10: Malware Narratives

Traces and Logs

© 2013 Software Diagnostics Services

Page 11: Malware Narratives

Trace and Log Patterns

© 2013 Software Diagnostics Services

Page 12: Malware Narratives

Software Narrative

A temporal sequence of events related to software execution.

© 2013 Software Diagnostics Services

Page 13: Malware Narratives

Narrative Taxonomy

© 2013 Software Diagnostics Services

Incident stories Software traces and logs Malware analysis stories

Page 14: Malware Narratives

Malware Narrative Patterns

© 2013 Software Diagnostics Services

Software Trace and Log

Analysis Patterns

Malware Narrative Patterns

Software Diagnostics

Page 15: Malware Narratives

Software Log

© 2013 Software Diagnostics Services

A sequence of formatted messages Arranged by time A narrative story

Page 16: Malware Narratives

Minimal Log Graphs

© 2013 Software Diagnostics Services

Time# PID TID Time Message

No Module PID TID Date Time Message ----------------------------------------------------------- 1 ModuleA 4280 1736 5/28/2012 08:53:50.496 Trace message 1 2 ModuleB 6212 6216 5/28/2012 08:53:52.876 Trace message 2 […]

Page 17: Malware Narratives

Pattern-Driven Analysis

© 2013 Software Diagnostics Services

Logs Checklists Patterns Action

Page 18: Malware Narratives

Pattern-Based Analysis

© 2013 Software Diagnostics Services

Software Trace

New Pattern

Discovery

Pattern Catalog

+

Usage

Page 19: Malware Narratives

Pattern Classification

© 2013 Software Diagnostics Services

Vocabulary Error Trace as a Whole Large Scale Activity Message Block Trace Set

Page 20: Malware Narratives

Reference and Course

© 2013 Software Diagnostics Services

Free catalog

Software Log Analysis Patterns

Free reference graphical slides

Accelerated-Windows-Software-Trace-Analysis-Public.pdf

Training course*

Accelerated Windows Software Trace Analysis

* Available as a full color paperback book, PDF book, on SkillsSoft Books 24x7. Recording is available for all book formats

Page 21: Malware Narratives

Vocabulary Patterns

© 2013 Software Diagnostics Services

Basic Facts* Vocabulary Index

* patterns marked with yellow color are most likely to be useful for malware detection and analysis

Page 22: Malware Narratives

Error Patterns

© 2012 Software Diagnostics Services

Error Message Exception Stack Trace False Positive Error Periodic Error Error Distribution

Page 23: Malware Narratives

Trace as a Whole

© 2013 Software Diagnostics Services

Partition Circular Trace Message Density Message Current Trace Acceleration No Trace Metafile Empty Trace Missing Module Guest Module

Truncated Trace Visibility Limit Sparse Trace

Page 24: Malware Narratives

Guest Module

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Load: 3rdPartyActivity.dll

Page 25: Malware Narratives

Large Scale Patterns

© 2013 Software Diagnostics Services

Characteristic Block Background Modules Foreground Modules Layered Periodization Focus of Tracing Event Sequence Order Trace Frames

Page 26: Malware Narratives

Characteristic Block

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Page 27: Malware Narratives

Foreground Modules

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Time# PID TID Time Message

Page 28: Malware Narratives

Focus of Tracing

© 2013 Software Diagnostics Services

Activity regions: Jm1, Jm2, Jm3

Time

Jm1

Jm2

Jm3

# PID TID Time Message

Page 29: Malware Narratives

Activity Patterns

© 2013 Software Diagnostics Services

Thread of Activity Adjoint Thread of Activity No Activity Activity Region Discontinuity Time Delta Glued Activity Break-in Activity Resume Activity Data Flow

Page 30: Malware Narratives

Thread of Activity

© 2013 Software Diagnostics Services

Time# PID TID Time Func Message

# PID TID Time Func Message

Page 31: Malware Narratives

Adjoint Thread of Activity

© 2013 Software Diagnostics Services

Time# PID TID Time Func Message

Time# PID TID Time Func Message

Page 32: Malware Narratives

Activity Region

© 2013 Software Diagnostics Services

Message current : Jm2 > max (Jm1,Jm3)

Time

Jm1

Jm2

Jm3

# PID TID Time Message

Page 33: Malware Narratives

Glued Activity

© 2013 Software Diagnostics Services

ATID: Adjoint Thread ID

ImageA ATID 2

ImageB ATID 3

Time# ATID TID Time Message

Time

Trace Session

1

# PID TID Time Message

Trace Session

2

Page 34: Malware Narratives

Break-in Activity

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Discontinuity

Page 35: Malware Narratives

Data Flow

© 2013 Software Diagnostics Services

# PID TID Time MessageTime

Page 36: Malware Narratives

Message Patterns

© 2013 Software Diagnostics Services

Significant Event Defamiliarizing Effect Anchor Messages Diegetic Messages Message Change Message Invariant UI Message Original Message Implementation Discourse Opposition Messages

* added recently

Linked Messages Gossip Counter Value Abnormal Value* Message Context Marked Messages Incomplete History Message Interleave Fiber Bundle

Page 37: Malware Narratives

Significant Event

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Page 38: Malware Narratives

Defamiliarizing Effect

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Time# PID TID Time Message

Page 39: Malware Narratives

Abnormal Value

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Page 40: Malware Narratives

Marked Messages

© 2013 Software Diagnostics Services

Annotated messages: network activity [+] process A launched [+] process B launched [-] process A exited [-] [+] activity is present in a trace [-] activity is undetected or not present

Page 41: Malware Narratives

Fiber Bundle

© 2013 Software Diagnostics Services

I/O stack Thread stack trace

Trace messages

Page 42: Malware Narratives

Block Patterns

© 2013 Software Diagnostics Services

Macrofunction Periodic Message Block Intra-Correlation

Page 43: Malware Narratives

Periodic Message Block

© 2013 Software Diagnostics Services

Time# PID TID Time Message

Page 44: Malware Narratives

Trace Set Patterns

© 2013 Software Diagnostics Services

Master Trace Bifurcation Point Inter-Correlation Relative Density News Value Impossible Trace Split Trace

Page 45: Malware Narratives

Master Trace

© 2013 Software Diagnostics Services

Page 46: Malware Narratives

Inter-Correlation

© 2013 Software Diagnostics Services

System

Logging Tool

Logging Tool

Log File Log File

Page 47: Malware Narratives

Impossible Trace

© 2013 Software Diagnostics Services

# Module PID TID Message ------------------------------- […] 1001 ModuleA 202 404 foo: start 1002 ModuleA 202 404 foo: end […]

void foo() { TRACE("foo: start"); bar(); TRACE("foo: end"); } void bar() { TRACE("bar: start"); // some code ... TRACE("bar: end"); }

Page 48: Malware Narratives

Grand Unification Narrative and Trace

N: T → M

Generalized Narrative and Trace

GN: A -> M

GN3 ο GN2 ο GN1: M → M → M

© 2013 Software Diagnostics Services

Page 49: Malware Narratives

Further Reading

Software Diagnostics Institute Memory Dump Analysis Anthology: Volumes 3, 4, 5, 6, … Volume 7 is in preparation (April, 2013) Volume 8 is planned for November, 2013 Introduction to Software Narratology Accelerated Windows Software Trace Analysis

© 2013 Software Diagnostics Services

Page 51: Malware Narratives

Q&A

Please send your feedback using the contact form on DumpAnalysis.com

© 2013 Software Diagnostics Services

Page 52: Malware Narratives

Thank you for attendance!

© 2013 Software Diagnostics Services Facebook LinkedIn Twitter