Detect Suspicious Access From Login Records

In Questetra BPM Suite, User logins as well as User and authorization changes are recorded in [System Log]. In this article, we explain how System Administrators can check records in [System Log] and [System Summary] to spot suspicious access. We also demonstrate how to have an AI generate aggregation scripts when the volume of records is large, along with what individual Users can verify in their own [Login History].

[System Administrator Authority] is required to access [System Log] and [System Summary].

What Is Recorded in [System Log]

Under [System Settings] > [Logs] > [System Log], the following activity history is displayed:

  • User logins (successes and failures) and logouts
  • [Forced Logout due to Concurrent Login]
  • [User Password Change]
  • Additions, modifications, and deletions of Users, Organizations, Roles, and Titles
  • Changes to Organization and Role memberships
  • Granting and revoking of system authorities, such as [System Administrator Authority]
  • System startups

In successful login records, the operating User Name can be confirmed, and the source IP address is displayed under [Detail]. [Login Failure] does not record the operating User Name. Instead, the entered email address and the source IP address are displayed under [Detail]. Because there are failure instances where an email address is not recorded, repeated failures should be tracked using both email addresses and IP addresses.

Records to Check

Clues pointing to suspicious access include the following records:

  • Logins originating from IP addresses not used by your company
  • Logins outside business hours
  • Repeated [Login Failure] events using the same email address
  • [User Password Change] events unrecognized by the User
  • [Forced Logout due to Concurrent Login]: Recorded when a single account exceeds the concurrent login limit (default is 3)
  • Unrecognized User additions or Organization/Role modifications
  • Unrecognized granting of system authorities

[System Log] can be filtered by specifying a date/time range (start and end). First inspect the past month, and expand the range as needed. Because [CSV Download (UTF-8)] allows downloading up to 10,000 records per export, split the download across multiple periods if the record volume is high.

Checking Operation Channels

Adding [Authentication Type] in [Column] setting of [System Log] reveals through which channel a login or operation was performed. It displays either Password Login, SSO (SAML), Google Login, Auto-login, Basic Auth, or OAuth2, where Basic Auth and OAuth2 indicate operations executed via the REST API. You can also add [OAuth2 Client ID], which identifies which client initiated the operation when OAuth2 is used. Use [Authentication Type] to verify that User additions and authorization assignments were not executed via the REST API instead of the web UI.

API access via Basic Auth or OAuth2 itself is not recorded in [System Log]. What is recorded are User and authority changes made via the API, as well as [Login Failure] events resulting from failed authentication. To review Users and clients authorized to use the REST API, refer to “REST API” in “Checking Questetra BPM Suite Settings and Logs Against Unauthorized Access (Coming Soon)”.

Analysis via Aggregation

When the volume of records is large, have an AI generate an aggregation script and search for suspicious records within the aggregated results. Inspecting [System Log] line by line to manually spot unfamiliar IP addresses or off-hours logins is challenging. Aggregating counts by IP address and time slot highlights unusual activity immediately.

Provide the AI only with the schema and field definitions of the logs, not the log data itself. This is because logs contain User Names, email addresses, and IP addresses. Logs can be retrieved in JSON format using the REST API endpoint “List system logs” (/API/Admin/SystemLog/list) with a Personal Access Token of a User holding [System Administrator Authority]. By running the AI-generated script locally, you can aggregate the data without exposing either the logs or your Personal Access Token to the AI.

Here is an example prompt for the AI. The execution environment (Windows Git Bash), domain (example.questetra.net), and IP address range (203.0.113.0/24) are sample values, so replace them with your company’s actual details. If you do not replace the IP address, all IP addresses will be marked as “External”.

Please write a bash script that retrieves and aggregates Questetra BPM Suite system logs. The execution environment is Git Bash on Windows. If commands that are not installed by default (such as jq) are used, please include installation instructions.

Log Retrieval
- API: GET https://example.questetra.net/API/Admin/SystemLog/list (List system logs)
- API Specification (OpenAPI): https://example.questetra.net/v3/api-docs/system?locale=en
- Authentication: Authorization: Bearer Personal Access Token (read from environment variable QTOKEN)
- Period: Specify start and end date/time via arguments (default to the past 1 month if omitted)

Contents of "detail"
- Source IP address for logins. For login failures, the entered email address and source IP address (email address may be absent)

Type IDs
- 100001, 100005, 100006, 100008: Login (Password, Google Account, Auto-login, SAML respectively)
- 100002: Login Failure, 100004: Forced Logout due to Concurrent Login
- 500001 to 500003: User addition, modification, deletion; 500004: User Password Change
- 510001 to 510003: Organization addition, modification, deletion; 520001 to 520003: Role addition, modification, deletion
- 530001 to 530003: Organization membership addition, modification, deletion; 540001, 540003: Role membership addition, deletion
- 550001 to 550003: Title addition, modification, deletion
- 700001, 700003: System authority granting, revoking

Desired Aggregations
1. Login counts and User counts per IP address. Flag IP addresses outside our corporate network (203.0.113.0/24)
2. Login counts per hour slot (1-hour intervals) and day of the week
3. Login failure counts per email address and IP address
4. Counts per authentication type (Auth Type)
5. List of User/Organization/Role/Title additions, modifications, deletions, and system authority assignments/revocations (Date/Time, Type, Operating User, Target User, Auth Type, OAuth2 Client ID, Detail)

Validate the generated script using mock logs. Following your initial prompt, have the AI generate mock logs containing mixed entries such as logins from non-company IP addresses, late-night logins, and repeated login failures using the same email address. Run the generated script against these mock logs to ensure the simulated anomalies appear clearly in the aggregated output.

Interpreting Aggregated Results

Many of the records listed in “Records to Check” will manifest in the aggregated results as follows. Compare the results against your company’s normal usage patterns.

AggregationWhat to Check
Counts per IP AddressLogins from IP addresses other than your company’s. Because this includes remote work or logins from mobile locations, confirm with the User if you notice an unfamiliar IP address
Counts per Time Slot / Day of WeekLogins outside business hours or on non-working days
Login Failure CountsFailures concentrated on a specific email address or IP address
Counts per Auth TypeNumber of operations performed via the REST API using BASIC (Basic Auth) or OAUTH2 (OAuth2)
List of Modifications and System AuthoritiesUnrecognized User additions, Organization/Role changes, [User Password Change] events, and system authority assignments. For entries with an Auth Type of OAUTH2, check the OAuth2 Client ID to identify the client that initiated the operation

If suspicious records are found, check the entries before and after that timestamp in the [System Log] screen.

Trends in Active Logged-in Users

Trends in the number of logged-in Users can be verified in [System Summary]. [Login User Count Trend] displays daily login User counts for one month. If the same User logs in multiple times in a single day, they are counted as 1. The month can be selected from the past 12 months using the dropdown. Check for days where counts are unusually high relative to your headcount, or days where logins occurred despite being company holidays.

Verification by Users Themselves

Have individual Users check their own [Login History] as well. Having each User look for logins they do not recognize is often faster than an administrator auditing every User. Under [Account Settings] > [Login History], timestamps for successful logins and logouts over the past month are displayed alongside source IP addresses. Failed logins are not included.

Logins from new devices are notified to the User via email. When [Enable Additional Authentication on New Device] under [System Settings] > [Security] > [Login] is enabled, a verification code is sent via email, and the login cannot complete until that code is entered. If disabled, a notification email informing them of a login from a new device is sent instead. If a User reports receiving an unexpected email, check the login entries for that date and time in [System Log]. Neither SSO (SAML) nor Google Login is subject to additional authentication or notifications. Verify these logins using logs on the IdP or Google side.

When Suspicious Records Are Found

If suspicious records are identified, make a record of the evidence first, and then disable the affected User or client. For the suspension procedure and notification contacts, refer to “When a Breach Is Suspected” in “Checking Questetra BPM Suite Settings and Logs Against Unauthorized Access (Coming Soon)”.

Related Documentation