Lateral movement
Windows DFIR notes are no longer maintained on InfoSec-Notes. Updated versions can be found on: artefacts.help.
The artefacts generated independently of the lateral movement technics used are introduced in the [DFIR] Windows - Account Usage
note. The artefacts presented below are associated with a given lateral movement technique.
Remote Desktop artefacts
Destination machine
Artefact | Location | Conditions | Description | Information yield |
---|---|---|---|---|
EVTX |
| Default configuration. | Event | Source user domain and username. Source machine hostname / IP. |
EVTX |
| Requires | Event | Source user domain and username. Source machine hostname / IP. |
EVTX |
| Default configuration. | Event | Source user domain and username.
Source machine IP.
This event followed by unusual / suspicious activity of |
EVTX |
| Default configuration. | Event | Source user domain and username. Source machine IP. |
EVTX |
| Default configuration.
Introduced in | Event | Source machine IP. |
Prefetch |
| Only generated on Windows desktop OS by default. | Prefetch files related to | Timestamp of last runs and overall number of executions. |
Filesystem MFT UsnJrnl |
| Only generated on Windows desktop OS by default. | Entries for Prefetch files related to | The most recent Prefetch file |
Shimcache Amcache |
| Unreliably generated. | Entries for |
Source machine
Artefact | Location | Conditions | Description | Information yield |
---|---|---|---|---|
EVTX |
| Default configuration.
Only logged if | Event | Current logged-on user's domain and username.
Alternate user's domain and username.
Destination machine's hostname. The |
EVTX |
| Default configuration. | Event | Current logged-on user's domain and username.
Event |
Registry |
| Default configuration. | ||
EVTX |
| Requires | Event | Current logged-on user's domain, username and |
(SourceName = 'Microsoft-Windows-TerminalServices-LocalSessionManager' AND (EventID = 21 or EventID = 22 or EventID = 23 or EventID = 24 or EventID = 25 or EventID = 39 or EventID = 40)) (SourceName = 'Microsoft-Windows-TerminalServices-RemoteConnectionManager' AND EventID = 1149)"
PsExec artefacts
Remote Scheduled Tasks artefacts
Remote job schedule registration, execution and deletion
Location : Victim Microsoft-Windows-TaskScheduler%4Operational.evtx
hive.
Artifact : Task Scheduler Event Log(since win7)
Registering Job schedule ID : 106
Account Name used to registration
Job Name : Usually “At#” form
Starting Job schedule ID : 200
The path of file executed for job
Deleting Job schedule ID : 141
Account Name used for the deletion
The creation, execution and deletion of a scheduled task will notably, in addition to
Security
EID 4624
andEID 4672
events, generate the following Windows events:Microsoft-Windows-TaskScheduler/Operational
hive,EID 106: User "<DOMAIN | HOSTNAME>\<USERNAME> | <SID>" registered Task Scheduler task "\<TASK_NAME>"
.Microsoft-Windows-TaskScheduler/Operational
hive,EID 140: User "<DOMAIN | HOSTNAME>\<USERNAME> | <SID>" updated Task Scheduler task "\<TASK_NAME>"
.Microsoft-Windows-TaskScheduler/Operational
hive,EID 141: User "<DOMAIN | HOSTNAME>\<USERNAME> | <SID>" deleted Task Scheduler task "\<TASK_NAME>"
.Microsoft-Windows-TaskScheduler/Operational
hive,EID 129: Task Scheduler launch task "\<TASK_NAME>", instance "<INSTANCE>" with process ID <PID>
.Microsoft-Windows-TaskScheduler/Operational
hive,EID 100: Task Scheduler started "<INSTANCE>" instance of the "\<TASK_NAME>" task for user "NT AUTHORITY\SYSTEM | <DOMAIN | HOSTNAME>\<USERNAME> | <SID>"
.Microsoft-Windows-TaskScheduler/Operational
hive,EID 140: User "<DOMAIN | HOSTNAME>\<USERNAME> | <SID>" updated Task Scheduler task "\<TASK_NAME>"
.Security
, ifAudit object access
is enabled forSuccess
andFailure
,EID 4698: A scheduled task was created
. Includes the scheduled task detailed configuration (author, triggers, executing user, command and eventual command argument, etc.) and can be correlated to a logon session using the eventLogon ID
.Security
, ifAudit object access
is enabled forSuccess
andFailure
,EID 4702: A scheduled task was updated
. Specifies the user at the origin of the modification, the task name of the updated scheduled task and can be correlated to a logon session using the eventLogon ID
.Security
, ifAudit object access
is enabled forSuccess
andFailure
,EID 4699: A scheduled task was deleted
. Specifies the user at the origin of the modification, the task name of the updated scheduled task and can be correlated to a logon session using the eventLogon ID
.
Remote Windows Services artefacts
WMI artefacts
WinRM artefacts
| Microsoft-Windows-WinRM/Operational | 6 | X | Creating WSMan Session
.
Logged on the client host. The event connection string field include the remote host address. | | Microsoft-Windows-WinRM/Operational | 91 | X | Session creation
. | | Microsoft-Windows-WinRM/Operational | 161 | X | The client cannot connect to the destination specified in the request.
Error event, logged on the remote system.
The User
and Computer
event fields provide information on the client. | | Microsoft-Windows-WinRM/Operational | 168 | X | Session creation
. |
WinRM Operational event log entries indicating authentication prior to PowerShell remoting on an accessed system • Event ID 169: “User [DOMAIN\Account] authenticated successfully using [authentication_protocol]”
System event log entries indicating a configuration change to the Windows Remote Management service: ○ Event ID 7040 “The start type of the Windows Remote Management (WS-Management) service was changed from [disabled / demand start] to auto start.” – recorded when PowerShell remoting is enabled. ○ Event ID 10148 (“The WinRM service is listening for WS-Management requests”) – recorded upon reboot on systems where remoting has been enabled.
WinRM Operational event log entries indicating authentication prior to PowerShell remoting on an accessed system: ○ Event ID 169 (“User [DOMAIN\Account] authenticated successfully using [authentication_protocol]”)
DCOM artefacts
References
https://dfironthemountain.wordpress.com/2019/02/15/rdp-event-log-dfir/
https://digital-forensics.sans.org/media/SANS_Poster_2018_Hunt_Evil_FINAL.pdf
https://jpcertcc.github.io/ToolAnalysisResultSheet/details/mstsc.htm
https://nullsec.us/windows-rdp-related-event-logs-the-client-side-of-the-story/
https://ponderthebits.com/2018/02/windows-rdp-related-event-logs-identification-tracking-and-investigation/
https://purerds.org/remote-desktop-security/auditing-remote-desktop-services-logon-failures-1/
https://repo.zenk-security.com/Forensic/A-forensic-analysis-of-apt-lateral-movement-in-windows-environment.pdf
https://salt4n6.com/2019/09/22/event-id-1024/
https://www.13cubed.com/downloads/rdp_flowchart.pdf
https://www.andreafortuna.org/2020/06/04/windows-forensic-analysis-some-thoughts-on-rdp-related-event-ids/
https://www.manageengine.com/products/active-directory-audit/kb/windows-security-log-event-id-X.html
https://www.youtube.com/watch?v=qxPoKNmnuIQ
Last updated