Command Center · Reference 05

Forensics Quick Reference

Fast evidence-first lookup for preservation, hashing, accounts, logs, processes, services, scheduled activity, network connections, browser artifacts, suspicious files, and timelines.

Start with the question, choose the right source, preserve useful evidence, corroborate, and answer only what the evidence supports.

Evidence Rule

01Preserve
02Observe
03Corroborate
04Conclude carefully

Before remediation

Evidence can disappear when the system changes

Processes exit, network connections close, files change, logs rotate, and scheduled tasks can be deleted. Record the details that matter before making defensive changes.

Forensics

Evidence Preservation

Record before changing

Capture paths, timestamps, hashes, PIDs, accounts, log entries, scheduled-task details, and network state before remediation.

Caution

Changing the system can destroy or alter evidence.

Work from copies when possible

Preserve the original evidence source and analyze a working copy.

Caution

Do not confuse a copied artifact with the original source.

Separate observation from inference

Write what the evidence directly shows first, then label any interpretation separately.

Caution

A plausible explanation is not the same as proof.

Document your own changes

Keep remediation actions separate from the original state.

Caution

This prevents later confusion when reconstructing the timeline.

Forensics

Hashes & File Identity

Get-FileHash "C:\Path\To\File" -Algorithm SHA256

Calculates a SHA-256 hash on Windows.

Caution

A hash identifies content; it does not prove whether the file is safe.

sha256sum <file>

Calculates a SHA-256 hash on Linux.

Caution

Hash equality means identical content, not identical origin or intent.

file <file>

Identifies a Linux file by content rather than extension.

Caution

File type is useful triage evidence, not a verdict.

Get-Item "C:\Path\To\File" | Format-List Name,Length,CreationTime,LastWriteTime,Attributes

Shows useful Windows metadata.

Caution

Creation and write times describe different events.

Forensics

Windows Accounts & Authentication

Get-LocalUser

Lists local Windows accounts.

Caution

Account presence does not prove activity.

Get-LocalGroupMember -Group "Administrators"

Shows local Administrators membership.

Caution

Privilege membership is capability, not proof of use.

Get-WinEvent -LogName Security -MaxEvents 100

Shows recent Security events.

Caution

Filter by time and event ID when possible.

Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624,4625,4648,4672}

Filters common authentication/privilege events.

Caution

Use logon type and surrounding events for context.

Forensics

Linux Accounts & Authentication

getent passwd

Lists visible user accounts.

Caution

Presence alone does not indicate recent activity.

id <username>

Shows UID and group membership for one account.

Caution

Group membership is capability, not action.

last

Shows recent login history from wtmp where available.

Caution

Historical login databases can be rotated or incomplete.

sudo tail -n 100 /var/log/auth.log

Shows recent authentication events on many Ubuntu/Mint systems.

Caution

Some systems rely more heavily on journald.

Forensics

Processes

Get-Process

Lists current Windows processes.

Caution

Process name alone does not establish legitimacy.

Get-CimInstance Win32_Process | Select ProcessId,ParentProcessId,Name,ExecutablePath,CommandLine

Shows PID, PPID, path, and command line on Windows.

Caution

Some fields may require elevation.

ps -eo pid,ppid,user,lstart,cmd --sort=pid

Shows detailed Linux process context.

Caution

Processes are volatile; capture useful details promptly.

pstree -ap

Shows Linux parent-child process relationships.

Caution

Parentage helps explain execution but does not prove intent.

Forensics

Services & Startup

Get-CimInstance Win32_Service | Select Name,State,StartMode,StartName,PathName

Shows Windows service state, startup mode, account, and executable path.

Caution

Required services can look unfamiliar.

Get-CimInstance Win32_StartupCommand

Shows a broad Windows startup-command inventory.

Caution

It is useful but not exhaustive.

systemctl --type=service --state=running

Lists running Linux services.

Caution

Running does not automatically mean required or suspicious.

systemctl cat <service>

Shows the effective Linux systemd unit and overrides.

Caution

Drop-in overrides can change behavior from the vendor default.

Forensics

Scheduled Tasks, Cron & Timers

Get-ScheduledTask

Lists Windows scheduled tasks.

Caution

Configured does not mean executed.

Get-ScheduledTaskInfo -TaskName "ExampleTask"

Shows last and next run details for one task.

Caution

Pair with task action, trigger, and account.

crontab -l

Shows the current Linux user's crontab.

Caution

Other users and system cron locations must be checked separately.

systemctl list-timers --all

