Skip to content

Telemetry Refactor #1268

@mssalvatore

Description

@mssalvatore

Telemetry objects have too many responsibilities. They are responsible for:

  1. Storing/representing telemetry data
  2. Serializing telemetry data
  3. Sending telemetry data to the island
  4. Formatting telemetry data for logging

Telemetry should be responsible for storing/representing telemetry. The other responsibilities should be handled by other components. For example, the ITelemetryMessenger interface was created so that the ransomware payload could function without knowledge of the specific mechanism by which telemetry is sent. Specifically, if we want to send ransomware payloads in batches, we can pass a BatchingTelemetryMessenger to the ransomware payload.

In order to make telemetries batchable, it was necessary to extend the ITelem interface (1, 2), and then do things like this.

The send() method should be removed from ITelem and its implementation should be removed from BaseTelem. A new ITelemetryMessenger should be added that handles the mechanism that sends telemetry. Ideally, multiple telemetries could be sent in the same JSON body in order to minimize network traffic. This requires changes to Monkey Island to allow it to accept multiple telemetries in the same JSON body, but would allow us to remove the IBatchableTelemetry interface, as this would effectively make all telemetries "batchable".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions