First Time Logon to New Server

Description

Find users who logged into a new server for the first time.


Use Case

Advanced Threat Detection, Compliance, Security Monitoring

Category

Lateral Movement, GDPR

Security Impact

By monitoring and alerting on first time log ins to a server, you are able to detect if/when an adversary is able to escalate permissions or add new accounts to AD, or to endpoints directly. This should be a priority particularly for critical infrastructure, high-value and mission critical assets or those systems containing sensitive data. In addition to external adversary, this type of behavior can also be indicative of a potential insider threat issue, where an employee is probing their access, or potentially testing new accounts they may have created for malicious purposes.

Alert Volume

Very High (?)

SPL Difficulty

Medium

Journey

Stage 1

MITRE ATT&CK Tactics

Lateral Movement

MITRE ATT&CK Techniques

Remote Services
Remote Desktop Protocol

MITRE Threat Groups

APT1
APT3
APT39
APT41
Axiom
Cobalt Group
Dragonfly 2.0
FIN10
FIN6
FIN8
GCMAN
Lazarus Group
Leviathan
OilRig
Patchwork
Stolen Pencil
TEMP.Veles
menuPass

Kill Chain Phases

Installation
Actions on Objectives

Data Sources

Windows Security
Authentication

   GDPR Relevance

While not explicitly required for GDPR, this capability is often seen as a part of maintaining State of the Art Security and supports GDPR requirements.

   How to Implement

Implementation of this example (or any of the First Time Seen examples) is generally very simple.

  • Validate that you have the right data onboarded, and that the fields you want to monitor are properly extracted.
  • Save the search.

For most environments, these searches can be run once a day, often overnight, without worrying too much about a slow search. If you wish to run this search more frequently, or if this search is too slow for your environment, we recommend leveraging a lookup cache. For more on this, see the lookup cache dropdown below and select the sample item. A window will pop up telling you more about this feature.

   Known False Positives

This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching over (or for the lookup cache feature, the first occurrence over whatever time period you built the lookup). But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.

You should not review these alerts directly (except for access to extremely sensitive system), but instead use them for context, or to aggregate risk (as mentioned under How To Respond).

   How To Respond

When this search returns values, initiate your incident response process and validate the user account accessing the specific system. Determine who the system owner is and contact them. If it is authorized, document it as such and by whom. If not, the user credentials may have been used by another party and additional investigation is warranted as a first time logon to a server that was never logged into before could suggest compromised credentials gaining access to other systems.

   Help

First Time Logon to New Server Help

This example leverages the Detect New Values search assistant. Our dataset is an anonymized collection of Windows Logon events. For this analysis, we are effectively grouping by username and system name, which will give us a row for each username+systemname combination. We check if the first time that has occurred was in the last day.

SPL for First Time Logon to New Server

Demo Data

First we pull in our demo dataset.
Here we use the stats command to calculate what the earliest and the latest time is that we have seen this combination of fields.
Next we calculate the most recent value in our demo dataset
We end by seeing if the earliest time we've seen this value is within the last day of the end of our demo dataset.

Live Data

Here we start with our basic dataset of WinSecurity authentication logs. Notably, this technique of doing the value and then the field=value can bypass some quirks around field extractions, and make searches faster for very large datasets (though that's an area of active work, and it's less true every year).
Here we use the stats command to calculate what the earliest and the latest time is that we have seen this combination of fields.
We end by seeing if the earliest time we've seen this value is within the last day.

Accelerated Data

Here, tstats is pulling in one command a super-fast count per user, per system, per day of authentications.
It is usually easiest to work with data model acceleration after we've renamed the fields to something a little friendlier.
Here we use the stats command to calculate what the earliest and the latest time is that we have seen this combination of fields.
We end by seeing if the earliest time we've seen this value is within the last day.