Statische vs Dynamische Analyse

34
Statische vs. Dynamische Malwareanalyse A day in the life of a malware analyst Florian Nentwich, Georg Kremsner Security Forum Hagenberg, 24.03.2010

Transcript of Statische vs Dynamische Analyse

Page 1: Statische vs Dynamische Analyse

Statische vs. Dynamische

Malwareanalyse

A day in the life of a malware analyst

Florian Nentwich, Georg Kremsner

Security Forum Hagenberg, 24.03.2010

Page 2: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 2

Malware Statistik

� täglich 20k bis 40k Samples neu

� 8 Mitarbeiter im Analyselabor

� 3k bis 5k Samples / Mitarbeiter am Tag

���� Automatisierung notwendig

Page 3: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 3

Viren-Samples bei IKARUS

Page 4: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 4

Kategorisierung von Samples

� Malware

� not-a-Virus

� Ad-/Spyware

� False Positives

Page 5: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 5

Virenscanner

� Dateiformatanalyse

� Pattern

� Heuristik

� Emulation/Simulation

Page 6: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 6

Statische Analyse

� Analyse der Samples ohne Ausführung

� Möglichkeiten

• Dateiformat

• File-Header-Analyse

• Patternmatching

• Imports/Exports

• Disassembly

Page 7: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 7

Tools zur statischen Analyse

� Virenscanner (auch Multiscanner)

� Windows Dateieigenschaften

� PEiD, TrID, Stud_PE

� CFF Explorer

� Editor, Hex-Editor

� FileAlyzer

� Disassembler

Page 8: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 8

Page 9: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 9

Page 10: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 10

Page 11: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 11

Page 12: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 12

Page 13: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 13

Page 14: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 14

Page 15: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 15

Probleme statischer Analyse

� Laufzeit-Packer

• verkleinern File, entpacken vor Ausführung

• verändern Aussehen der Binärdatei

• UPX, ASPack, NSPack, ...

� Crypter und Software Protection/Obfuscation

• unterschiedliche Methoden zur Ausführung

• verändern Aussehen der Binärdatei stark

• Reverse-Engineering/Disassembly stark erschwert

• Armadillo, PE-Crypter, Themida, ...

Page 16: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 16

Dynamische Analyse

� Analyse des Samples während/nach der

Ausführung

� Möglichkeiten

• Simulation

• Debugging

• Sandboxes

� Analyse meist in VM oder eigenem Labor

Page 17: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 17

Tools zur dynamischen Analyse

� OllyDbg, IDA Pro, WinDbg

� Sandboxie

� Sysinternals Toolset

� Wireshark

� Anubis, CWSandbox, JoeBox, ThreatExpert, ...

� Wepawet für JS/PDF, Flash

Page 18: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 18

Page 19: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 19

Page 20: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 20

Page 21: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 21

Page 22: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 22

Page 23: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 23

Page 24: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 24

Page 25: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 25

Page 26: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 26

Page 27: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 27

Probleme dynamischer Analyse I

� Anti-Debugging

• erschwert die Analyse in einem Debugger

• Packer, Crypter, Obfuscation

• Erkennung des Debuggers

• Spaghetti-Code, sinnloser Code

� Anti-Emulation/Anti-Sandbox

• verhindert/erschwert die Ausführung in Sandbox

• Timeout-Problematik, Interaktivität

• gleichbleibendes Emulationssystem

Page 28: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 28

Probleme dynamischer Analyse II

� VM-/Emulator-Erkennung

• Ausführung innerhalb einer VM wird erkannt

• Erkennung der VM-Software

• Unterschiede zu echtem System

• Kontaktaufnahme zu externem Server

� Systemvoraussetzungen

• unterschiedliche Sprache

• Architektur (32-/64-Bit)

• Betriebssystem

Page 29: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 29

Zusammenfassung

� ständige Weiterentwicklung der Malware

� AV-Industrie arbeitet oft nach

� Aktion ���� Reaktion

� Publikationen helfen beiden Seiten

� Verhalten bekannt ���� wirklich böse?

Page 30: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 30

Fragen

Florian [email protected]

Georg [email protected]

Page 31: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 31

Links

� Multiscanner

• Virustotal - http://www.virustotal.com/

• Jotti - http://virusscan.jotti.org/

• VirSCAN - http://virscan.org/

Page 32: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 32

Links

� statische Tools

• PEiD - http://www.peid.info/

• TrID - http://mark0.net/soft-trid-e.html

• Stud_PE - http://www.cgsoftlabs.ro/studpe.html

• CFF Explorer -

http://www.ntcore.com/exsuite.php

• HxD - http://mh-nexus.de/de/hxd/

• FileAlyzer – http://www.safer-

networking.org/de/filealyzer/index.html

Page 33: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 33

Links

� dynamische Tools

• OllyDbg - http://www.ollydbg.de/

• IDA Pro - http://www.hex-rays.com/idapro/

• WinDbg -http://www.microsoft.com/whdc/Devtools/Debugging/default.mspx

• Sandboxie - http://www.sandboxie.com/

• Sysinternals Toolset -http://www.sysinternals.com/

• Wireshark - http://www.wireshark.org/

Page 34: Statische vs Dynamische Analyse

Florian Nentwich / Georg Kremsner 34

Links

� Sandboxes

• Anubis - http://anubis.iseclab.org/

• CWSandbox - http://mwanalysis.org/

• ThreatExpert - http://www.threatexpert.com/

• Joebox - http://www.joebox.org/

� JS-/PDF- und Flash-Analyse

• Wepawet - http://wepawet.iseclab.org/