mage.api_resources.ttp module

class mage.api_resources.ttp.TTP

Bases: mage.api_resources.abstract.listable_api_resource.ListableAPIResource, mage.api_resources.abstract.mutable_api_resource.MutableAPIResource

id

Unique TTP ID

Type

str

created_at

When the TTP was created (e.g., ‘2020-01-02T03:04:56.789Z’)

Type

str

updated_at

When the TTP was last updated (e.g., ‘2020-01-02T03:04:56.789Z’)

Type

str

assessment_run_id

ID of the associated assessment run

Type

str

asset_id

ID of the associated asset

Type

str

executed_on

Time this TTP was executed

Type

mage.schema.AWSDateTime

technique

Type of technique

Type

str

url

Technique URL

Type

str

evidence

Evidence supporting the technique

Type

str

files

Associated files

Type

list of mage.schema.S3Object

Associated files

Type

list of str

property assessment_run

Associated assessment run.

Returns

AssessmentRun

property asset

The associated asset.

Returns

Asset

classmethod create(technique, assessment_run_id, asset_id, **params)

Creates a TTP for an assessment run.

Parameters
  • technique (str) –

  • description (str) –

  • assessment_run_id (str) –

  • asset_id (str) –

  • **kwargs – Additional arguments to initialize the TTP with

Returns

TTP

Example

>>> import mage
>>> mage.connect()
>>> mage.TTP.create('Port scan', '11111111-1111-1111-1111-111111111111', '22222222-2222-2222-2222-222222222222')
>>> mage.TTP.create('Port scan', '11111111-1111-1111-1111-111111111111', '22222222-2222-2222-2222-222222222222', evidence="Scanned all the ports")