malware analysis environment for 64 bit windows
play

Malware analysis environment for 64 bit Windows Mauritius 2016 - PowerPoint PPT Presentation

Malware analysis environment for 64 bit Windows Mauritius 2016 FIRST TC Hiroshi Suzuki Internet Initiative Japan Inc. Who am I? Hiroshi Suzuki, from Internet Initiative Japan Inc. that is short for IIJ. IIJ is a Japanese


  1. Malware analysis environment for 64 bit Windows Mauritius 2016 FIRST TC Hiroshi Suzuki Internet Initiative Japan Inc.

  2. Who am I? • Hiroshi Suzuki, from “Internet Initiative Japan Inc.” that is short for “IIJ”. – IIJ is a Japanese ISP (We are the first commercial ISP in Japan). • I’m a member of a CSIRT team called “IIJ - SECT”. – I’m a malware and forensics analyst for our customer and our company. – Our jobs include… • Malware Analysis • Forensic Investigation • Incident Response and Handling • Developing and operating honeypot and web crawler systems • Surveying malware and attacking technique trends • Hands-on Trainer, Speaker – Including Blackhat, FIRST, internal lecture for Japanese government and so on. • Writing reports for our quarterly report (called “IIR”) and blogs

  3. What is malware analysis?

  4. What is Malware Analysis? • It is to reveal malware behavior combining with the below methods. – Surface Analysis – Dynamic Analysis (Runtime analysis, Black box analysis) – Static Analysis (White box analysis, Reverse (Code) Engineering, Reversing… ) • Terms and definitions are not fixed. – Sometimes, surface analysis is included in static analysis. • There is public source analysis as well (in other words, googling ;-)).

  5. What is Malware Analysis? • Each analysis is related. Surface Analysis Public Source Dynamic Analysis Analysis Static Analysis

  6. Why do I focus on 64 bit windows?

  7. Why I focus on 64 bit windows? • There are a lot of tools on 32 bit windows. – Many web sites and books introduce 32 bit tools. • But tools for 64 bit was different story until recently. – Now it’s turning for the better. – So it’s worth researching because of the period of transition from 32 bit to 64 bit. • And recent malware has both binaries. – Sometimes, you will need to analyze 64 bit malware if infected machine is 64 bit windows.

  8. Surface analysis

  9. Surface analysis tools Tool name 32 64 Description ○ ○ CFF Explorer PE Editor, Viewer ○ ○ PE Studio PE Viewer ○ ○ StudPE PE Editor, Viewer ○ ○ PE Insider PE Viewer ○ ○ pefile Python PE Editor, Viewer “64” means that it can handle pe32+.

  10. Surface analysis tools

  11. Surface analysis tools

  12. Surface analysis tools

  13. Dynamic analysis

  14. Dynamic analysis tools • System monitoring tools Tool name 32 64 Description ○ ○ Sysinternals suite Procmon, Sysmon , Process explorer… ○ ○ Process Hacker Monitoring Process activities ○ ○ API Monitor Monitoring APIs ○ ○ Fakenet Internet Emulator / Packet capture ○ ○ Fakenet-ng Internet Emulator / Packet capture ○ ○ Wireshark Packet capture / analyzer ○ ○ regshot Monitoring Registry, File activities ○ × Capture-BAT Monitoring Registry, File activities

  15. Dynamic analysis tools • Process Monitor (Procmon) – It can monitor: • Process Activities • File activities • Registry Activities • Network Activities

  16. Dynamic analysis tools • Process Explorer – It is high functionality version of task manager. It can visualize: • Process tree • Handles • DLLs • Threads • TCP/IP • Strings – file/memory – And it has ability • To kill/suspend/ restart processes • To dump memory

  17. Dynamic analysis tools • Process Hacker – It is similar to Process Explorer. In addition, this tool can also Read/Write on memory regions, and dump it. • It is useful when I analyze malware with process hollowing technique.

  18. Dynamic analysis tools • API Monitor – It can monitor as well as pause by setting breakpoints over 2,000 APIs including COM related APIs.

  19. Dynamic analysis tools • Fakenet-NG – Internet emulator • Maintained by FireEye (Flare team) • This software redirects communications from malware to this software and recording host names and/or IP addresses of C2 servers and its contents. • It has capturing packets feature as well.

  20. Dynamic analysis tools • Debugger Tool name 32 64 Description ○ × OllyDbg Developing 64 bit, but it’s not released yet over two years. It’s very slow pace  Immunity Debugger ○ × There is only internal version for 64bit? ○ ○ x64dbg New de-facto standard? ○ ○ IDA Pro Commercial Debugger / Disassembler Actually, 64 bit debugger is a wrapper of WinDbg. ○ ○ WinAppDbg Python Command line Debugger ○ ○ WinDbg Microsoft original debugger

  21. Dynamic analysis tools • x64dbg – This debugger has a similar look and feel to OllyDbg. – This is frequently updated (on weekly or nearly on daily basis). – It is superior to OllyDbg that : • Can handle 64bit binaries. • Has a memory breakpoint on execution. • Has a decompiler. • Can display a graphical code flow feature.

  22. Dynamic analysis tools • Debugger plugins Tool name 32 64 Description ○ × OllyDump PE Dumper for unpacking ○ ○ OllyDumpEx PE Dumper for unpacking ○ × StrongOD Hide OllyDbg ○ × HideDebugger Hide OllyDbg ○ ○ ScyllaHide Hide debugger ○ ○ TitanHide Hide debugger ○ ○ OllyMigrate Debugger Migration ○ ○ Labeless Debugger collaboration (IDA Pro and others) for labels and comments ○ ○ ret-sync Debugger collaboration (IDA Pro and others) for syncing EIP position

  23. Dynamic analysis tools • OllyDumpEx – This is a kind of PE dumper based on OllyDump. – It is useful to unpack binaries for container (cryptor) type packers. – It is also useful for “turbo unpacking”. It can search PE image in memory regions, and Heap chunks. – It can handle many debuggers. • OllyDbg v1/v2 • Immunity Debugger • x64dbg • WinDbg • IDA Pro

  24. Dynamic analysis tools • OllyMigrate – It can move a debugger to another without restarting a target process in the middle of debugging. – It is useful to deal with anti debugger. • E.g. After I deal with anti debugger using a debugger with anti-anti-debugger plugins, we can move it into another debugger like IDA Pro and continue to debug. – It can handle many debuggers. • OllyDbg v1/v2 • Immunity Debugger • x64dbg • WinDbg • IDA Pro

  25. Dynamic analysis tools • ScyllaHide – It is an anti-anti debugger plugin. – It can handle several debuggers. • OllyDbg v1/v2 • x64Dbg • IDA Pro

  26. Dynamic analysis tools • ret-sync – It is a tool for collaboration between IDA and other debuggers. • It synchronize IDA Disassemble view with a debugger’s EIP.

  27. Dynamic analysis tools • Import Reconstruction Tools Tool name 32 64 Description ○ × Imprec - ○ ○ Scylla - • Patch Guard Disabler Tool name 32 64 Description ○ DisPG - For Windows 7 SP1 ○ meow - For Windows 8.1

  28. Dynamic analysis tools • Scylla – It is IAT reconstructor. – It is based on ImpRec, but it can handle 64 bit binaries.

  29. Static analysis

  30. Static analysis tools • Disassembler Tool name 32 64 Description ○ ○ IDA Pro De facto standard disassembler • Disassembler Plugins Tool name 32 64 Description ○ × Findcrypt Find cryptographic algorithms ○ ○ IDA Sigsrch Find cryptographic algorithms ○ × CrowdDetox Code de-obfuscation ○ ○ ClassInformer Find C++ class ○ ○ BinDiff Binary Diffing ○ × Turbodiff Binary Diffing

  31. Static analysis tools • IDA Pro – It is the one and only Disassembler in the world. • Of course I know, there are many disassemblers in the wild, but IDA Pro is head and shoulders above the others. • It can handle 64 bit binaries (IDA Pro commercial version only) – It is a wrapper for WinDbg. – It has a lot of abilities that: • It can display GUI-based code flow graph. • It has cross reference feature. • It can rename function, variable names. • It can reconstruct C structure, enumeration (ENUM) and function types. – IDA includes many predefined windows structures, enumerations and types by default. • It has script (IDC, python) feature to automate analysis and debugging tasks. • It has a decompiler plugin.

  32. Static analysis tools • BinDiff – It is a Binary Diffing tool provided as a plugin for IDA Pro. • It was a commercial tool, but now it’s free. – It is a useful tool for analyzing variants. • Because it can compare the differences between variants as well as import/export comments and names. https://www.zynamics.com/bindiff.html

  33. Conclusion • Newer tools and existing tools that are updated continuously can handle on 64 bit binaries. – Now you can analyze 64 bit malware on 64 bit environment. • But some tools, especially reverse engineering tools can’t handle on 64 bit binaries. – Sometimes, we might experience tough situation in reverse engineering task.

  34. That’s it! Any questions? Twitter: @herosi_t

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend