Server logs: what websites, services and systems record, how logs are acquired without altering them and how much they are worth as evidence
Digital forensics of logs: web server, access, mail, application, cloud and network logs, retention and rotation, CDNs and proxies, time zones, acquisition procedure with a hash value, tools such as awk, jq and the Microsoft 365 audit log with a worked example, mistakes, value in court, a case of a defaced website, checklist and frequently asked questions.
Every working system keeps a diary. A website’s server notes every page requested, with address, date and time; a mail server every message that passes through; a cloud platform who opened a file, who changed a password, who downloaded an archive. These are logs, and in many investigations they are the only trace of who did what, when and from where.
Precisely because they are valuable, logs are also fragile: they are overwritten after a few days or weeks, they can be edited with a text editor, they record times in different time zones and, behind a CDN or a proxy, they may show the wrong address. To become evidence they must be requested in time, copied without being touched and read with a method anyone can repeat.
What servers record
- Web server
- Address, date and time, page requested, result, size of the response and program used.
- Logins
- Successful and failed logins, user, origin, authentication method.
- Sender, recipient, relaying servers, message identifier, delivery result.
- Applications
- Users’ actions inside the service: changes, exports, deletions.
- Cloud
- Platforms’ audit logs, showing who did what to files, accounts and settings.
- Network
- Firewalls, VPNs and proxies: connections, ports, duration and amount of data.
Logs are the starting point for IP addresses, network traffic and email headers, and are lined up using the timeline and the rules on dates and time zones. The basic entries are server log, hash value and chain of custody.
The pages of this topic
Server 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: 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.
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.
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.