Closed barvhaim closed 4 years ago
From the spec:
When matching an Observation against an Observation Expression, all Comparison Expressions contained within the Observation Expression MUST start matching against same SCO in the Observation. That is, when resolving object paths of each Comparison Expression, the
: MUST start from the same SCO. Different SCO's may ultimately be used in matching, but they MUST be referenced from the same, single SCO. For example, the following observed data does not match this example observation clause because although these IP addresses are both part of the same observed-data object, there is not a single network-traffic SCO that references each IP address, and therefore does not satisfy the condition in the preceding paragraph:
[ network-traffic:src_ref.value = '203.0.113.10' AND network-traffic:dst_ref.value = '198.51.100.58' ]
{ "type": "observed-data", "id": "observed-data--0960319a-3cab-4258-a143-4dbb25525bb1", "first_observed": "2019-10-20T00:12:01.000000Z", "last_observed": "2019-10-20T00:51:02.000000Z", "number_observed": 1, "objects": { "0": { "type": "network-traffic", "src_ref": "1" }, "1": { "type": "ipv4-addr", "value": "203.0.113.10" }, "2": { "type": "network-traffic", "dst_ref": "3" }, "3": { "type": "ipv4-addr", "value": "198.51.100.58" } } }
An Observation Expression MAY contain Comparison Expressions with Object Paths that start with different object types, but such Comparison Expressions MUST be joined by OR. The Comparison Expressions of an Observation Expression that use AND MUST use the same base Object Path
Your combined pattern is not a valid STIX pattern since you use AND on different object types. Moreover your SDO is not a valid observed-data since, if I am not mistaken, the first SCO, "0"
, is not linked to others:
Multiple objects not related to each other via cyber observable Relationships MUST NOT be contained within the same Observed Data instance.
Ideally you want to start from a single SCO and walk to the property of interest:
process:x_ecs_event_ref.action = 'CreateKey'
And find another path from process
to windows-registry-key
(or you can try starting from somewhere else).
My pattern combines two
matching
patterns, but returnno match
, what am I missing?AND pattern:
pattern 1:
pattern 2:
using the following observed data -