Device Isolation
Pre-Incident Preparation
Get-CimInstance Win32_OperatingSystem | Select-Object @{N='Name';E={$_.CSName}},@{N='OS';E={$_.Caption}},@{N='Version';E={$_.Version}},@{N='Build';E={$_.BuildNumber}},@{N='InstallDate';E={$_.InstallDate}},@{N='LastBoot';E={$_.LastBootUpTime}},@{N='FreeMemoryMB';E={[math]::Round($_.FreePhysicalMemory/1024,2)}} | Export-Csv "C:\Inventory\device_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv" -NoTypeInformationGet-CimInstance Win32_NetworkAdapterConfiguration -Filter "IPEnabled = TRUE" | Select-Object @{N='Adapter';E={$_.Description}},@{N='IPAddress';E={($_.IPAddress -join ', ')}},@{N='Subnet';E={($_.IPSubnet -join ', ')}},@{N='Gateway';E={($_.DefaultIPGateway -join ', ')}},@{N='MAC';E={$_.MACAddress}},@{N='DHCP';E={$_.DHCPEnabled}},@{N='DNSServers';E={($_.DNSServerSearchOrder -join ', ')}} | Export-Csv "C:\Inventory\ip_details_$(Get-Date -Format 'yyyyMMdd_HHmmss').csv" -NoTypeInformationDeviceNetworkEvents
| where TimeGenerated > ago(30d)
| summarize ConnectedIPs = make_set(RemoteIP), Protocols = make_set(Protocol), EventCount = count() by DeviceName, LocalIP
| project DeviceName, LocalIP, ConnectedIPs, Protocols, EventCountDeviceNetworkEvents
| where TimeGenerated > ago(30d)
| summarize ConnectedIPs = make_set(RemoteIP), Protocols = make_set(Protocol), ConnectionCount = count() by DeviceName, LocalIP
| project DeviceName, LocalIP, ConnectedIPs, Protocols, ConnectionCountIncident Detection and Initial Assessment
SecurityEvent
| where EventID in (4624, 4625, 4672, 4688) // Common security-related Event IDs
| project TimeGenerated, Account, EventID, Activity, Computer, IpAddress
| order by TimeGenerated descindex=windows sourcetype="WinEventLog:Security" EventCode IN (4624, 4625, 4672, 4688)
| table _time, user, EventCode, action, host, src_ip
| sort - _timeDeviceProcessEvents
| where FileName == "svch0st.exe"
| summarize AffectedHosts = dcount(DeviceName), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated), ProcessCount = count(), AffectedHostsList = make_set(DeviceName) by FileNameindex=edr process_name="svch0st.exe"
| stats dc(host) as AffectedHosts, earliest(_time) as FirstSeen, latest(_time) as LastSeen, count as ProcessCount, values(host) as AffectedHostsList by process_nameContainment (Short-Term)
Last updated