Skip to content

Facts created in "fact sources" do not support relationships? #2988

Description

@timbrigham-oc

I think there might be a bug in the relationship mapping for imported facts.

My use case is attempting to emulate an adversary having an already known username and password.
These are domain.user.name has_pasword of domain.user.password, with an edge relationship defined.
I want to be able to eventually use these three values in a basic parser to validate the settings are correct source / edge / output mapping.

This occurs on v 5.0.0, when creating a new fact in a fact source and defining a relationship.

When I export the facts created by one of my operations and look at the IP to FQDN mapping I see remote.host.fqdn has_ip to remote.host.ip

Looking at the exported JSON in the report for IP addresses the unique value, edge, and target make sense for the "relationships" -

        "unique": "<app.objects.secondclass.c_fact.Fact object at 0x797cfabe60b0>has_ip<app.objects.secondclass.c_fact.Fact object at 0x797cfabe47f0>",
        "source": {
          "unique": "remote.host.fqdnmdns.mcast.net",
          "trait": "remote.host.fqdn",
          "name": "remote.host.fqdn",
          "value": "mdns.mcast.net",
...
        "edge": "has_ip",
        "target": {
          "unique": "remote.host.ip224.0.0.251",
          "trait": "remote.host.ip",
          "name": "remote.host.ip",
          "value": "224.0.0.251",
...

When I look at facts created in via the UI I'm getting the following, showing "none".

    "relationships": [
      {
        "unique": "<app.objects.secondclass.c_fact.Fact object at 0x797cfa53a4d0>has_password<app.objects.secondclass.c_fact.Fact object at 0x797cfa539270>",
        "source": {
          "unique": "domain.user.nameNone",
          "trait": "domain.user.name",
          "name": "domain.user.name",
          "value": null,
...
        "edge": "has_password",
        "target": {
          "unique": "domain.user.passwordNone",
          "trait": "domain.user.password",
          "name": "domain.user.password",
          "value": null,
...

I have recreated this a couple times, and seems to occur regardless of the order I create the two facts or the relationship statement, but I tend to test by creating domain.user.name, then domain.user.password then the relationship has_password.

How do I define a relationship in a fact source?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIndicates an unexpected problem or unintended behaviorno-issue-activityNeeds Attention

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions