Database Models

../_images/database-design.png

Target Model

class pipeline.models.target_model.Target(**kwargs)

Database model that describes a target; This is the model that functions as the “top” model.

Relationships:

ip_addresses: one to many -> pipeline.models.ip_address_model.IPAddress

open_ports: many to many -> pipeline.models.port_model.Port

nmap_results: one to many -> pipeline.models.nmap_model.NmapResult

searchsploit_results: one to many -> pipeline.models.searchsploit_model.SearchsploitResult

endpoints: one to many -> pipeline.models.endpoint_model.Endpoint

technologies: many to many -> pipeline.models.technology_model.Technology

screenshots: one to many -> pipeline.models.screenshot_model.Screenshot

Endpoint Model

class pipeline.models.endpoint_model.Endpoint(**kwargs)

Database model that describes a URL/endpoint.

Represents gobuster data.

Relationships:

target: many to one -> pipeline.models.target_model.Target

headers: many to many -> pipeline.models.header_model.Header

Header Model

class pipeline.models.header_model.Header(**kwargs)

Database model that describes an http header (i.e. Server=cloudflare).

Relationships:
endpoints: many to many -> pipeline.models.target_model.Endpoint

IP Address Model

class pipeline.models.ip_address_model.IPAddress(**kwargs)

Database model that describes an ip address (ipv4 or ipv6).

Represents amass data or targets specified manually as part of the target-file.

Relationships:
target: many to one -> pipeline.models.target_model.Target

Nmap Model

class pipeline.models.nmap_model.NmapResult(**kwargs)

Database model that describes the TARGET.nmap scan results.

Represents nmap data.

Relationships:

target: many to one -> pipeline.models.target_model.Target

ip_address: one to one -> pipeline.models.ip_address_model.IPAddress

port: one to one -> pipeline.models.port_model.Port

nse_results: one to many -> pipeline.models.nse_model.NSEResult

Nmap Scripting Engine Model

class pipeline.models.nse_model.NSEResult(**kwargs)

Database model that describes the NSE script executions as part of an nmap scan.

Represents NSE script data.

Relationships:
NmapResult: many to many -> pipeline.models.nmap_model.NmapResult

Port Model

class pipeline.models.port_model.Port(**kwargs)

Database model that describes a port (tcp or udp).

Relationships:
targets: many to many -> pipeline.models.target_model.Target

Screenshot Model

class pipeline.models.screenshot_model.Screenshot(**kwargs)

Database model that describes a screenshot of a given webpage hosted on a Target.

Represents aquatone data.

Relationships:

port: one to one -> pipeline.models.port_model.Port

target: many to one -> pipeline.models.target_model.Target

endpoint: one to one -> pipeline.models.endpoint_model.Endpoint

similar_pages: black magic -> pipeline.models.screenshot_model.Screenshot

Searchsploit Model

class pipeline.models.searchsploit_model.SearchsploitResult(**kwargs)

Database model that describes results from running searchsploit –nmap TARGET.xml.

Represents searchsploit data.

Relationships:
target: many to one -> pipeline.models.target_model.Target

Technology Model

class pipeline.models.technology_model.Technology(**kwargs)

Database model that describes a web technology (i.e. Nginx 1.14).

Represents webanalyze data.

Relationships:
targets: many to many -> pipeline.models.target_model.Target