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.
DeviceLogonEvents
or MDI’s IdentityLogonEvents
tables to search for successful logins (ActionType == "LogonSuccess"
) originating from the identified device or IP.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
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.
AppFlowy Cloud is a robust component of the AppFlowy ecosystem, designed to provide secure user…
The "kovid-obfusctaion-passes" project is a comprehensive collection of LLVM and GCC plugins designed to implement…
The asm-lessons repository introduces learners to assembly language programming within the context of FFmpeg, a…
NetExec, also known as nxc, is a powerful network hacking tool designed to automate security…
Dark Ledger is a comprehensive repository designed to archive and preserve information related to darknet…
ScrapeServ is a robust and easy-to-use web scraping tool designed to capture website data and…