Privilege Escalate
Bases: Action
A Red action that attempts to conduct privilege escalation on a host that the agent has a user shell on, to gain a shell with root privileges.
Attributes:
Name | Type | Description |
---|---|---|
hostname |
str
|
The name of the target host. |
session |
int
|
The source session id. |
agent |
str
|
The name of the red agent executing the action. |
escalate_action_selector |
EscalateActionSelector
|
A selector that chooses an applicable escalate action for the target host, as well as required processes. |
Functions
__init__
Parameters:
Name | Type | Description | Default |
---|---|---|---|
hostname |
str
|
The name of the target host. |
required |
session |
int
|
The source session id. |
required |
agent |
str
|
The name of the red agent executing the action. |
required |
__perform_escalate
Chooses a random session the agent has on the target host, and (if it is not in a sandbox) chooses and executes a privilege escalation action on that session.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The state of the simulated network at the current step. |
required |
sessions |
List[Session]
|
A list of the sessions the red agent has on the target host. |
required |
Returns:
Type | Description |
---|---|
Observation
|
An observation containing an indication of the action's successful execution as True/False. |
int
|
The target session's ident on the target host. This is -1 for an unsuccessful execution. |
execute
Attempts to privilege escalate a user shell on the target host to gain a root privileged shell.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
state |
State
|
The state of the simulated network at the current step. |
required |
Returns:
Name | Type | Description |
---|---|---|
obs |
Observation
|
An observation containing an indication of the action's successful execution as True/False. |