LAC-Japan / MISP-CSVImport

CSV import tool for MISP
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

MISP CSVImport

MISP project: http://www.misp-project.org/

Overview

Register MISP events based on information described in files such as CSV and TSV.

license

This software is released under the BSD License, see LICENSE.txt.

Environment

usage

1 Creating a file for import

1-1 File Format

In the target file, please describe the items in the following order with an arbitrary delimiter. A header line is not required.
(TSV recommended)

Example

sample.tsv

1-2 Mapping of file items and MISP events

Each item is mapped to the MISP event with the following contents.

2 Setting const.py

Open const.py and make the following settings.

2-1 MISP connection
2-2 Import configuration

In the following variables, set the user's mail address as the key and the import setting for the user as the value in the following format. The user mail address defined here is associated with the value in the user column of the import control file, and the import setting of that user is used when importing the corresponding event. target: IMPORT_CONFIG

example
IMPORT_CONFIG = {
    'sample@misp.user': {
        'authkey': 'valid authkey'
        ,'distribution': 'distribution config constants'
        ,'threat_level': 'threat level config constants'
        ,'analysis_level': 'analysis level config constants'
    }
}

3 Running the script

python3 ./MISP-CSVImport.py - i [import file path] [option]

Option
example

Import sample.tsv python3 ./MISP-CSVImport.py -i ./sample.tsv --skip-header --ls "\r\n" --cs " "

Precautions