-
Notifications
You must be signed in to change notification settings - Fork 62
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
support /attributes and /events enpoints from MISP feed for Zeek intel generation #336
Comments
#!/usr/bin/env bash
RESOURCE="${1:-/attributes}"
MISP_URL=https://localhost:31443/
MISP_API_KEY=xxxxxxxxxxx
echo "requesting $RESOURCE" >&2
curl -fsSLk \
--header "Authorization:$MISP_API_KEY" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
$MISP_URL$RESOURCE |
I believe we can use the |
The updated documentation: MISPIn addition to loading Zeek intelligence files on startup, Malcolm will automatically generate a Zeek intelligence file for all Malware Information Sharing Platform (MISP) JSON files found under Additionally, if a special text file named
For example:
Malcolm will attempt to connect to the MISP feed(s) and retrieve Upon Malcolm connects to the URLs for the MISP feeds in
Note that only a subset of MISP attribute types can be expressed with the Zeek intelligence indicator types. MISP attributes with other types will be silently ignored. |
We've got some MISP capabilities. The code that handles grabbing MISP indicators is here and says in its comments:
Some colleagues at USAF have been poking at it having discussions with us about expanding its compatibility of what it can handle. They've suggested we look at running MISP with
docker compose
and pulling from it directly.I'm going to quote some of that discussion here:
Hey @mmguero I figured out what you should be querying from MISP to integrate with Malcolm. They're called "attributes".
GET
to the/attributes
resource to get a list, as follows:id
field below, at 626143!). Each of which resembles the following:As you might guess, the meat of this is the
"value"
member of the JSON, as that IP address is the dirty IP address that MISP is trying to say is malicious. I assume thevalue1
andvalue2
fields should be parsed as well for similar reasons.What I'd recommend is standing up a MISP instance, loading the full list of default feeds, enabling them, and fetching from them (a guide is here).
And then waiting a good few hours for it to fetch down this massive list of attributes.
After you feel you have a good number of attributes (use the bash script at the beginning of this post and note the
id
, as that that is the current size of the list), iterate over each of them and enumerate what members are possible. Then decide which members are relevant to Malcolm and how they should be appropriately parsed. Perhaps that is just the IP addresses ("value" for relevant attributes), but you would know better than me in this regard!I also found a bug! In MISP though: where when it pulls the attributes list, it doesn't give you the complete list. It would only give me 60, despite there actually being 4,000,000. Thus, what I described as just GET-ing /attributes will not give you the full list.
The solution is to find out how long the list is by pulling the attribute list and checking each for the highest id number (it appears that the first element is the highest ID, but I do not conclusively know this. Hence, check each ID from the list given), and then individually pulling all IDs from 1 up to that number.
Code snippet in the comment below to avoid blowing up the channel. Also, note that when we access attributes individually, we now have an outer single-element dictionary of just "Attribute."
Sample output:
and so on
The text was updated successfully, but these errors were encountered: