Skip to content

Implement new Agent setup() #1595

@mssalvatore

Description

@mssalvatore

Implement new setup and teardown functions for the agent.

The setup function should:

  1. Exit if any other agents are currently running on the same host
  2. Establish a connection with the Monkey Island
  3. Check if the agent has been marked for shutdown
  4. Report appropriate telemetry if the agent is running on the Island
  5. Upgrade from 32 -> 64bit agent if required (be careful not to recreate Mongo error in /api/telemetry #1059)
  6. Configure the host's firewall
  7. Start a tunnel
  8. Construct a Puppet and Master
  9. Register signal handlers (NOP for now, implemented in Implement signal handlers #1594)
  10. Start the master

The teardown function should:

  1. Stop the tunnel
  2. Restore original firewall rules
  3. Clean up the master

Tasks

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