-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
When using the threatintel module, and misp data the fields do not accept cidr notation #29949
Comments
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
elastic/ecs#86 is related. @toddferg, what behaviour would you like to see here? At the moment I think all we can to is broaden grok pattern tolerance/add disects to allow 192.168.50.0 to be kept, but lose the CIDR prefix size. This would allow this class of search to succeed, but loses the IP range. Also, do you have example log lines that have this type of input? |
@efd6 Sorry for the delay. So I'm not sure what would be best. Because siem rules might do best to use the ip range searches which would work? In regards to log lines, what do you mean? From the misp input, or the output from the beat to elastic? |
I guess it could be conditionally put into
Both? at least whichever you have available. |
We are seeing this as well; for example,
The comments here are missing the crux of the issue. MISP is passing a CIDR range, but the Elasticsearch
Causes error:
And to be fair to Elasticseach: this is not an IP address; it is an IP network. It will be correctly rejected by Python's
I suggest either:
|
This should be classified as a bug in https://github.com/elastic/beats/tree/main/x-pack/filebeat/module/threatintel/misp and the pipeline at https://github.com/elastic/beats/blob/main/x-pack/filebeat/module/threatintel/misp/ingest/pipeline.yml should be fixed to get rid of this error. |
@efd6 It's a major bug because it causes MISP data to be rejected outright and not even ingested. |
This is still not part of ECS as of now either. |
Full exception:
|
Here's the record prettified with {
"Event": {
"Attribute": {
"Galaxy": [],
"ShadowAttribute": [],
"category": "Network activity",
"comment": "",
"deleted": false,
"disable_correlation": false,
"distribution": "5",
"event_id": "1528",
"first_seen": null,
"id": "4081012",
"last_seen": null,
"object_id": "0",
"object_relation": null,
"sharing_group_id": "0",
"timestamp": "1670293864",
"to_ids": true,
"type": "ip-dst",
"uuid": "4fa3610f-5412-41dd-9034-c8294fc3c7c2",
"value": "146.88.240.0/24"
},
"CryptographicKey": [],
"EventReport": [],
"Galaxy": [],
"Object": [],
"Org": {
"id": "1",
"local": true,
"name": "ORGNAME",
"uuid": "121f5d02-2e2e-4180-9166-fcad7e01a20d"
},
"Orgc": {
"id": "1",
"local": true,
"name": "ORGNAME",
"uuid": "121f5d02-2e2e-4180-9166-fcad7e01a20d"
},
"RelatedEvent": [
{
"Event": {
"Org": {
"id": "1",
"name": "ORGNAME",
"uuid": "121f5d02-2e2e-4180-9166-fcad7e01a20d"
},
"Orgc": {
"id": "3",
"name": "CIRCL",
"uuid": "55f6ea5e-2c60-40e5-964f-47a8950d210f"
},
"analysis": "2",
"date": "2018-03-26",
"distribution": "3",
"id": "896",
"info": "OSINT - Forgot About Default Accounts? No Worries, GoScanSSH Didn’t",
"org_id": "1",
"orgc_id": "3",
"published": true,
"threat_level_id": "3",
"timestamp": "1523865236",
"uuid": "5acdb4d0-b534-4713-9612-4a1d950d210f"
}
}
],
"ShadowAttribute": [],
"Tag": [
{
"colour": "#004577",
"exportable": true,
"hide_tag": false,
"id": "1",
"is_custom_galaxy": false,
"is_galaxy": false,
"local": 0,
"local_only": false,
"name": "osint:source-type=\"block-or-filter-list\"",
"numerical_value": null,
"user_id": "0"
}
],
"analysis": "2",
"attribute_count": "2053",
"date": "2022-07-26",
"disable_correlation": false,
"distribution": "0",
"event_creator_email": "admin@admin.test",
"extends_uuid": "",
"id": "1528",
"info": "firehol_level1 feed",
"locked": false,
"org_id": "1",
"orgc_id": "1",
"proposal_email_lock": false,
"protected": null,
"publish_timestamp": "0",
"published": false,
"sharing_group_id": "0",
"threat_level_id": "4",
"timestamp": "1672885819",
"uuid": "2ed041a1-33ea-4e54-bf26-bf1c7ce191b3"
}
} |
Operating System: Centos 8.
Version: Filebeat 7.16.3. and Elasticsearch 7.16.3
Module: Threatintel
Sub Config: Misp.
Depending on the data from the Misp source, some of the ip's could be in cidr notation specifically when using the ip address field, it doesn't accept the cidr notation as a valid ip.
example field:
threatintel.indicator.ip
Quick test to check with elasticsearch:
In general the misp data might include cidrs notation and the beat will have to work with that information.
The text was updated successfully, but these errors were encountered: