Vulnerability Analysis

Identifying Accounts Used From A Threat Actor Device

In cybersecurity, identifying accounts accessed by a threat actor’s device is a critical aspect of incident response and threat hunting.

This process is particularly relevant in environments where Microsoft Defender for Endpoint (MDE) or Microsoft Defender for Identity (MDI) is deployed. Below is an overview of how this can be achieved using advanced hunting queries.

When a threat actor connects their device to a network, often via VPN, they may attempt to use legitimate accounts for malicious purposes.

To detect such activities, security analysts need to query authentication logs for successful logins originating from the threat actor’s device. Key identifiers include the device name or the IP address assigned to the device.

Steps To Identify Compromised Accounts

  1. Gather Initial Information
    • Obtain the threat actor’s device name and/or IP address.
    • Ensure that the remote IP corresponds to the threat actor’s machine during the events in question.
  2. Query Authentication Logs
    • Use MDE’s DeviceLogonEvents or MDI’s IdentityLogonEvents tables to search for successful logins (ActionType == "LogonSuccess") originating from the identified device or IP.
    • Extend results to include account details such as domain and username.
  3. Summarize Results
    • Aggregate data to list all accounts successfully used from the threat actor’s device.
    • Include a count of unique accounts accessed.
  4. Expand Analysis
    • Remove filters for successful logins to review failed login attempts. These may indicate accounts with valid credentials but locked or restricted access.

Below is an example query for MDE:

textlet TARemoteDeviceNames = dynamic(["THREAT_ACTOR_DEVICE_NAME"]);
let TARemoteIPs = dynamic(["THREAT_ACTOR_IP"]);
DeviceLogonEvents
| where RemoteDeviceName has_any (TARemoteDeviceNames) or RemoteIP has_any (TARemoteIPs)
| where ActionType == "LogonSuccess"
| extend Account = strcat(AccountDomain, "\\", AccountName)
| summarize Accounts=make_set(Account), AccountCount=dcount(Account) by RemoteDeviceName, RemoteIP
  • Not all log entries will include both device name and IP address; prioritize IP-based searches when necessary.
  • Failed login attempts should not be ignored, as they may still indicate compromised credentials.
  • Advanced techniques, such as analyzing logon types and associated devices, can provide deeper insights into threat actor behavior.

By leveraging tools like KQL (Kusto Query Language) within Microsoft Defender XDR, security teams can efficiently identify compromised accounts and take swift action to mitigate risks.

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

AppFlowy Cloud : Enhancing Collaboration With Secure Cloud Infrastructure

AppFlowy Cloud is a robust component of the AppFlowy ecosystem, designed to provide secure user…

51 minutes ago

Kovid-Obfuscation-Passes : Unraveling Advanced Techniques For Enhanced Code Security

The "kovid-obfusctaion-passes" project is a comprehensive collection of LLVM and GCC plugins designed to implement…

51 minutes ago

FFmpeg’s asm-Lessons : Mastering Assembly For Multimedia Optimization

The asm-lessons repository introduces learners to assembly language programming within the context of FFmpeg, a…

51 minutes ago

NetExec Cheatsheet : A Comprehensive Guide

NetExec, also known as nxc, is a powerful network hacking tool designed to automate security…

5 hours ago

Dark Ledger : The Shadows Of Darknet Market Archives

Dark Ledger is a comprehensive repository designed to archive and preserve information related to darknet…

1 day ago

ScrapeServ : A Versatile URL-to-Screenshots Web Scraping Tool

ScrapeServ is a robust and easy-to-use web scraping tool designed to capture website data and…

1 day ago