design_overview.md

April 27, 2019 ยท View on GitHub

Design Overview

Beagle's graph models are at the host level. Nodes are created for things like processes, files and network connections. Nodes are not currently created for interhost communications (i.e, there will not be a Computer -(RDP)-> Computer edge), but graphs from two different hosts can be overlapped using networkx.

Host artifacts are mapped to classes which implement the DataSource, which yield events one by one from the artifact.

Transformer classes take the events from the data source and transform them into Node objects.

Finally, Node objects are sent to the desired storage location via a choice of Backend class.

Features

The following is an overview of supported datasources and backends.

Node Types

The following is a list of currently support Node Types

Node Type
Alert
Domain
File
IPAddress
Process
RegistryKey
URI

Alert nodes represent alerts identified in the logs (if they are available). Including these nodes allows the web interface to drop analysts into the context of the alert as soon as they generate the graph.

URI nodes represent the URI of an HTTP request. For example, GET foobar.com/foo would result in the following nodes; Domain(foobar.com), URI(/foo).

Edge Types

EdgeSource TypeDest TypeDescription
LaunchedProcessProcessProcess launching
URIOfURIDomainURI of a domain
ResolvesToDomainIP AddressDomain resolves to a domain
FileOfFileProcessThe file which a process image belongs to
CopiedToFileFileEdge representing a file was copied to another destination
WroteProcessFileA process wrote to this file
AccessedProcessFileA process accessed/read from this file
DeletedProcessFileA process deleted this file
CopiedProcessFileA process copied this file (the copied file will have a CopiedTo edge to the dest file)
LoadedProcessFileA process loaded a function from this file.
ConnectedToProcessIPAddressA process initiated a network connection to this address
HTTPRequestToProcessURIA process made a HTTP Request to this URI
DNSQueryForProcessDomainA process performed a DNS request for this domain.
ChangedValueProcessRegistryKeyA process changed the value of this registry key
CreatedKeyProcessRegistryKeyA process created this registry key
ReadKeyProcessRegistryKeyA process read the value of this registry key
DeletedValueProcessRegistryKeyA process deleted the value of this registry key
DeletedKeyProcessRegistryKeyA process deleted this registry key
AlertedOnProcessNodeAn alert was triggered on this node (destination can be any node type)

Data Sources

The following table lists all of the currently supported data sources. They all are automatically available in the web interface, or they can be imported from the beagle.datasource module.

DataSourceDescription
HXTriageFireEye HX triage files (.mans)
SysmonEVTXSysmon event logs
GenericVTSandboxVirustotal v3 API sandbox logs
WinEVTXWindows event logs
GenericVTSandboxAPIVirustotal v3 API sandbox logs (accepts a hash rather
than file and pulls via the api if a key is available
WindowsMemoryRaw windows memory images (Parsed using Rekall)
ProcmonCSVA procmon run file, exported to CSV
CuckooSandboxReportCuckoo Sandbox Reports
FireEyeAXReportFireEye AX Reports

Transformers

Transformers take the events provided by the above data sources and convert them into Node objects.

Each datasource has an array of supported transformer with at least one transformer defined, which can be accessed via the .transformers attribute. Choosing a transformer which is not marked by the data source as compatible will most likely lead to errors or incorrect output

TransformerDescription
FireEyeHXTransformerA transformer meant for FireEye HX Triages
SysmonTransformerA transformer for SysMon logs
GenericTransformerA generic transformer for datasources which output events that leverage the fieldnames in beagle.constants.FieldNames
WinEVTXTransformerA transformer for windows event logs
ProcmonTransformerA transformer for procmon events
FireEyeAXTransformerA transformer for FireEye AX events

Backends

Backends are where the generated data will live.

BackendDescription
NetworkXRuns on NetworkX, DiGraph object available via .G attributes
DGraphSends data to a DGraph server
Neo4JSends data to a Neo4J server
GraphistrySends data to a Graphistry graph

Using the web interface will automatically use the NetworkX backend and make JSON versions of the graphs available via the web interface.