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.
Case built for teaching purposes.
One Monday morning the home page of a professional firm’s website shows an offensive message. The site is hosted by a hosting provider and protected by a CDN.
| Source | What it shows | Value |
|---|---|---|
| Web server log | All the night’s requests come from CDN addresses | No real address visible |
| CDN logs | At 02:11 UTC an upload to a form on the site from a single address | Apparent origin of the attack |
| Rotated, compressed files | Two days earlier the same address tries hundreds of paths on the site | Reconnaissance phase |
| Application log | A new file in the uploads folder at 02:13 according to the server clock | Moment of the intrusion |
| Internet registries | The address belongs to a rented server at a foreign provider | Starting point, not the perpetrator |
| Server clock | Two minutes fast: once the drift is corrected, the file was created at 02:11 UTC, as in the CDN | Consistent timeline |
The server log alone would have led to the CDN and stopped there. The CDN logs, exported the same day, gave the address; the rotated files, saved before the weekly deletion, showed that the attack had been prepared; correcting the clock put all the sources on the same timeline.
Server logs: checklist
The checklist for logs: preservation, acquisition, analysis and reporting.
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: 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: frequently asked questions
Short answers to the most common questions about server logs as evidence.