Authentication From Suspicious DeviceName
KQL Queries
Using KQL (Kusto Query Language) query to identify suspicious authentication attempts originating from unusual or suspicious workstation names. This query assumes you're working with Azure Monitor, Sentinel, or a similar platform that supports KQL and logs such as SecurityEvent, SigninLogs, or other authentication-related logs.
Using KQL (Kusto Query Language) query to identify suspicious authentication attempts originating from unusual or suspicious workstation names. This query assumes you're working with Azure Monitor, Sentinel, or a similar platform that supports KQL and logs such as SecurityEvent, SigninLogs, or other authentication-related logs.
Key Details:
Dynamic List of Suspicious Names: Adjust
SuspiciousWorkstations
to include prefixes, patterns, or specific workstation names you consider suspicious.Event IDs: Targets Windows Security Event IDs for logon success (
4624
) and failure (4625
).Regex Matching: Matches patterns using a regex for flexible detection of workstation naming conventions.
Summarization: Group data by workstation name, user, and logon type for better analysis and filtering.
Logon Type Mapping: Provides a human-readable description of the logon type for better context.
Results:
WorkstationName: The suspicious workstation name.
TargetUserName: User attempting to log in.
LogonTypeDescription: Describes how the logon was attempted (e.g., Interactive, Network, Remote Interactive).
LogonAttempts: Total authentication attempts.
FailedAttempts: Count of failed logon attempts.
You may have to tweak the query to include additional suspicious patterns or integrate it with threat intelligence feeds for enhanced correlation.
Splunk Query:
Using Splunk query to discover authentication events originating from suspicious workstation names. This query assumes you're using Windows Event Logs (index=wineventlog
) or a similar data source for authentication events.
Note: The fields in your Splunk logs may differ slightly; for example, AccountName may be displayed as Account_Name.
Key Details:
EventCode Filtering:
4624
: Logon success.4625
: Logon failure.
Normalization:
Uses
coalesce()
to handle scenarios where eitherWorkstation
orComputerName
maybe populated.
Suspicious Workstation Patterns:
Matches common suspicious workstation naming conventions like
TEMP*
,DESKTOP-*
,UNKNOWN
, orWORKSTATION-*
.Regex patterns used in
match()
provide flexibility.
Stats Aggregation:
Aggregates data to summarise:
TotalAttempts
: Total authentication attempts.FailedAttempts
: Failed login attempts.UniqueUsers
: Unique users attempting to log in from suspicious workstations.
Logon Type Description:
Maps
LogonType
values to human-readable descriptions for better context.
Filtering and Sorting:
Displays results only for suspicious workstations (
where Suspicious="Yes"
).Sorts results by the highest number of total attempts.
Output:
Displays key fields like
WorkstationName
,UserName
,LogonTypeDescription
, and summarised stats.
Customisation:
Suspicious Patterns: Adjust the
search
clause ormatch()
function to include additional patterns or specific workstation names based on your organisation's threat models.Additional Fields: Extend the query with fields like
SourceIP
orDestinationIP
for more in-depth analysis.Enrichment: Integrate with threat intelligence feeds to correlate suspicious workstation names or IPs.
Last updated