Professor Franklin
Accessibility settings

Preferences are saved in this browser when storage is available.

Getting Started

Chapter 14 · Reading 1 of 3

Following a request through the logs

CHFI domains 1, 3, 4, 5, 6

Northgate Rail’s portal changed a passenger’s email address at 03:12 UTC on Thursday. Four systems sit between the internet and the customer database: a web application firewall, a load balancer acting as a reverse proxy, the web servers and the application itself. Each keeps its own log, in its own format, often in its own time zone. Tracing one request means finding the same request in each of them.

Know the path and who logs what

Figure 1. One request, four logs
  1. Web application firewall (WAF) Logs the client address, full request including the body if configured, rule matches, and whether it blocked or only logged the request.
  2. Load balancer or reverse proxy Logs the client address, the backend server chosen, timings and response codes. Adds an X-Forwarded-For header and often a request ID.
  3. Web server (Apache, IIS, nginx) Logs the method, path, status, size, referrer and user agent. Sees the proxy as the client unless configured otherwise.
  4. Application Logs business events, such as “UpdateProfile for user 552190”, errors and stack traces, ideally with the same request ID.

A request ID (or correlation ID) generated at the edge and passed through every layer is the single most useful field in a web investigation. Northgate’s WAF assigns one and forwards it in a header, and the application writes it into every log line. Where no ID exists, the examiner joins records on time, path, method and response size, which is slower and less certain.

Read the server log formats

Apache commonly uses the Combined Log Format: client address, identity, user, time in brackets with its UTC offset, the request line, status, bytes, referrer and user agent. Access logs are often in /var/log/apache2/ or /var/log/httpd/, with errors in a separate error.log.

10.0.5.20 - - [19/Nov/2026:22:11:59 -0500] "POST /account/profile HTTP/1.1" 302 0 "-" "python-requests/2.32"
  1. The load balancer’s address, not the client’s.
  2. Local time with its offset: 03:11:59 UTC on 20 November.
  3. A scripting library, not a browser. Unusual for a profile update.

IIS uses the W3C Extended Log File Format, written by default to %SystemDrive%\inetpub\logs\LogFiles\W3SVC<site ID>\. A #Fields: line at the top of each file names the columns, such as date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status time-taken. IIS writes W3C log times in UTC by default, while Apache writes local time with an offset. Mixing them without conversion is a classic error.

Neither format records the request body by default, so a POST line shows that a form was submitted but not what it contained. The WAF or application log is often the only place the body appears.

Find the real client

Behind a proxy, the web server sees the proxy’s address. The proxy adds an X-Forwarded-For header listing the client address, and the web server can be configured to log it. A client can send its own fake X-Forwarded-For, and proxies append to whatever arrives, so the examiner trusts only the entry added by the organization’s own proxy, usually the last one. Northgate’s load-balancer log records the real client: 203.0.113.140, a residential address in another country.

Figure 2. The request traced across layers, UTC
LayerTimeClient seenRecord
WAF03:11:58.904203.0.113.140id 7f3a91c2, POST /account/profile, rule 942100 matched, action: log only
Load balancer03:11:58.911203.0.113.140id 7f3a91c2 to web-02, status 302, 61 ms
Apache on web-0203:11:59 (22:11:59 −0500)10.0.5.20POST /account/profile 302
Application03:11:59.020n/aid 7f3a91c2 UpdateProfile user_id 552190, session of customer 498877

The application line already shows something odd: a session belonging to one customer updated another customer’s profile. The next reading explains how. The final question, whether the database committed the change, belongs to Reading 3.

On the exam, IIS logs default to UTC and Apache to local time with an offset, a proxy hides the client unless X-Forwarded-For or the proxy’s own log is used, and a request ID joins the layers. The next reading, Web attack evidence, examines what the request contained.

Apache combined log line

Inspect the three records, then use the evidence to answer the question.

1. Time

19/Nov/2026:22:11:59 -0500

2. Status

302

3. User agent

python-requests/2.32

Apply the reading

The Apache log shows every request coming from 10.0.5.20, the load balancer. How do you find the real client address?

Compare your reasoning

Use the X-Forwarded-For header, if the load balancer adds it and the server logs it, or the load balancer’s own access log, joined on time, path and a request ID. Remember that X-Forwarded-For can be forged by the client, so trust only the entry added by your own proxy.