Server logs: step-by-step procedure
How logs are acquired and analysed: list the sources, ask for preservation at once, copy the originals including rotated files, compute the hash, record time zone and clock, convert to UTC, correlate, check completeness, write the report.
- 01
List the sources
Servers, hosting, CDN, firewalls, cloud, mail and applications: wherever the events may have left a trace.
- 02
Ask for preservation
From the operator or provider, in writing and at once, before rotation deletes the logs.
- 03
Copy the originals
Whole files, including compressed and rotated ones, without opening them in programs that change them.
- 04
Compute the hash
SHA-256 of each file at the time of copying, recorded in the report with date and time.
- 05
Record the context
Server time zone, clock synchronisation, log format, who manages the logs.
- 06
Convert to UTC
Bring all times to the same reference before comparing different sources.
- 07
Correlate
Link addresses, accounts, sessions and times across different logs.
- 08
Check completeness
Look for gaps, missing lines or time jumps that may point to tampering.
- 09
Report
Meaningful extracts, method and commands used, so that anyone can repeat the analysis.
Server logs: tools
Tools for logs: grep, awk and zgrep, Python and pandas, jq for JSON logs, platforms such as Elastic, OpenSearch and Splunk, Plaso for timelines, cloud audit logs, sha256sum, with an example run on a test log.
The pages of this topic
Back to the overviewServer logs: how they work
How logs work: where web server, login, mail, application, cloud and network logs are kept, what a web server log line contains, why rotation deletes them and how CDNs and proxies change the recorded address.
Server logs: mistakes to avoid
The most common mistakes with logs: waiting, copying only part, opening the originals, trusting the time, forgetting the CDN, confusing address and person, relying on screenshots, ignoring gaps.
Server logs: value in court
The value of logs in court under Italian law: electronic document and mechanical reproduction, integrity shown by the hash, completeness, provenance, times, acquisition from providers through a certified copy, challenges by the other party, the Capital One case.
Server logs: a worked case
A worked case: a professional firm’s website is defaced overnight; the server log shows only the CDN, the CDN logs the real address, rotated files the reconnaissance of the previous days and the clock a two-minute drift.
Server logs: checklist
The checklist for logs: preservation, acquisition, analysis and reporting.
Server logs: frequently asked questions
Short answers to the most common questions about server logs as evidence.