OBLYTECH Logo
OBLYTECH Logo

Run the failed login manual playbook

A failed login manual playbook starts when unsuccessful login attempts match the conditions in your SIM configuration and a security incident is created. The playbook checks whether the affected user is active, identifies observables, enriches them, looks up threats, emails the user to confirm the attempts, and walks the analyst through the Analysis, Contain, Eradicate and Review stages.

Some of these attempts are false positives. Others are attempts by an attacker to reach a user’s email account. The playbook covers both cases. This page covers what starts the playbook, the roles it needs, each branch it can take, and the checks to make before you edit the playbook or close the incident.

What starts the failed login playbook

The playbook is triggered and associated with a security incident when three conditions are met. The category of the incident is Failed Login, the incident has one or more affected users, and the incident is not closed or canceled. When a failed login incident does not pick up the playbook, check those three conditions on the incident record first.

The SIM configuration decides which login activity creates a security incident in the first place. Review that configuration when the number of failed login incidents differs from what you expect, because the playbook can only act on incidents that exist.

Roles and prerequisites for running the playbook

Setup work and day-to-day analyst work need different roles. The playbook prerequisites list the sn_si.admin and flow_designer roles, and they require the Security Operations Spoke. Install the Security Operations Spoke (sn_sec_spoke) as a prerequisite. Assign each role to the person who performs the matching action:

  • Playbook prerequisites: sn_si.admin and flow_designer roles, with the Security Operations Spoke (sn_sec_spoke) installed.
  • Copying and editing the flows: sn_si.user and flow_designer roles, used from Flow Designer > Designer.
  • Working the incident in the SIR workspace: sn_si.admin, sn_si.manager or sn_si.analyst.

Copying and activating the playbook flows

Open Flow Designer > Designer and select the Failed Login playbook. The stock flows run as they are, so you only need to copy them when your environment requires changes. If you do make changes, copy both flows first: Failed Login Manual Playbook V1 and Failed Login – Parse User’s reply and Update Response Task V1. Edit the copies rather than the stock flows, so the original logic remains available for comparison.

Activate the main flow to use the playbook that ships with the base system. Activate each copied flow once your changes are finished. For help planning this work, see ServiceNow implementation.

Checks to make before you edit the playbook

Work through these checks before you change any step:

  • Confirm the three trigger conditions against a sample failed login incident, including its category and affected user.
  • Review the allowed list of observables, because Step 7 uses it to decide whether the playbook continues past filtering.
  • Confirm which threat lookup, enrichment, sighting search and blocking integrations are connected to your instance.
  • Record which step you are changing, so you can compare the copied flow against the stock flow when you test it.

How the first steps run without analyst input

The first steps run automatically. In Step 1, the playbook adds a worknote showing that the failed login category has been assigned. In Step 2, it moves the incident to the Analysis state. Step 3 then checks the affected user.

Checking whether the affected user is active

Step 3 checks whether the affected user is an active or inactive user. For an inactive user, the playbook adds a worknote to the incident stating that the account is inactive. The flow checks inactive users in the sn_si_incident table in ServiceNow. Treat this step as a guideline and adjust it for your environment. With an Active Directory integration, you can look up the user status there and branch on the result. Without that integration, replace this step with a manual task that has the security analyst work with the IT team to block the user, then continue the playbook from there.

Collecting and filtering observables

In Step 4 the playbook retrieves the observables attached to the security incident, and Step 5 identifies them. If no observables are found, Step 6 creates a manual response task and the flow ends there. The analyst then works the incident from that task.

When observables are found, Step 7 separates the observables that are on the allowed list from those that are not. If at least one observable is not on the allowed list, the playbook continues to enrichment. Steps 8.1 and 8.2 retrieve the observables and start an automated response task.

Enrichment, threat lookup and the malicious check

After the automated response task is created, Step 8.3 runs the Enrich Observables and Threat Lookup subflows. Step 8.4 updates the security incident record once those integrations finish. Step 8.5 creates a new response task that names the next automated task. Step 8.6 runs the Sighting Search integration on the observables, and Step 8.7 updates the incident again.

