Documentation ¶
Index ¶
- type Graph
- func (g *Graph) AddNodeToEvent(node graphdb.Node, source, tag, eventID string) error
- func (g *Graph) AllNodesOfType(ntype string, events ...string) ([]graphdb.Node, error)
- func (g *Graph) CNAMEToAddrs(node graphdb.Node) ([]graphdb.Node, error)
- func (g *Graph) CacheSourceData(source, tag, query, resp string) error
- func (g *Graph) Close()
- func (g *Graph) EventDateRange(uuid string) (time.Time, time.Time)
- func (g *Graph) EventDomains(uuid string) []string
- func (g *Graph) EventFQDNs(uuid string) []string
- func (g *Graph) EventList() []string
- func (g *Graph) EventNames(uuid string, filter stringfilter.Filter) []*requests.Output
- func (g *Graph) EventOutput(uuid string, filter stringfilter.Filter, cache *amassnet.ASNCache) []*requests.Output
- func (g *Graph) EventSubdomains(events ...string) []string
- func (g *Graph) GetSourceData(source, query string, ttl int) (string, error)
- func (g *Graph) HealAddressNodes(cache *net.ASNCache, uuid string) error
- func (g *Graph) InEventScope(node graphdb.Node, uuid string, predicates ...string) bool
- func (g *Graph) InsertA(fqdn, addr, source, tag, eventID string) error
- func (g *Graph) InsertAAAA(fqdn, addr, source, tag, eventID string) error
- func (g *Graph) InsertAS(asn, desc, source, tag, eventID string) (graphdb.Node, error)
- func (g *Graph) InsertAddress(addr, source, tag, eventID string) (graphdb.Node, error)
- func (g *Graph) InsertCNAME(fqdn, target, source, tag, eventID string) error
- func (g *Graph) InsertEdge(edge *graphdb.Edge) error
- func (g *Graph) InsertEvent(eventID string) (graphdb.Node, error)
- func (g *Graph) InsertFQDN(name, source, tag, eventID string) (graphdb.Node, error)
- func (g *Graph) InsertInfrastructure(asn int, desc, addr, cidr, source, tag, eventID string) error
- func (g *Graph) InsertMX(fqdn, target, source, tag, eventID string) error
- func (g *Graph) InsertNS(fqdn, target, source, tag, eventID string) error
- func (g *Graph) InsertNetblock(cidr, source, tag, eventID string) (graphdb.Node, error)
- func (g *Graph) InsertNodeIfNotExist(id, ntype string) (graphdb.Node, error)
- func (g *Graph) InsertPTR(fqdn, target, source, tag, eventID string) error
- func (g *Graph) InsertSRV(fqdn, service, target, source, tag, eventID string) error
- func (g *Graph) InsertSource(source, tag string) (graphdb.Node, error)
- func (g *Graph) IsCNAMENode(fqdn string) bool
- func (g *Graph) IsMXNode(fqdn string) bool
- func (g *Graph) IsNSNode(fqdn string) bool
- func (g *Graph) IsPTRNode(fqdn string) bool
- func (g *Graph) IsRootDomainNode(fqdn string) bool
- func (g *Graph) IsTLDNode(fqdn string) bool
- func (g *Graph) MigrateEvent(uuid string, to *Graph) error
- func (g *Graph) NameToAddrs(node graphdb.Node) ([]graphdb.Node, error)
- func (g *Graph) NodeSources(node graphdb.Node, events ...string) ([]string, error)
- func (g *Graph) ReadASDescription(asn string) string
- func (g *Graph) SourceTag(source string) string
- func (g *Graph) String() string
- func (g *Graph) VizData(uuid string) ([]viz.Node, []viz.Edge)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph implements the Amass network infrastructure data model.
func NewGraph ¶
func NewGraph(database graphdb.GraphDatabase) *Graph
NewGraph accepts a graph database that stores the Graph created and maintained by the data model.
func (*Graph) AddNodeToEvent ¶ added in v3.3.0
AddNodeToEvent creates associations between a node in the graph, a data source and a discovery task.
func (*Graph) AllNodesOfType ¶ added in v3.6.0
AllNodesOfType provides all nodes in the graph of the identified type within the optionally identified events.
func (*Graph) CNAMEToAddrs ¶ added in v3.6.0
CNAMEToAddrs traverses CNAME records, starting with the parameter Node, and obtains the network addresses they eventually resolve to.
func (*Graph) CacheSourceData ¶ added in v3.8.0
CacheSourceData inserts an updated response from the source/tag for the query.
func (*Graph) Close ¶
func (g *Graph) Close()
Close will close the graph database being used by the Graph receiver.
func (*Graph) EventDateRange ¶ added in v3.3.0
EventDateRange returns the date range associated with the provided event UUID.
func (*Graph) EventDomains ¶ added in v3.3.0
EventDomains returns the domains that were involved in the event.
func (*Graph) EventFQDNs ¶ added in v3.5.0
EventFQDNs returns the domains that were involved in the event.
func (*Graph) EventList ¶ added in v3.3.0
EventList returns a list of event UUIDs found in the graph.
func (*Graph) EventNames ¶ added in v3.6.0
EventNames returns findings within the receiver Graph for the event identified by the uuid string parameter and not already in the filter StringFilter argument. The filter is updated by EventNames.
func (*Graph) EventOutput ¶ added in v3.5.1
func (g *Graph) EventOutput(uuid string, filter stringfilter.Filter, cache *amassnet.ASNCache) []*requests.Output
EventOutput returns findings within the receiver Graph for the event identified by the uuid string parameter and not already in the filter StringFilter argument. The cache ASNCache argument provides ASN / netblock information already discovered so the routine can avoid unnecessary queries to the graph database. The filter and cache objects are updated by EventOutput.
func (*Graph) EventSubdomains ¶ added in v3.4.2
EventSubdomains returns the subdomains discovered during the event(s).
func (*Graph) GetSourceData ¶ added in v3.8.0
GetSourceData returns the most recent response from the source/tag for the query within the time to live.
func (*Graph) HealAddressNodes ¶ added in v3.6.0
HealAddressNodes looks for 'ipaddr' nodes in the graph and creates missing edges to the appropriate 'netblock' nodes using data provided by the ASNCache parameter.
func (*Graph) InEventScope ¶ added in v3.6.0
InEventScope checks if the Node parameter is within scope of the Event identified by the uuid parameter.
func (*Graph) InsertA ¶ added in v3.3.0
InsertA creates FQDN, IP address and A record edge in the graph and associates them with a source and event.
func (*Graph) InsertAAAA ¶ added in v3.3.0
InsertAAAA creates FQDN, IP address and AAAA record edge in the graph and associates them with a source and event.
func (*Graph) InsertAddress ¶ added in v3.3.0
InsertAddress creates an IP address in the graph and associates it with a source and event.
func (*Graph) InsertCNAME ¶ added in v3.3.0
InsertCNAME adds the FQDNs and CNAME record between them to the graph.
func (*Graph) InsertEdge ¶ added in v3.3.0
InsertEdge will create an edge in the database if it does not already exist.
func (*Graph) InsertEvent ¶ added in v3.3.0
InsertEvent create an event node in the graph that represents a discovery task.
func (*Graph) InsertFQDN ¶ added in v3.3.0
InsertFQDN adds a fully qualified domain name to the graph.
func (*Graph) InsertInfrastructure ¶ added in v3.3.0
InsertInfrastructure adds/updates an associated IP address, netblock and autonomous system in the graph.
func (*Graph) InsertMX ¶ added in v3.3.0
InsertMX adds the FQDNs and MX record between them to the graph.
func (*Graph) InsertNS ¶ added in v3.3.0
InsertNS adds the FQDNs and NS record between them to the graph.
func (*Graph) InsertNetblock ¶ added in v3.3.0
InsertNetblock adds a netblock/CIDR to the graph.
func (*Graph) InsertNodeIfNotExist ¶ added in v3.3.0
InsertNodeIfNotExist will create a node in the database if it does not already exist.
func (*Graph) InsertPTR ¶ added in v3.3.0
InsertPTR adds the FQDNs and PTR record between them to the graph.
func (*Graph) InsertSRV ¶ added in v3.3.0
InsertSRV adds the FQDNs and SRV record between them to the graph.
func (*Graph) InsertSource ¶ added in v3.3.0
InsertSource creates a data source node in the graph.
func (*Graph) IsCNAMENode ¶
IsCNAMENode returns true if the FQDN has a CNAME edge to another FQDN in the graph.
func (*Graph) IsMXNode ¶ added in v3.3.0
IsMXNode returns true if the FQDN has a MX edge pointing to it in the graph.
func (*Graph) IsNSNode ¶ added in v3.3.0
IsNSNode returns true if the FQDN has a NS edge pointing to it in the graph.
func (*Graph) IsPTRNode ¶ added in v3.3.0
IsPTRNode returns true if the FQDN has a PTR edge to another FQDN in the graph.
func (*Graph) IsRootDomainNode ¶ added in v3.3.0
IsRootDomainNode returns true if the FQDN has a 'root' edge pointing to it in the graph.
func (*Graph) IsTLDNode ¶ added in v3.3.0
IsTLDNode returns true if the FQDN has a 'tld' edge pointing to it in the graph.
func (*Graph) MigrateEvent ¶ added in v3.6.0
MigrateEvent copies the nodes and edges related to the Event identified by the uuid from the receiver Graph into another.
func (*Graph) NameToAddrs ¶ added in v3.6.0
NameToAddrs obtains each ipaddr Node that the parameter Node has resolved to.
func (*Graph) NodeSources ¶ added in v3.6.0
NodeSources returns the names of data sources that identified the Node parameter during the events.
func (*Graph) ReadASDescription ¶ added in v3.3.0
ReadASDescription the description property of an autonomous system in the graph.
func (*Graph) SourceTag ¶ added in v3.3.0
SourceTag returns the tag associated with the identified data source.