UBA Configuration Example
This example configures detection of a user signing in to a host that is not in their profile. Use the values as a template, replacing asset, index, and field names with those in your environment.
A working scenario consists of an object category, a profiling policy with a reaction, and an anomaly detection rule. Score calculation uses global values immediately after the module is initialized.
Source Data
| Source | Fields | Requirement |
|---|---|---|
Inventory asset Employees | login - base field, full_name, department, status | asset data is stored in PostgreSQL |
Index auth-events-* | @timestamp, user.name, host.name, event.action | user sign-in events |
The user.name value in events must match the asset object's base login field, for example AkimovML in both sources. For details, see End-to-End Object Identifier.
1. Object Category
Create a category under Main Menu - User Behavior Analytics - Objects, on the Categories tab.
| Parameter | Value |
|---|---|
| Name | Users |
| Asset | Employees |
| Filters | status = active |
Before saving, check the preview: it must contain only active employees. In License Impact, make sure the category does not exceed the license limit.
For details, see Object Categories.
2. Profiling Policy
Create a policy under Main Menu - User Behavior Analytics - Policies.
Policy Settings
| Parameter | Value |
|---|---|
| Policy Name | Users: sign-in hosts |
| Object Category | Users |
| Indices | auth-events-* |
| Object Identification Fields | user.name |
| Ignore Case | enabled |
| Time Interval | last 30 days |
| Time Field | @timestamp |
| Run Schedule | Interval, every 24 hours |
Dictionary Algorithm
On the Profiling tab, add a Dictionary algorithm:
| Parameter | Value |
|---|---|
| Name | Sign-in hosts |
| Filters | event.action = logged-in |
| Result Field | host_name ← host.name |
| Accumulate Dictionary | disabled, so the profile is rebuilt for the last 30 days |
The result index and lookup name are suggested automatically.
Save the policy and run it manually. After a successful run, the Sign-in hosts algorithm with the user's hosts should appear on the Profile tab of the object card.
Before the first successful run, the profile is empty: a reaction to a New Combination will treat every sign-in as new. Enable the reaction after the policy has run.
3. Profile Reaction
On the policy's Reactions tab, click Add Reaction and select the Sign-in hosts algorithm.
| Section | Parameter | Value |
|---|---|---|
| Sources and Fields | Event Source | auth-events-* |
| Sources and Fields | Filters | event.action = logged-in |
| Condition | Trigger Condition | New Combination |
| Condition | Fields to Compare | host_name |
| Classification | Severity | Medium |
| Classification | Rule Family | Cybersecurity Index |
| Classification | Lifetime | 24 hours |
| Alert Card | Violation Text | {{_source.user.name}}: sign-in to {{_source.host.name}} - this host is not in the user's profile |
| Run | Schedule and Window | default: every 15 minutes, checking the last 15 minutes |
Click Check, then Save. The rule appears in Job Scheduler and starts working immediately.
If the required family does not exist, add it to the Rule Families lookup. For more on the settings, see Reactions.
The reaction rule compares values case-sensitively even if Ignore Case is enabled in the policy. The host.name values in events and in the profile must use the same case.
4. Score Calculation
You do not need to enable score calculation separately: scores are calculated for objects in all categories using global values.
If needed, open Main Menu - User Behavior Analytics - Score Calculation and set custom zone thresholds or severity weights for the Users category on the Overrides tab. For details, see Score Calculation.
5. Anomaly Detection Rule
Create a rule under Main Menu - User Behavior Analytics - Anomaly Detection Rules.
| Parameter | Value |
|---|---|
| Name | High user risk |
| Rule Type | Score Threshold |
| Object Categories | Users |
| Minimum Anomaly Score | 40 |
| Window | 24 hours |
If you configured several reactions with different families, use Family Set so an anomaly is formed only when alerts from several families occur. For details, see Anomaly Detection Rules.
6. Watchlist
This step is optional. To give alerts for privileged users more weight, connect a watchlist:
- Create a watchlist in Inventory for the
Employeesasset, for examplePrivileged IT Employees - Under
Main Menu-User Behavior Analytics-Watchlists, clickConnect Listand select it - Set
Scoring EffecttoMultiplier1.5
For details, see Watchlists.
7. End-to-End Verification
- On the
Objectstab, select theUserscategory and make sure the user is in the list - Check for
Completedin the policy run statistics and for hosts in theSign-in hostsalgorithm on the object'sProfiletab - Sign in as the user to a host already in the profile; no alert should appear
- Sign in to a new host and wait for the rule to run; its alert appears in
Active Alertson the object'sScoringtab - Make sure the object score increased. Why This Score shows its breakdown
- Once the anomaly score reaches the threshold, the anomaly appears in the anomaly feed
If there is no alert, compare user.name in the event with the object's base login field, and compare host.name with the profile. Common causes are different letter case, a domain prefix, and different identification fields in the policy and reaction.