Skip to content

Remove

Bases: Action

Removes any Red User session from the target host. Represents killing red's shell using 'kill' or 'Taskkill'. Will not remove privileged sessions such as 'root' or 'SYSTEM' shells. That's because we assume (not realistically) that these shells also have a persistance mechanism.

Attributes:

Name Type Description
session int

the session id of the session

agent str

the name of the agent executing the action

hostname str

the hostname of the host targeted by the action.

Functions

__init__

__init__(session: int, agent: str, hostname: str)

Instantiates the Remove class.

Parameters:

Name Type Description Default
session int

the session id of the session

required
agent str

the name of the agent executing the action

required
hostname str

the hostname of the host targeted by the action.

required

execute

execute(state: State) -> Observation

Executes the action.

Parameters:

Name Type Description Default
state State

The current CybORG state.

required

Returns:

Name Type Description
obs Observation

The observation to be returned to the agent.