Windows analysis steps
Windows analysis steps
- Windows 7
- Windows 8
- Windows 10
- Windows 11
2) Create baselines of each VM
- Accounts:
$lu = glu
$wu = gwmi -Class Win32_UserAccount | ? { $_.LocalAccount -eq $true }
$wu | % {
# Use the correct name from the WMI user object for matching
$currentWmiUserName = $_.Name
$l = $lu | ? { $_.Name -eq $currentWmiUserName } | Select-Object -First 1
- Connections:
Get-NetTCPConnection | ForEach-Object {
$proc = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[PSCustomObject]@{
LocalAddress = $_.LocalAddress
LocalPort = $_.LocalPort
RemoteAddress = $_.RemoteAddress
RemotePort = $_.RemotePort
State = $_.State
PID = $_.OwningProcess
ProcessName = $proc.Name
}
} | Format-Table -AutoSize > network.txt
- File system:
Use autopsy or HashMyFiles
Compare results using WinDiff
- Processes:
Get-Process | select Handles, NPM, PM, WS, CPU, Id, SI, ProcessName, @{Name='Path';
Expression={(Get-Process -Id $_.Id).Path}} | where { $_.Path -ne $null } | ft -
AutoSize > processes.txt
- Registry:
Export registry using built-in export functionality
Compare .reg files using WinDiff
- Services:
Get-CimInstance -ClassName Win32_Service | select State, StartMode, Name,
DisplayName | ft -AutoSize > services.txt
- Software:
# Get installed software from the registry
$installedSoftware = Get-ItemProperty "HKLM:\Software\Microsoft\Windows\
CurrentVersion\Uninstall\*" |
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate,
InstallLocation