Git Product home page Git Product logo

maec-output-framework's Introduction

MAEC Output Framework

A framework for producing MAEC output from multiple tools at once.

BY USING THE MAEC OUTPUT FRAMEWORK, YOU SIGNIFY YOUR ACCEPTANCE OF THE TERMS AND CONDITIONS OF USE. IF YOU DO NOT AGREE TO THESE TERMS, DO NOT USE THE SCRIPT. For more information, please refer to the LICENSE.txt file.

Overview

Given a binary file or an MD5, the framework script will run the input through a list of MAEC-producing modules and aggregate the output into a single MAEC Package. More specifically, it will create a single MAEC Malware Subject for the input file or MD5, and will capture the output of each individual tool in its own Finding Bundle in the Malware Subject.

Dependencies

This code has been developed and tested under Python 2.7.x and so may not be compatible with Python 3.x.

There are two dependencies for this utility:

  1. The python-maec library >= v4.1.0.10: [PyPI] [GitHub]
  2. The python-cybox library >= v2.1.0.9: [PyPI] [GitHub]

For tools that are compatible with the MAEC Output Framework, see "Tool List" below.

Usage

python runtools.py (--md5 | --file) <input file path or MD5> <output XML file path>
                   [--verbose] [--progress]

Given a file argument (--file), each particular tool either inspects the file locally, or submits the file’s hash to an external analysis service (to look for any existing analyses for this hash). Currently, no tool submits the actual file contents to an external service.

Given an MD5 hash argument (--md5), each particular tool submits the value to an external analysis service and looks for any existing analyses for this hash.

The --progress argument enables tool-by-tool success messages.

The --verbose argument enables verbose error messages, useful for debugging.

Configuration

Per-module configuration and global configuration options can be set in config.py.

The configuration dictionary for a module in the modules list looks like:

{
    "import_path":"virustotal_to_maec",        # package identifier, used with importlib.import_module

    "options": {                               # options used to build the ScriptOptions object
                "deduplicate_bundles": True,   # implies MalwareSubject::deduplicate_bundles
                "dereference_bundles": False,  # implies MalwareSubject::dereference_bundles
                "normalize_bundles": True      # implies MalwareSubject::normalize_bundles
    },

    "api_key":"1a2b3c4d5e6f7"                  # API key used by this module when contacting a service
}

The global_config dictionary (applicable to all modules) currently contains only a proxies entry, which represents a dictionary of proxy servers (HTTP or HTTPS) to use. The global_config dictionary therefore looks like:

{
    "proxies": {
        "http":"http://example.com:80",
        "https":"http://example.com:80"
    }
}

Tool Interface

A conversion module may define any of the following methods, to be called by the framework:

  • generate_package_from_binary_filepath - given an filepath, the function returns a python-maec Package object
  • generate_package_from_md5 - given an MD5 string, the function returns a python-maec Package object
  • set_proxies - optionally called to supply proxy information to the module; supplied as a dictionary like { "http": "http://example.com:80", ... }
  • set_api_key - optionally called to supply API key information to the module

If the framework attempts a particular operation, and the module does not support the particular method required for that operation, the module will simply be skipped for that operation.

Tool List

Some projects with modules that currently implement the compatible tool interface are:

maec-output-framework's People

Contributors

apsillers avatar ikiril01 avatar

Watchers

 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.