|
| 1 | +[[security-response-actions]] |
| 2 | += Endpoint response actions |
| 3 | + |
| 4 | +// :description: Perform response actions on endpoints using a terminal-like interface. |
| 5 | +// :keywords: serverless, security, defend, reference, manage |
| 6 | + |
| 7 | + |
| 8 | +The response console allows you to perform response actions on an endpoint using a terminal-like interface. You can enter action commands and get near-instant feedback on them. Actions are also recorded in the endpoint's <<actions-log,response actions history>> for reference. |
| 9 | + |
| 10 | +Response actions are supported on all endpoint platforms (Linux, macOS, and Windows). |
| 11 | + |
| 12 | +.Requirements |
| 13 | +[NOTE] |
| 14 | +==== |
| 15 | +* Response actions and the response console UI require the Endpoint Protection Complete <<elasticsearch-manage-project,project feature>>. |
| 16 | +* Endpoints must have {agent} version 8.4 or higher installed with the {elastic-defend} integration to receive response actions. |
| 17 | +* Some response actions require either a <<general-assign-user-roles,predefined Security user role>> or a <<custom-roles,custom role>> with a specific feature privilege, indicated below. These are required to perform actions both in the response console and in other areas of the {security-app} (such as isolating a host from a detection alert). |
| 18 | +* Users must have the appropriate user role privileges for at least one response action to access the response console. |
| 19 | +==== |
| 20 | + |
| 21 | +[role="screenshot"] |
| 22 | +image::images/response-actions/-management-admin-response-console.png[Response console UI] |
| 23 | + |
| 24 | +Launch the response console from any of the following places in {elastic-sec}: |
| 25 | + |
| 26 | +* **Endpoints** page → **Actions** menu (image:images/icons/boxesHorizontal.svg[Actions menu icon]) → **Respond** |
| 27 | +* Endpoint details flyout → **Take action** → **Respond** |
| 28 | +* Alert details flyout → **Take action** → **Respond** |
| 29 | +* Host details page → **Respond** |
| 30 | + |
| 31 | +To perform an action on the endpoint, enter a <<response-action-commands,response action command>> in the input area at the bottom of the console, then press **Return**. Output from the action is displayed in the console. |
| 32 | + |
| 33 | +If a host is unavailable, pending actions will execute once the host comes online. Pending actions expire after two weeks and can be tracked in the response actions history. |
| 34 | + |
| 35 | +[NOTE] |
| 36 | +==== |
| 37 | +Some response actions may take a few seconds to complete. Once you enter a command, you can immediately enter another command while the previous action is running. |
| 38 | +==== |
| 39 | + |
| 40 | +Activity in the response console is persistent, so you can navigate away from the page and any pending actions you've submitted will continue to run. To confirm that an action completed, return to the response console to view the console output or check the <<actions-log,response actions history>>. |
| 41 | + |
| 42 | +[IMPORTANT] |
| 43 | +==== |
| 44 | +Once you submit a response action, you can't cancel it, even if the action is pending for an offline host. |
| 45 | +==== |
| 46 | + |
| 47 | +[discrete] |
| 48 | +[[response-action-commands]] |
| 49 | +== Response action commands |
| 50 | + |
| 51 | +The following response action commands are available in the response console. |
| 52 | + |
| 53 | +[discrete] |
| 54 | +[[security-response-actions-isolate]] |
| 55 | +=== `isolate` |
| 56 | + |
| 57 | +<<security-isolate-host,Isolate the host>>, blocking communication with other hosts on the network. |
| 58 | + |
| 59 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 60 | + |
| 61 | +Custom role privilege: **Host isolation** |
| 62 | + |
| 63 | +Example: `isolate --comment "Isolate host related to detection alerts"` |
| 64 | + |
| 65 | +[discrete] |
| 66 | +[[security-response-actions-release]] |
| 67 | +=== `release` |
| 68 | + |
| 69 | +Release an isolated host, allowing it to communicate with the network again. |
| 70 | + |
| 71 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 72 | + |
| 73 | +Custom role privilege: **Host isolation** |
| 74 | + |
| 75 | +Example: `release --comment "Release host, everything looks OK"` |
| 76 | + |
| 77 | +[discrete] |
| 78 | +[[security-response-actions-status]] |
| 79 | +=== `status` |
| 80 | + |
| 81 | +Show information about the host's status, including: {agent} status and version, the {elastic-defend} integration's policy status, and when the host was last active. |
| 82 | + |
| 83 | +[discrete] |
| 84 | +[[processes]] |
| 85 | +=== `processes` |
| 86 | + |
| 87 | +Show a list of all processes running on the host. This action may take a minute or so to complete. |
| 88 | + |
| 89 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 90 | + |
| 91 | +Custom role privilege: **Process Operations** |
| 92 | + |
| 93 | +[TIP] |
| 94 | +==== |
| 95 | +Use this command to get current PID or entity ID values, which are required for other response actions such as `kill-process` and `suspend-process`. |
| 96 | +
|
| 97 | +Entity IDs may be more reliable than PIDs, because entity IDs are unique values on the host, while PID values can be reused by the operating system. |
| 98 | +==== |
| 99 | + |
| 100 | +[NOTE] |
| 101 | +==== |
| 102 | +Running this command on third-party-protected hosts might return the process list in a different format. Refer to <<security-third-party-actions>> for more information. |
| 103 | +==== |
| 104 | + |
| 105 | +[discrete] |
| 106 | +[[kill-process]] |
| 107 | +=== `kill-process` |
| 108 | + |
| 109 | +Terminate a process. You must include one of the following parameters to identify the process to terminate: |
| 110 | + |
| 111 | +* `--pid` : A process ID (PID) representing the process to terminate. |
| 112 | +* `--entityId` : An entity ID representing the process to terminate. |
| 113 | + |
| 114 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 115 | + |
| 116 | +Custom role privilege: **Process Operations** |
| 117 | + |
| 118 | +Example: `kill-process --pid 123 --comment "Terminate suspicious process"` |
| 119 | + |
| 120 | +[NOTE] |
| 121 | +==== |
| 122 | +For SentinelOne-enrolled hosts, you must use the parameter `--processName` to identify the process to terminate. `--pid` and `--entityId` are not supported. |
| 123 | +
|
| 124 | +Example: `kill-process --processName cat --comment "Terminate suspicious process"` |
| 125 | +==== |
| 126 | + |
| 127 | +[discrete] |
| 128 | +[[security-response-actions-suspend-process]] |
| 129 | +=== `suspend-process` |
| 130 | + |
| 131 | +Suspend a process. You must include one of the following parameters to identify the process to suspend: |
| 132 | + |
| 133 | +* `--pid` : A process ID (PID) representing the process to suspend. |
| 134 | +* `--entityId` : An entity ID representing the process to suspend. |
| 135 | + |
| 136 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 137 | + |
| 138 | +Custom role privilege: **Process Operations** |
| 139 | + |
| 140 | +Example: `suspend-process --pid 123 --comment "Suspend suspicious process"` |
| 141 | + |
| 142 | +[discrete] |
| 143 | +[[get-file]] |
| 144 | +=== `get-file` |
| 145 | + |
| 146 | +Retrieve a file from a host. Files are downloaded in a password-protected `.zip` archive to prevent the file from running. Use password `elastic` to open the `.zip` in a safe environment. |
| 147 | + |
| 148 | +[NOTE] |
| 149 | +==== |
| 150 | +Files retrieved from third-party-protected hosts require a different password. Refer to <<security-third-party-actions>> for your system's password. |
| 151 | +==== |
| 152 | + |
| 153 | +You must include the following parameter to specify the file's location on the host: |
| 154 | + |
| 155 | +* `--path` : The file's full path (including the file name). |
| 156 | + |
| 157 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 158 | + |
| 159 | +Custom role privilege: **File Operations** |
| 160 | + |
| 161 | +Example: `get-file --path "/full/path/to/file.txt" --comment "Possible malware"` |
| 162 | + |
| 163 | +[TIP] |
| 164 | +==== |
| 165 | +You can use the <<security-query-operating-systems,Osquery manager integration>> to query a host's operating system and gain insight into its files and directories, then use `get-file` to retrieve specific files. |
| 166 | +==== |
| 167 | + |
| 168 | +[NOTE] |
| 169 | +==== |
| 170 | +When {elastic-defend} prevents file activity due to <<malware-protection,malware prevention>>, the file is quarantined on the host and a malware prevention alert is created. To retrieve this file with `get-file`, copy the path from the alert's **Quarantined file path** field (`file.Ext.quarantine_path`), which appears under **Highlighted fields** in the alert details flyout. Then paste the value into the `--path` parameter. |
| 171 | +==== |
| 172 | + |
| 173 | +[discrete] |
| 174 | +[[security-response-actions-execute]] |
| 175 | +=== `execute` |
| 176 | + |
| 177 | +Run a shell command on the host. The command's output and any errors appear in the response console, up to 2000 characters. The complete output (stdout and stderr) are also saved to a downloadable `.zip` archive (password: `elastic`). Use these parameters: |
| 178 | + |
| 179 | +* `--command` : (Required) A shell command to run on the host. The command must be supported by `bash` for Linux and macOS hosts, and `cmd.exe` for Windows. |
| 180 | ++ |
| 181 | +[NOTE] |
| 182 | +==== |
| 183 | +* Multiple consecutive dashes in the value must be escaped; single dashes do not need to be escaped. For example, to represent a directory named `/opt/directory--name`, use the following: `/opt/directory--name`. |
| 184 | +* You can use quotation marks without escaping. For example: |
| 185 | +`execute --command "cd "C:\Program Files\directory""` |
| 186 | +==== |
| 187 | +* `--timeout` : (Optional) How long the host should wait for the command to complete. Use `h` for hours, `m` for minutes, `s` for seconds (for example, `2s` is two seconds). If no timeout is specified, it defaults to four hours. |
| 188 | + |
| 189 | +Predefined role: **SOC manager** or **Endpoint operations analyst** |
| 190 | + |
| 191 | +Custom role privilege: **Execute Operations** |
| 192 | + |
| 193 | +Example: `execute --command "ls -al" --timeout 2s --comment "Get list of all files"` |
| 194 | + |
| 195 | +[WARNING] |
| 196 | +==== |
| 197 | +This response action runs commands on the host using the same user account running the {elastic-defend} integration, which normally has full control over the system. Be careful with any commands that could cause irrevocable changes. |
| 198 | +==== |
| 199 | + |
| 200 | +[discrete] |
| 201 | +[[security-response-actions-upload]] |
| 202 | +=== `upload` |
| 203 | + |
| 204 | +Upload a file to the host. The file is saved to the location on the host where {elastic-endpoint} is installed. After you run the command, the full path is returned in the console for reference. Use these parameters: |
| 205 | + |
| 206 | +* `--file` : (Required) The file to send to the host. As soon as you type this parameter, a popup appears — select it to navigate to the file, or drag and drop the file onto the popup. |
| 207 | +* `--overwrite` : (Optional) Overwrite the file on the host if it already exists. |
| 208 | + |
| 209 | +Predefined role: **Tier 3 analyst**, **SOC manager**, or **Endpoint operations analyst** |
| 210 | + |
| 211 | +Custom role privilege: **File Operations** |
| 212 | + |
| 213 | +Example: `upload --file --comment "Upload remediation script"` |
| 214 | + |
| 215 | +[TIP] |
| 216 | +==== |
| 217 | +You can follow this with the `execute` response action to upload and run scripts for mitigation or other purposes. |
| 218 | +==== |
| 219 | + |
| 220 | +[NOTE] |
| 221 | +==== |
| 222 | +The default file size maximum is 25 MB, configurable in `kibana.yml` with the `xpack.securitySolution.maxUploadResponseActionFileBytes` setting. You must enter the value in bytes (the maximum is `104857600` bytes, or 100 MB). |
| 223 | +==== |
| 224 | + |
| 225 | +[discrete] |
| 226 | +[[security-response-actions-scan]] |
| 227 | +=== `scan` |
| 228 | + |
| 229 | +Scan a specific file or directory on the host for malware. This uses the <<malware-protection,malware protection settings>> (such as **Detect** or **Prevent** options, or enabling the blocklist) as configured in the host's associated {elastic-defend} integration policy. Use these parameters: |
| 230 | + |
| 231 | +* `--path` : (Required) The absolute path to a file or directory to be scanned. |
| 232 | + |
| 233 | +Predefined role: **Tier 3 Analyst**, **SOC Manager**, or **Endpoint Operations Analyst** |
| 234 | + |
| 235 | +Custom role privilege: **Scan Operations** |
| 236 | + |
| 237 | +Example: `scan --path "/Users/username/Downloads" --comment "Scan Downloads folder for malware"` |
| 238 | + |
| 239 | +[NOTE] |
| 240 | +==== |
| 241 | +Scanning can take longer for directories containing a lot of files. |
| 242 | +==== |
| 243 | + |
| 244 | +[discrete] |
| 245 | +[[runscript]] |
| 246 | +=== `runscript` |
| 247 | + |
| 248 | +NOTE: This response action is supported only for <<security-third-party-actions-supported-systems-and-response-actions, CrowdStrike-enrolled hosts>>. |
| 249 | + |
| 250 | +Run a script on a host. You must include one of the following parameters to identify the script you want to run: |
| 251 | + |
| 252 | +* `--Raw`: The full script content provided directly as a string. |
| 253 | +* `--CloudFile`: The name of the script stored in a cloud storage location. |
| 254 | +* `--HostPath`: The absolute or relative file path of the script located on the host machine. |
| 255 | + |
| 256 | +You can also use these optional parameters: |
| 257 | + |
| 258 | +* `--CommandLine`: Additional command-line arguments passed to the script to customize its execution. |
| 259 | +* `--Timeout`: The maximum duration, in seconds, that the script can run before it's forcibly stopped. If no timeout is specified, it defaults to 60 seconds. |
| 260 | + |
| 261 | +Predefined role: **SOC manager** or **Endpoint operations analyst** |
| 262 | + |
| 263 | +Custom role privilege: **Execute Operations** |
| 264 | + |
| 265 | +Examples: |
| 266 | + |
| 267 | +`runscript --CloudFile="CloudScript1.ps1" --CommandLine="-Verbose true" --Timeout=180` |
| 268 | + |
| 269 | +`runscript --Raw=```Get-ChildItem.```` |
| 270 | + |
| 271 | +`runscript --HostPath="C:\temp\LocalScript.ps1" --CommandLine="-Verbose true"` |
| 272 | + |
| 273 | +[discrete] |
| 274 | +[[supporting-commands-parameters]] |
| 275 | +== Supporting commands and parameters |
| 276 | + |
| 277 | +[discrete] |
| 278 | +[[security-response-actions-comment]] |
| 279 | +=== `--comment` |
| 280 | + |
| 281 | +Add to a command to include a comment explaining or describing the action. Comments are included in the response actions history. |
| 282 | + |
| 283 | +[discrete] |
| 284 | +[[security-response-actions-help]] |
| 285 | +=== `--help` |
| 286 | + |
| 287 | +Add to a command to get help for that command. |
| 288 | + |
| 289 | +Example: `isolate --help` |
| 290 | + |
| 291 | +[discrete] |
| 292 | +[[security-response-actions-clear]] |
| 293 | +=== `clear` |
| 294 | + |
| 295 | +Clear all output from the response console. |
| 296 | + |
| 297 | +[discrete] |
| 298 | +[[security-response-actions-help-1]] |
| 299 | +=== `help` |
| 300 | + |
| 301 | +List supported commands in the console output area. |
| 302 | + |
| 303 | +[TIP] |
| 304 | +==== |
| 305 | +You can also get a list of commands in the <<help-panel,Help panel>>, which stays on the screen independently of the output area. |
| 306 | +==== |
| 307 | + |
| 308 | +[discrete] |
| 309 | +[[help-panel]] |
| 310 | +== Help panel |
| 311 | + |
| 312 | +Click image:images/icons/help.svg[Help] **Help** in the upper-right to open the **Help** panel, which lists available response action commands and parameters as a reference. |
| 313 | + |
| 314 | +[NOTE] |
| 315 | +==== |
| 316 | +This panel displays only the response actions that you have the user role privileges to perform. |
| 317 | +==== |
| 318 | + |
| 319 | +[role="screenshot"] |
| 320 | +image::images/response-actions/-management-admin-response-console-help-panel.png[Help panel] |
| 321 | + |
| 322 | +You can use this panel to build commands with less typing. Click the add icon (image:images/icons/plusInCircle.svg[Add]) to add a command to the input area, enter any additional parameters or a comment, then press **Return** to run the command. |
| 323 | + |
| 324 | +If the endpoint is running an older version of {agent}, some response actions may not be supported, as indicated by an informational icon and tooltip. {fleet-guide}/upgrade-elastic-agent.html[Upgrade {agent}] on the endpoint to be able to use the latest response actions. |
| 325 | + |
| 326 | +[role="screenshot"] |
| 327 | +image::images/response-actions/-management-admin-response-console-unsupported-command.png[Unsupported response action with tooltip] |
| 328 | + |
| 329 | +[discrete] |
| 330 | +[[actions-log]] |
| 331 | +== Response actions history |
| 332 | + |
| 333 | +Click **Response actions history** to display a log of the response actions performed on the endpoint, such as isolating a host or terminating a process. You can filter the information displayed in this view. Refer to <<security-response-actions-history,Response actions history>> for more details. |
| 334 | + |
| 335 | +[role="screenshot"] |
| 336 | +image::images/response-actions/-management-admin-response-actions-history-console.png[Response actions history with a few past actions] |
0 commit comments