Giter Club home page Giter Club logo

misp-to-csv's Introduction

MISP to CSV export tool

Python MISP to CSV export script without a PyMISP integrations. The script uses the MISP API to retrieve data from the MISP tenant. It connects to the MISP instance using the provided API credentials and makes API requests to fetch the desired data.

What to change

Add the domain and API-key at line 5 and 6 url = "https://domain.com" api_key = "API-KEY"

Change how many pages you want to export at line 19: "page":1,

Change which threat intel you want to export at line 26: "tags": { "OR": [ "tlp:green" ] }

Examples are:

  • tlp:red
  • tlp:green
  • tlp:white
  • malware
  • malicious

How do you run it?

python .\misp-to-csv.py

Tested on

Python 3.7 MISP v2.4.171

"Buy Me A Coffee"

Description of the script

  • Connect to the MISP tenant:

    • The script establishes a connection to the MISP instance by providing the necessary authentication credentials such as the API key or username and password.
    • It uses the MISP API endpoint URL to make requests to the MISP instance.
  • Fetch data from the MISP tenant:

    • The script sends API requests to the MISP instance to retrieve the desired data.
    • It can fetch various types of data such as events, attributes, indicators, or other relevant information based on the requirements.
  • Process the retrieved data:

    • Once the data is received from the MISP tenant, the script processes it according to the desired format, which in this case is CSV.
    • It extracts the necessary fields and organizes the data in a tabular format suitable for CSV conversion.
  • Convert the processed data to CSV:

    • The script converts the processed data into CSV format.
    • It uses a CSV library or built-in functions to generate the CSV file.
    • The relevant data fields are mapped to the corresponding columns in the CSV file.
  • Save the CSV file:

    • The script saves the generated CSV file to a specified location.
    • It may include a timestamp or unique identifier in the file name to distinguish between different data retrievals.

By following this process, the script connects to the MISP tenant, retrieves the desired data via the MISP API, processes it, converts it to CSV format, and finally saves it as a CSV file.

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.