Step 8.8 checks whether the observables are malicious. The playbook relies on four kinds of capability: threat lookup, observable enrichment, sighting search and observable blocking. Examples of each are Virus Total and Hybrid Analysis for threat lookup, Whois and ReverseWhois for enrichment, Splunk and QRadar for sighting search, and CheckPoint and Palo Alto for blocking. Confirm which of these your instance uses before you rely on a branch that depends on it.

When the observables are not malicious

If the observables are not malicious and the user account is active, the playbook sends an automated email asking the user to reconfirm the unsuccessful login attempts. It then creates a manual response task for the analyst to identify the observables and add them to the security incident. The playbook ends at this stage.

When the observables are malicious

Malicious observables create three response tasks. The first is an automated email asking the user to confirm Yes or No that they made the unsuccessful login attempts. The reply sets the next branch.

  • User replies Yes: the security incident status is updated to Contain, an automated email asks the user to reset the password, and the Reset Password subflow runs. The user receives an email once that subflow completes.
  • User replies No: an automated email asks the user to reconfirm the response, and the security analyst takes the appropriate action by hand.
  • No reply: the security analyst updates the incident manually and records a response. A manual task then asks the analyst to validate whether the user account has been compromised.

The Reset Password subflow changes the password inside the ServiceNow system. If your password process runs elsewhere, replace the subflow with the step your IT team uses for resets, then continue the playbook from there.

After the branch finishes, Step 8.10.3 updates the security incident state. Step 8.10.4 checks whether the capability to create block requests for malicious IPs and URLs is implemented. If it is, the Create Block Requests subflow runs. If it is not, the incident is updated and a worknote records that the capability is unavailable.

Closing the incident through the review stage

In Step 9 the security incident state changes to Review. In Step 10 the playbook creates a response task for the post-incident review, to be completed before that task is closed. Before you complete the review, read the worknotes from Steps 1 through 8 and check that the branch the playbook took matches what the account and observables show.

For related detection content, see detection playbooks in Security Operations.

Running the playbook from the SIR analyst workspace

Analysts work the playbook from the SIR workspace, and the roles that do this are sn_si.admin, sn_si.manager or sn_si.analyst. Use this sequence for each incident:

  1. In the SIR workspace, open a security incident.
  2. Select the Playbook tab. It lists the playbooks enabled for the incident and shows the incident category and risk score.
  3. If no playbooks are listed, enable them in Process Automation Designer (PAD). For a worked example of building a manual playbook in PAD, see the manual malware playbook build steps in Process Automation Designer.
  4. Select the Failed Login Manual Playbook.
  5. Select Analysis, Contain, Eradicate and Review in turn to see the tasks the playbook performed in each stage.
  6. Change any stage activity to fit your requirements, and complete any remaining activity or user action listed in that stage.

Related setup for another login scenario is covered in the Okta user login failures playbook setup guide, and the general layout of playbooks in this area is described in the security incident response playbooks overview.

Questions about running the failed login playbook

Can an analyst leave a playbook task partway through?

Yes. Each task can be saved at any point and reopened later. The activity log on the right side of the playbook keeps the data entered for each task, so the analyst can pick up where they stopped.

How do you move between tasks and stages?

Within a stage, marking a task complete moves you to the next task. Once every task in a stage is complete, you can move to the next stage. The status in the left-hand panel updates as you go.

Where can I see which branch an incident took?

Start with the worknotes on the incident. Step 1 always adds one, Step 3 adds one when the affected user is inactive, and Step 8.10.4 adds one when the block request capability is unavailable. The response task created in Step 8.5 names the next automated task. Selecting each stage in the Playbook tab lists the tasks performed in that stage.

Does the playbook behave the same in every release?

The step numbers in this guide match the Brazil release. Check the flow steps on your own instance and release before you rely on a branch, especially if your copies of the flows differ from the stock flows.