Every public web server is probed constantly, so the hard part is not finding suspicious lines in a log — it is working out which of them matter. This is how we triage an access log: what to ignore, what to investigate, and the handful of patterns that suggest something actually worked.
Published 4 November 2026 · Qcramai Security
An access log records requests. One line per request, typically with the client address, timestamp, method and path, status code, response size, referrer and user agent. That is a narrow window, and knowing its edges saves a lot of wasted effort.
It can tell you what was asked for, in what order, how fast, from where, how your server answered, and how much data went back. That is often enough to reconstruct an attacker's reconnaissance in detail.
It cannot tell you what was in a POST body, what was in the request headers (including cookies and tokens), or what the response actually contained. So an access log rarely proves exploitation on its own. It tells you where to look next.
404 is noise. The same probe returning 200 with a non-trivial body
is a finding. Most triage is that one comparison, applied consistently.
Before hunting for attacks, calibrate on what background radiation looks like, because most of what alarms people on first reading is simply the internet being the internet:
/wp-login.php, /wp-admin/,
/xmlrpc.php. Mass scanners do not check what you are running first. All
404, all irrelevant./.env,
/.git/config, /config.php.bak,
/phpinfo.php, /.aws/credentials. Entirely routine — and
each one becomes extremely interesting the moment it returns 200.None of this needs action beyond making sure the answer stays 404 or
403. Blocking it individually is a treadmill; the volume is effectively
infinite. Attention is better spent on the patterns below.
Classic brute force — hundreds of attempts against one account from one address — is easy to spot and largely obsolete. Credential stuffing replays breach corpora: many different usernames, one or two attempts each, spread across many source addresses, often at a deliberately slow rate.
Per-IP rate limiting does not see it, because no single address does anything unusual. What
gives it away is the aggregate: a sustained rise in POSTs to your login endpoint with an
unusual ratio of failures to successes, and a spread of source addresses far wider than your
normal traffic. The line that matters is the first success in that run
— a 302 or 200 among a wall of 401s.
Look for ../ and its encodings — %2e%2e%2f,
..%2f, double-encoded %252e — and for absolute paths like
/etc/passwd or C:\Windows\win.ini appearing in parameters. A single
probe is noise. A sequence that varies the encoding against the same
parameter is someone working the problem by hand, and that is worth reading closely.
SQL injection attempts leave recognisable traces: UNION SELECT,
' OR '1'='1, comment markers, information_schema. More telling are
the timing-based ones — SLEEP(5),
pg_sleep, WAITFOR DELAY. If your log format includes response
time, a request containing SLEEP(5) that took just over five seconds has
answered the attacker's question, and yours.
Attackers map applications by watching how answers differ. A long run of requests to one endpoint varying a single value — user IDs, invoice numbers, order references — where most return one status and a few return another is enumeration, and quite possibly a broken access control. This pattern is easy to miss because every individual request looks legitimate; it is only visible in aggregate.
PUT, DELETE, PROPFIND or TRACE against
endpoints that should only see GET and POST. Also worth a look:
OPTIONS sweeps across many paths, which is someone mapping what each endpoint
permits.
The sequence that deserves immediate attention. A source that collects a run of
401s or 403s and then receives a 200 from the same
area of the application has either found a gap or found a credential. Whether the
200 is legitimate is exactly the question to answer, and it will not be
answerable from the access log alone.
Reconnaissance is constant and mostly harmless. These are the patterns that suggest it stopped being reconnaissance:
200 where you expect a 404. Anything
returning success for /.env, /.git/config, a
.bak file or an admin path reachable without authentication. Verify by hand
immediately — this is the highest-signal line in any access log.500 spike on one endpoint from one source. Server
errors mean the input reached code that could not handle it. Attackers cause errors on
the way to causing worse..php file in an upload directory, fetched successfully, is a web shell until
proven otherwise. Treat it as an incident.If you run behind a CDN, load balancer or reverse proxy and have not configured the real client address, every line in your log carries the proxy's address. Per-IP analysis then groups the entire internet into a handful of buckets and tells you nothing.
Fix it at the server rather than in your analysis: on Apache, mod_remoteip; on
Nginx, real_ip. Critically, only trust the forwarded header from
addresses you know are your proxy. A client can send
X-Forwarded-For: 1.2.3.4, and if you believe it unconditionally your rate
limits and blocklists can be steered by whoever is attacking you.
The access log is one of several views, and the interesting findings usually sit where two of them overlap:
500 and the
file and line that failed — the detail the access log omits.SLEEP probe.Two practical points, the second of which catches good engineers:
Logs contain personal data. IP addresses are personal data under GDPR and similar regimes, and query strings routinely capture more than anyone intended. Set a retention period, restrict access, and redact before sharing a log with a vendor or pasting it into a tool.
cat a file; a log viewer that renders entries as HTML without escaping them is
vulnerable to stored XSS from a user-agent string; and a log line interpolated into a shell
command is a command injection. Treat every field as hostile data, quote it, escape it on
output, and never pass it unquoted to a shell. This is a real finding we report, not a
hypothetical.
It is also why our own log analyzers run entirely in your browser — the file is never uploaded, which removes the question of what a third party does with your visitors' addresses.
Long enough to investigate an incident you discover late, which in practice means months rather than days — intrusions are frequently found well after the fact. Balance that against your retention obligations and storage. Ninety days is a common compromise; compress and archive beyond that.
No. The volume is unbounded, the addresses rotate, and maintaining the list costs more
than it saves. Block sources that are causing real load or repeatedly reaching real
endpoints, and otherwise make sure the answer is a clean 404 or
403.
It reduces the noise reaching your origin, which is genuinely useful. It does not remove the need to read logs: a WAF sees traffic in isolation and is poor at the aggregate patterns above — slow credential stuffing, enumeration, a quiet session that follows a loud one. It also cannot tell you that a probe succeeded, only that it was not blocked.
Every 200 for a path that should not exist. One pass over your log filtering
for successful responses to dotfiles, backups and admin paths finds more real problems in
five minutes than a week of reading alerts.
Related reading: how to protect your application and server from remote code execution covers the controls behind several of the patterns above, and AI agents on your server looks at what to log when the client is an autonomous agent.