Repository navigation
fix: [network-traffic] type src_ip as ip-src - #614
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Member
|
Thanks good finding indeed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the
network-traffictemplate,src_ip("Source IP address of the network traffic") is typedip-dst, the same asdst_ip(definition.json#L63-L67 at 4c30b90). It looks like a copy-paste slip:ip-src(network-connection,network-socket,netflow,cowrie,http-request, ...);ip-srcwhen it imports a STIX Network Traffic object into this template (stix2mapping.py#L244-L246, used in stix2_observable_converter.py#L120-L131).So today the same relation gets
ip-dstwhen the object is made in the MISP form or with PyMISP (both take the type from the template) andip-srcwhen it comes from a STIX import.Where the type makes a difference in MISP core (2.5 at d66fb5c; not an exhaustive list):
ip-dst(now)ip-src(proposed)$HOME_NET any -> <ip>, "Outgoing To IP" (L329-L348)<ip> any -> $HOME_NET, "Incoming From IP" (L350-L369)RouteEntryItem/DestinationPortItem/remoteIPip-dst)ip-dstip-srcCorrelation.php,BroExport.phpandNetfilterExport.phplist both types side by side, so nothing changes there.Changes:
src_ip:ip-dst->ip-srcsrc_hostname: the description said "Destination hostname of the network traffic"; now "Source hostname of the network traffic"version: 1 -> 2Existing objects are not touched: stored attributes keep their type and the objects stay on template version 1. Only objects created after the template update get
ip-src; MISP moves an existing object to a newer template version only when a user asks for it in the edit form. On that upgrade core flags the oldsrc_ipandsrc_hostnamevalues as not mergeable automatically, as it does for any template element that changed (MispObject.php#L1736-L1791).In the STIX 2 export, misp-stix has no dedicated handler for this object name (stix2_mapping.py#L343-L394), so that side does not depend on the type.
Checked: the file is byte-identical to the output of
jq -S -j .(jq 1.7.1), it validates againstschema_objects.json, and the UUID is unchanged. Not tested on a MISP instance: the behaviour above is from reading the code linked.Prepared with Claude Code (AI-assisted).
🤖 Generated with Claude Code