GithubHelp home page GithubHelp logo

morimolymoly / malware-analysis-at-scale-defeating-emotet-by-ghidra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allsafecybersecurity/malware-analysis-at-scale-defeating-emotet-by-ghidra

0.0 0.0 0.0 137 KB

Ghidra Script for automated analysis of EMOTET

Python 100.00%

malware-analysis-at-scale-defeating-emotet-by-ghidra's Introduction

Malware Analysis at Scale ~ Defeating EMOTET by Ghidra ~

This repository provides a set of Ghidra Script for EMOTET analysis. Included scripts are following.

  • extract_xor_key.py: extract XOR key for API hash. extracted XOR key will be used to generate hash database (db.json) for resolving hashes.
  • make_hash_db.py: generate hash database for resolving API hash. this script is NOT Ghidra Script. make sure to run this on your host.
  • search_hash.py: search hashes in target binary and add comment with corresponding API. database for hashes which is used for lookup APIs must be generated by make_hash_db.py.
  • decrypt_strings.py: decrypt strings as much as possible.
  • extract_c2.py: extract C&C URL (including protocol, hostname and port) automatically.
  • analyzer.py: all-in-one script of above scripts, especially for Headless Analyzer.

Originally these scripts were shared in Japan Security Analyst Summit (JSAC) 2021. If you need the scripts that is used in that workshop, you can find them in for_training folder. The slide deck is available here (Japanese).

Before use

This is Gihdra Script. You need to install Ghidra before running script. If you're not familiar with Ghidra Script, please see the documents below.

Plus this should be noted, these scripts will analyzer "unpacked" EMOTET. So you need unpacked one before running this script. You can get it by yourself with hollow_hunter or use online sandbox for unpack (like CAPE).

Installation

clone this repository, and add the cloned path into your Script Directories.

> git clone https://github.com/AllsafeCyberSecurity/malware-analysis-at-scale-defeating-emotet-by-ghidra.git
> cd malware-analysis-at-scale-defeating-emotet-by-ghidra.git
> python -m pip install -r requirements.txt

Usage

Only analyzer.py is Headless Script. After making sure to import the unpacked EMOTET in your Ghidra Project, You can run this script as following.

> %GHIDRA_INSTALL_DIR%\support\analyzeHeadless.bat <path-to-your-project> <project-name> -process <already-imported-unpacked-emotet-filename> -scriptPath <path-to-this-repo> -postScript analyzer.py <path-to-output>.json

Other scripts are Ghidra Script. You can run them from Script Manager.

malware-analysis-at-scale-defeating-emotet-by-ghidra's People

Contributors

er28-0652 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.