Lawliet LAWLIET
Book a demo

36. Active defense and containment

This guide describes Lawliet 1.5.13.s (the current release). Screens, commands and procedures may change in later versions; the usage guide is updated with each release. Check the version your server runs under Settings > Platform or with ./lawliet version, and see the Releases page for what changed.

Active defense is operator-initiated containment: isolate a host, kill a process, block an address, quarantine a file, disable an account, force a password reset - and undo the reversible ones. "Nothing here runs on a schedule - every action is dispatched by a person and recorded." (The two exceptions are both explicit opt-ins: a playbook's containment step, which still needs a second signature, and a honeypot with auto-contain.)

Actions are sent to the agent as signed commands. The console says dispatched when the command is queued and shows the real outcome only when the agent reports it on its next check-in. A host without an active agent refuses delivery.

Active defense is a licensed module. If the licence no longer includes it, the Defense page shows Still in place on hosts - "Actions taken before this licence. Each can still be undone."

Permissions:

TaskPermissionFour-eyes
See the page, the catalog and the historyView active defence-
Dispatch an action, undo an action, run a commandExecute containmentyes - "Run a containment action"

36.1 What the Defense page shows#

Path: Defense. The page title is Active defense.


36.2 The actions#

ActionLinuxmacOSWindowsUndo
Isolate hostiptables default DROPpf block allWindows Firewall block inbound and outboundRelease isolation
Block addressiptables DROP rulepf anchor ruleWindows Firewall rule, both directionsUnblock address
Kill processSIGKILLSIGKILLTerminateProcess- (cannot be undone)
Quarantine filemove + chmod 400move + chmod 400move + ACL to SYSTEM/AdministratorsRestore file
Disable accountlock and expire the accountdisable the usernet user /active:noEnable account
Reset credentialsexpire the passwordrequire a new passwordrequire a password change at next logon-

Isolate host keeps the agent's route to the Lawliet server open, so the host stays visible and can be released from the console. Everything else is cut off - including users' remote sessions and the applications the host serves.

An action an agent cannot perform fails loudly with "defence action not implemented on this agent: <action>". It is never reported as done.


36.3 Procedure: dispatch a containment action#

Permission: Execute containment. Four-eyes: yes.

Risk: containment interrupts users and services on the host (isolation cuts all traffic except to Lawliet; disabling an account logs a person out; killing a process loses its work). Rollback: the Undo button in Dispatched actions for isolate, block, disable and quarantine. Kill and reset cannot be undone.

  1. Open Defense and click the action in Remediation actions.
  2. Choose the Target host in Select a host....
  3. Fill the parameters the action needs (for example the IP address, the process name, the file path, the account). "Still needed: ..." lists what is missing.
  4. Optional: Incident reference (optional), for example dlp-142. "Ties the action to the finding that prompted it."
  5. Press Dispatch action.
  6. Four-eyes: type the reason and Send for approval. The approver signs in Approvals; you press Execute now (20.4).

What you see: the action in Dispatched actions with status dispatched, then completed or failed when the agent reports.

If it fails:

What you seeCauseFix
Status stays dispatchedAgent offlineCheck the host; the command is delivered when it returns
Failed, "not implemented on this agent"The agent version lacks the actionUpgrade the agent (chapter 10)
Failed with a signature errorAgent and server keys disagreeSee Agent security
Refused for a loopback or reserved addressBlocking it would cut the host off from itselfBlock the real source address

The same actions can be taken from a forensic case (Response tab, chapter 34), by playbooks (chapter 37), and - isolation only - with Isolate this host on a tamper or silence item in the review queue (chapter 21). Dispatched actions are kept as the record; they are undone, never deleted.


36.4 Procedure: undo an action#

Permission: Execute containment. Four-eyes: yes.

  1. In Dispatched actions, find the row and press Undo (<undo action>), for example Undo (release isolation).
  2. Confirm "<undo action> on <host>?".
  3. Complete the four-eyes request.

What you see: "<undo action> queued for <host>." The original row shows undone once the agent has reported.


36.5 Run a command (operator live response)#

Run a command sends exactly what you type to one host, run as the agent's user. "Unlike the actions above there is no stated blast radius and nothing to roll back." It is signed, timed out, and written to the audit trail with your name and your reason.

It is off by default. With it off the server refuses the request and the agents refuse the command type. To turn it on, an administrator sets DEFENSE_ALLOW_CUSTOM_COMMANDS=true in .env and runs sudo ./lawliet start (a restart does not re-read .env; see the CLI reference). Leave it off unless your incident-response procedure needs it.

Permission: Execute containment. Four-eyes: yes.

Risk: arbitrary code execution with the agent's privileges. Rollback: none.

  1. In Run a command, choose the Host and the Interpreter (sh, bash, powershell, cmd).
  2. Type the Command or script, for example systemctl status sshd.
  3. Type the Reason ("recorded in the audit trail").
  4. Press Review and run, read "Run this on <host>?", and press Yes, run it via <interpreter>.
  5. Complete the four-eyes request.

What you see: "Command dispatched." The host runs it on its next check-in, within a time limit (120 seconds by default). The audit trail holds the command text, your name and your reason.