Saving data

Last but not least, the platform saves the ingested entities to the databases in the following order:

  1. Entity store (PostgreSQL).

  2. Search store (Elasticsearch).

  3. Graph store (Neo4j).

Saving data URIs and raw artifacts

The extracted entity data that is stored inside observables ranges from short, simple data such as email addresses, domain names, IP addresses, and so on, to binary data.
When an entity contains binary data — for example, a file, a memory region, or packet capture (PCAP) data — the data can be represented as either a data URI or a CybOX raw artifact element.

During ingestion, extraction logic handles binary data URI and raw artifact objects embedded in CybOX objects in the following way:

Data URIs are extracted and stored as entity attachments and new hash values:

  • The data URI value is recalculated to a new hash: uri-hash-sha256.
    The SHA-256 hash value for uri-hash-sha256 is calculated over the UTF-8 encoding of the data URI string.
    The uri-hash-sha256 hash substitute enables entity correlation among entities containing the same data URI.

  • The binary data/raw content embedded in the data URI is decoded and processed:

    • The extracted binary data content is stored as an entity attachment similar to the name="Raw_Artifact" type="ArtifactObj:RawArtifactType" CybOX object.

    • The extracted content is hashed using SHA-512, SHA-256, SHA-1, and MD5.
      Each resulting hash is added to the relevant entities as an observable.


A data URI with image content nested inside a CybOX object generates the following output:

  • 1 uri-hash-sha256 hash to facilitate entity correlation.

  • 4 calculated hash observables: hash-sha512, hash-sha256, hash-sha1, and hash-md5.

  • 1 embedded JSON entity attachment (raw-artifact) with the extracted binary data representing the image content.

The following example shows a sample input along with the corresponding output.

# Recalculated hash of the original URI:
# Multiple hashes of the decoded content:
# (Attachment) Raw artifact as embedded JSON with the content:
('raw-artifact:{"content": '
'"content_encoding": "base64", "type": "image/png"}'),