Get started with Detection & Response
Raise an alert on one of your enrolled Linux devices, find it in your realm's security log, and block the address behind it on the device for an hour.
AvailableAPI
In this guide you see an alert from one of your devices and act on it. A burst of failed SSH sign-ins against
maya-laptop raises alerts in your realm’s security log; you find them, read where they came from, and block that
address on the laptop for an hour, all from the realm. It takes about fifteen minutes.
Before you begin
Section titled “Before you begin”- An enrolled device running Linux with an SSH server, here
maya-laptop. If you have none yet, Get started with Endpoint Management enrolls one. Its security sensor reports to the realm from the moment it enrolls. - A realm administrator’s session in
$CVYUH_SESSION: a user in a group holdingRealmOwneron the realm. Call the API shows how to get one. - Another machine that can reach the device over SSH, to make the failed sign-ins.
See an alert and act on it
Section titled “See an alert and act on it”-
Find the device’s sensor id. Calls about a device’s security name it by its sensor’s id. Ask the sensors list for the laptop:
Terminal window curl https://foobar.cvyuh.com/api/v0/endpoint/dar/v1/agents \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{"page": 1, "pageSize": 20, "qbe": {"filter": {"field": "name", "op": "=", "value": "maya-laptop"}}}'Its
idis the sensor id, and itsstatusshould beactive. -
Raise an alert. From the other machine, try to sign in to the laptop over SSH a few times as a user that doesn’t exist, and give up at each password prompt:
Terminal window ssh no-such-user@<device address>The laptop’s authentication log records each attempt, the sensor sends the lines to your realm, and the realm’s ruleset raises an alert for each.
-
See the alerts. Ask for the laptop’s alerts over the last hour, newest first:
Terminal window curl "https://foobar.cvyuh.com/api/v0/endpoint/dar/v1/events?agent=<sensor id>&from=<RFC 3339 time>&to=<RFC 3339 time>" \-H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \-H "Content-Type: application/json" \-d '{"page": 1, "pageSize": 20}'Each alert names the device, the rule that raised it, its level, and the ATT&CK techniques it’s evidence of. The address the attempts came from is in
data.srcip:{"data": [{"id": "<alert id>","time": "<RFC 3339 time>","agent": { "id": "<sensor id>", "name": "maya-laptop" },"rule": {"id": "<rule id>","level": 5,"description": "<a failed SSH sign-in for a user that doesn't exist>","mitre": { "ids": ["T1110.001"], "tactics": ["Credential Access"] }},"data": { "srcip": "203.0.113.24", "srcuser": "no-such-user" }}],"totalPages": 1,"totalCount": 4} -
Block the address on the laptop for an hour. Send an active response to the laptop’s sensor:
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>"], "response": "blockIp", "argument": "203.0.113.24", "timeout": 3600}'The answer lists the sensors the response was sent to under
done, and any it wasn’t underfailed, with why. The laptop drops the address’s traffic at its firewall, and lifts the block itself after an hour.
Check it worked
Section titled “Check it worked”Try SSH from the other machine again: the connection gets no answer. Asking for the laptop’s alerts again with the range moved past the moment you responded shows no new failed sign-ins from that address.