Lists systemd timers and run timing.

Caution

Inspect the associated service unit before changing anything.

Forensics

Network Connections

Get-NetTCPConnection

Shows Windows TCP endpoints, states, and owning PIDs.

Caution

Map OwningProcess to the actual process before concluding anything.

Get-NetTCPConnection -State Listen

Shows listening Windows TCP sockets.

Caution

Listening does not guarantee remote reachability.

ss -tulpn

Shows Linux listening TCP/UDP sockets and processes when permissions allow.

Caution

A port number is a clue, not proof of the service.

ss -tpn

Shows active Linux TCP connections with process context.

Caution

Connection presence alone does not establish malicious activity.

Forensics

Browser & Download Artifacts

Browser history

Can show visited URLs and timing.

Caution

Visited does not necessarily mean downloaded or executed.

Download history

Can show file names, source URLs, paths, and times.

Caution

Downloaded does not mean opened or executed.

Cache and profile data

Can add context around browsing activity.

Caution

Cache presence can be automatic and should be interpreted carefully.

Hash the downloaded file

Correlates the browser artifact to a specific file on disk.

Caution

File identity still does not prove user intent.

Forensics

Email & Document Triage

Check sender address

Compare display name with the actual sending address.

Caution

Display names are easy to imitate.

Review message headers

Headers can show routing, authentication, and source clues.

Caution

Headers require context and should not be reduced to one field.

Check actual file type

Use file/content identification rather than trusting the extension.

Caution

Extensions can be misleading.

Record document metadata

Author, timestamps, title, and application metadata can support correlation.

Caution

Metadata can be modified and should be corroborated.

Forensics

Archives, Hidden Files & Alternate Storage

List archive contents safely

Inspect filenames and structure before extracting or opening content.

Caution

Archive presence does not prove malicious intent.

Check hidden/system attributes

Windows attributes and Linux dotfiles can reveal intentionally less-visible files.

Caution

Hidden does not mean malicious.

Get-Item "C:\Path\To\File" -Stream *

Lists NTFS alternate data streams where supported.

Caution

An alternate stream is not automatically suspicious.

ls -la <path>

Shows hidden Linux entries and permissions.

Caution

Interpret ownership, timestamps, and location together.

Forensics

Timeline Reconstruction

Normalize time zones

Keep original timestamps and note the time zone before comparing events.

Caution

Do not silently convert times without recording the original.

Order events

Sort by time, then label source and evidence type.

Caution

Close timestamps do not always mean direct causation.

Correlate independent sources

Use logs, browser data, files, processes, scheduled activity, and network evidence together.

Caution

One source can be incomplete or misleading.

Mark confidence

Separate high-confidence facts from reasonable inferences.

Caution

Do not present uncertain interpretation as fact.

Windows events

High-value event IDs

4624Successful logon
4625Failed logon
4648Explicit credentials used
4672Special privileges assigned
4720User account created
4722User account enabled
4725User account disabled
4726User account deleted
4732Member added to local security group
4733Member removed from local security group
7045Service installed
7036Service state changed

Windows logons

Common logon types

2Interactive
3Network
4Batch
5Service
7Unlock
10RemoteInteractive / RDP
11CachedInteractive

Timestamp guide

Do not treat every timestamp as the same event

Windows CreationTime

When the current file object was created on that volume.

Windows LastWriteTime

When file content was last written.

Linux mtime

File content modification time.

Linux atime

Last access time when tracked.

Linux ctime

Metadata-change time, not creation time.

Linux birth time

Creation-like timestamp when supported by filesystem/tools.

Evidence questions

Ask these before writing your conclusion

01

What exact question am I trying to answer?

02

Which source is most likely to contain direct evidence?

03

What should I preserve before touching the system?

04

Is this a fact, an inference, or only a possibility?

05

Can another independent source corroborate it?

06

Are the timestamps in the same time zone?

07

Does the account, task, service, or process merely exist, or is there evidence it actually ran?

08

What evidence would contradict my current explanation?

Common mistakes

Forensics mistakes that weaken the evidence

01

Answering from one artifact when the question requires correlation.

02

Treating ctime as Linux file creation time.

03

Assuming a downloaded file was opened or executed.

04

Assuming an account with privilege actually used that privilege.

05

Killing a process before recording path, command line, parent PID, hash, and network state.

06

Deleting a scheduled task before recording its action, trigger, account, and run history.

07

Changing timestamps or files before preserving the original evidence.

08

Presenting an inference as if it were a directly observed fact.