Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISP Action #81

Closed
Mxrk opened this issue Oct 3, 2019 · 6 comments · Fixed by #143
Closed

MISP Action #81

Mxrk opened this issue Oct 3, 2019 · 6 comments · Fixed by #143
Labels
Difficulty: Medium This issue is not easy and not hard to resolve good first issue Good for newcomers hacktoberfest Label for issues suited for the Hacktoberfest event New Action For suggesting a new action

Comments

@Mxrk
Copy link
Contributor

Mxrk commented Oct 3, 2019

Would be nice to be able to send alerts to MISP.

@d-Rickyy-b d-Rickyy-b changed the title MISP action MISP Action Oct 3, 2019
@d-Rickyy-b
Copy link
Owner

It would be awesome to have a new action which sends found pastes to a MISP instance.

To solve this issue there needs to be a new action added in the actions directory. The action must follow the example of the other actions in this directory. Don't forget to add the action to the action package file.

The most simple example for such an action is the GenericAction which executes a passed function.

The action must be able to send a new message to an existing MISP instance. Not using additional packages is highly preferred to keep the size of the application as small as possible.

Tests are not necessary but highly appreciated. If there are questions, don't hesitate to contact me.

@d-Rickyy-b d-Rickyy-b added Difficulty: Medium This issue is not easy and not hard to resolve good first issue Good for newcomers hacktoberfest Label for issues suited for the Hacktoberfest event New Action For suggesting a new action labels Oct 6, 2019
@Zeroji
Copy link
Contributor

Zeroji commented Oct 9, 2019

I'd like to tackle this one. I've almost managed to get MISP to run in Docker, hopefully it works and then I can try out my code - automated tests won't be possible (by me at least) though.

I have questions regarding the data output:

{
    "Event":{
        "date": "2015-01-01",
        "threat_level_id": "1",
        "info": "testevent",
        "published": false,
        "analysis": "0",
        "distribution":"0",
        "Attribute": [{
            "type": "domain",
            "category":"Network activity",
            "to_ids": false,
            "distribution":"0",
            "comment":"",
            "value":"test.com"
        }]
    }
}

This is the sample event object in the MISP docs
that has to be passed to their API, but I have no idea what to specify for a lot of the values - I could use some input on that part :)

EDIT: looking around, shouldn't all custom actions extend BasicAction instead of GenericAction?

@Zeroji
Copy link
Contributor

Zeroji commented Oct 9, 2019

Work in progress in misp-action
I made the action have a transformer parameter which can be used to specify a function to transform a Paste into a MISP event object, still have to build a default one but it's on its way.

@Zeroji Zeroji mentioned this issue Oct 9, 2019
@d-Rickyy-b
Copy link
Owner

@Zeroji Hi, thanks for the work. I don't have time to check it currently. Will try to have a look tonight!

@d-Rickyy-b
Copy link
Owner

Hey, just seen your EDIT. Yes, you should extend BasicAction. The text does not say that you should extend GenericAction, I just wanted to say that it's the easiest (working) Action I built. But yes, I should have added what base class to extend :)

I will check out your PR tomorrow. Had a stressful day today. Thanks for participating.

@Zeroji
Copy link
Contributor

Zeroji commented Oct 9, 2019

No worries, take your time! However for your own sake try to find a running MISP instance, because it took Docker about an hour and a half to build mine 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Medium This issue is not easy and not hard to resolve good first issue Good for newcomers hacktoberfest Label for issues suited for the Hacktoberfest event New Action For suggesting a new action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants