Skip to content
Detection & ResponseMarkdown

Active response

Block an IP address, deny a host, or disable a local account on your Linux devices, for a time you choose, after which the device undoes it.

Available, with limitsAPI

When an alert shows an address hammering a server’s SSH, or a local account being used where it shouldn’t be, you stop it on the device itself. Pick the devices, pick the response, give it its address or account, and choose how long it lasts. When the time is up, the device takes the response back on its own.

What’s limited today: three responses, all on Linux devices; a response is sent when you ask, never automatically; there’s no early undo, and no record of the responses sent.

  • Who: an administrator of the realm, in a group holding RealmOwner on the realm or a realm above it (see Delegated administration). Any administrator can respond on every device of the realm. Detection & Response doesn’t yet tell RealmViewer apart from RealmOwner: a viewer can send responses too, so give RealmViewer only to people you’d trust to.
  • Where: the API.
  • First: the devices’ sensor ids, and the devices connected (active).
ResponseresponseargumentWhat the device does
Block an IP addressblockIpOne IP address, v4 or v6Drops the address’s traffic at the device’s firewall
Deny a hostdenyHostOne IP addressAdds the address to the system’s host access deny list, which the services that honor it refuse
Disable an accountdisableAccountA local username: lowercase letters, digits, _ and -, starting with a letter or _, up to 32 longLocks the local account’s password

Each lasts for one of these timeouts (timeout, in seconds): 60, 900, 3600 (the default), 14400, 43200 or 86400, that is, a minute, 15 minutes, an hour, 4 hours, 12 hours or a day. All three run on Linux devices.

The realm checks the response, its argument and its timeout before anything is sent, and sends it only to the devices your realm holds that are connected now. Each device runs it as soon as it arrives, and undoes it by itself when the timeout runs out.

Through the API (Call the API), name the devices by their sensor ids:

Terminal window
curl https://foobar.cvyuh.com/api/v0/endpoint/dar/v1/agents/respond \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
-H "Content-Type: application/json" \
-d '{"agents": ["<sensor id>", "<sensor id>"], "response": "blockIp", "argument": "203.0.113.24", "timeout": 3600}'
{ "done": ["<sensor id>"], "failed": [{ "agent": "<sensor id>", "reason": "<why>" }] }

done lists the devices it was sent to; failed lists each one it wasn’t, with the reason.

done means sent: the device received the response, not that it has finished running it. Confirm it from the effect:

  • Block an IP address: a connection from the address to the device gets no answer.
  • Deny a host: the address is refused by the device’s services that honor the deny list.
  • Disable an account: a password sign-in as the account fails.

There’s no call that reports a response’s outcome on the device.

  • Block an IP address, Deny a host: connections from the address go unanswered or are refused, for the timeout. Nothing shows on the device’s screen.
  • Disable an account: the local account can’t sign in with its password until the timeout ends. A session it already has stays open, and sign-in with an SSH key may still work. Nothing tells the user why.
AnswerWhyWhat to do
400 “the response is one of …”A response other than the threeUse blockIp, denyHost or disableAccount
400 “this response takes one IP address” or “a local username”An argument the response doesn’t takeCheck the argument column above
400 “the timeout is one of …”A timeout not in the listPick one of the six
400 “an action names 1 to 100 agents”No devices, or more than 100Send 1 to 100 sensor ids
In failed: not an agent of this realmThe id isn’t your realm’sNothing was sent to it; check the id
In failed: the device isn’t activeThe device is offlineNothing waits for it: send the response again once it’s active
LimitValue
ResponsesThree: block an IP address, deny a host, disable an account
Operating systemsLinux; on macOS a response is accepted and sent but has no effect
Timeouts60, 900, 3600 (default), 14400, 43200 or 86400 seconds
Devices per response1 to 100
Offline devicesNot queued: answered in failed
Early undoNone: the response lasts its timeout
  • Three responses, nothing else. You can’t send a device an arbitrary command, through a response or through the group configuration.
  • Extend by sending again. To keep a block past its timeout, send it again before the time runs out.
  • Prefer Block an IP address to Deny a host. Many current Linux services don’t consult the host access deny list, so a denied host may still reach them; a firewall block stops every service.
  • When you ask. Responses run when you send them; a response triggered by an alert is planned.
SymptomCauseFix
The device is in failed as not activeIt’s offlineSend again once it’s active
done, but the address still connectsThe device isn’t Linux; or, for Deny a host, the service doesn’t honor the deny listUse Block an IP address on a Linux device
done, but the user still signs inThe user signs in with an SSH key, or already had a sessionAlso block their address, or revoke the device
You need to lift a block earlyThere’s no early undoWait for the timeout; next time start short

None yet. Responses aren’t recorded in the realm’s audit trail, and there’s no list of responses sent. Keep your own note of each response: who, which devices, what and for how long.