Server logs · 02 Step-by-step procedure

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.

  1. 01
    List the sources

    Servers, hosting, CDN, firewalls, cloud, mail and applications: wherever the events may have left a trace.

  2. 02
    Ask for preservation

    From the operator or provider, in writing and at once, before rotation deletes the logs.

  3. 03
    Copy the originals

    Whole files, including compressed and rotated ones, without opening them in programs that change them.

  4. 04
    Compute the hash

    SHA-256 of each file at the time of copying, recorded in the report with date and time.

  5. 05
    Record the context

    Server time zone, clock synchronisation, log format, who manages the logs.

  6. 06
    Convert to UTC

    Bring all times to the same reference before comparing different sources.

  7. 07
    Correlate

    Link addresses, accounts, sessions and times across different logs.

  8. 08
    Check completeness

    Look for gaps, missing lines or time jumps that may point to tampering.

  9. 09
    Report

    Meaningful extracts, method and commands used, so that anyone can repeat the analysis.

Continue with
03 Tools

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.

↑