Ethical › Module 13 › Lesson 3
Logs as the First Responder
Access and error logs on YOUR server.
Visual · server_logs_first_responder
Access logs remember who asked. Error logs remember what broke. Both are defender memory on YOUR server — not a wipe kit, not someone else’s /var/log.
Opening
When HTTP misbehaves, logs are the first honest witness. You read YOUR access and error logs. You do not steal or wipe anyone else’s.
Lesson 1 named leftovers. Lesson 2 named patch, unused modules, TLS, and a worker that is not root. This lesson is what you look at when something still happens: access logs (who asked for what, from where, which status) and error logs (what the clerk could not do). In Cyberlium wording those files are the first responder — not because they stop an attack by themselves, but because they are the memory you still have after the request is gone. Module 6 already split tester documentation from covering tracks: you never hide trails on someone else’s box. The same rule owns web logs. You will not clear a campus access_log. You will not exfil a shop’s error_log. You will not “practice wiping” a classmate’s nginx. This is original Cyberlium teaching mapped to the CEH v13 web-servers domain — not official EC-Council training, not a cert, not exam dumps. Next is the only listener lab in this module: python http.server bound to 127.0.0.1, an index so you are not advertising a tree, ceh-webserver-lab.txt chmod 600, then you stop the server. Here you write what access versus error means on a server YOU run, where you would keep a copy the endpoint cannot erase, and the refuse line about other people’s logs.
1. Access logs: completed asks on YOUR clerk — method, path, status, time
An access log is a line per request the daemon chose to record: time, source address as the clerk saw it, method, path, status, sometimes size and a user-agent string. On a server YOU run, that line answers “did anyone ask for /backup.zip” and “are we serving 404 storms.” Python’s http.server prints a short access-style line to the terminal by default — enough literacy for this module. Production Apache/nginx/IIS write files. You need the name so Lesson 4’s terminal output is not a mystery. You do not need a parser that hunts other people’s CDNs. Status 200 versus 403 versus 404 is hygiene language you already used in Module 10’s 429 demo: the number is the clerk’s answer, not a loot code.
What access logs are not: permission to replay the paths against a second host; a wordlist mined from a stranger’s leaked log; a reason to keep listing on so “the log looks busy.” If you see GET / from 127.0.0.1 in Lesson 4, write that. If you see a listing request because you forgot index.html, that is YOUR misconfig in the log — then you add the index. Do not “enrich” the lab by pointing a scanner at school.edu so the access log of a stranger fills. Their log is not your worksheet.
Command guide
Access logs of YOUR clerk — WHAT/WHY
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install curl sudo apt install python3
macOS:
Command — copy this
brew install python3
Windows: Built-in (PowerShell: Invoke-WebRequest) Download https://python.org/downloads/
═══ COMMANDS ═══
Command — copy this
curl -sS -m 2 -o /dev/null -w "method_GET status=%{http_code}
" "http://127.0.0.1:8000/"2. Error logs: YOUR bugs and denied work — not a trophy folder from others
An error log is the clerk talking to itself: missing files it tried to open, TLS handshake failures on a real daemon, permission denied on a path the worker UID cannot read, crashed modules. On a stack you run, error lines are tickets: fix the path, fix the permission, patch the module (Lesson 2), do not chmod 777 the whole tree to silence the line. Module 6’s least-privilege warning still holds: a worker that can write the document root can often write a web shell if the app is sloppy — this course still will not teach that implant. The error log’s job is to show YOU the denied open, not to hand a stranger a map.
You will not grep a neighbor’s error_log. You will not buy “log dumps” as a homework pack. You will not paste production errors that contain session tokens or paths to customer files into a public gist. If Lesson 4’s handler returns 403 for directory listing, that is an error/status you caused as the author — record it in ceh-webserver-lab.txt, not as a screenshot of someone else’s host. Empty ethics lines fail. Notes that contain other people’s log excerpts fail even if Python printed OK.
Command guide
Error logs are YOUR bugs — WHAT/WHY
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install curl
macOS: Built-in
Windows: Built-in (PowerShell: Invoke-WebRequest)
═══ COMMANDS ═══
Command — copy this
curl -sS -m 2 -o /dev/null -w "missing_path status=%{http_code}
" "http://127.0.0.1:8000/no-such-cyberlium"3. Logs must leave the box: local is fragile; wiping others is a crime
A log that lives only on the same disk a ransomware event or a hostile admin can reach can die with the disk. Off-box copies — another host you own, a cloud audit store the endpoint cannot erase, even rotating a file off the demo laptop — are how defenders keep memory. Module 6 already wrote that sentence for system audit. Web access/error logs are the same control with HTTP columns. You do not need a SIEM brand to write: copies the clerk cannot delete. Local terminal scrollback from python http.server is enough for Lesson 4’s demo and is gone when you close the window — which is why you copy the lines you need into locked notes.
Covering tracks on someone else’s web server — truncating access_log, deleting error_log, disabling CustomLog — is unauthorized modification and often evidence tampering. This course will not give you the wipe commands. It will give you the rule: you never hide tracks on someone else’s box; you never practice wiping Event Logs or nginx logs on a campus PC; you never disable logging on a family site “to see if they notice.” On a machine YOU own, turning audit off to mimic an attacker is still a bad defender habit. Restore logging. Do not publish a wipe script.
Command guide
Logs leave the box — WHAT/WHY then lock
═══ COMMANDS ═══
Command — copy this
cat >> "$NOTES" << 'EOF' off_box: copy/rotate to a place that survives a wipe refuse: wiping other people logs EOF
4. What you record: YOUR log story — not a stranger’s /var/log harvest
A server-logs note is a ticket template. Date (UTC). Access log: what one line means (time, source as seen, method, path, status) on a server YOU run. Error log: denied work and bugs, not a trophy. Off-box: yes/no and a revisit date if not yet. Ethics: never read, steal, or wipe someone else’s logs; never directory-brute strangers to “generate” log lines; audit a stack YOU run. Legal line: original Cyberlium teaching mapped to the CEH v13 web-servers domain — not official EC-Council training, not a cert, not exam dumps. File: $HOME/cyberlium-lab/server-logs-notes.txt, chmod 600.
Do not fill the “server” row with school.edu. Do not add a section titled “how I would clear logs after a test.” Next lesson implements a local clerk so the access line is a request you caused as the client and the author, then you stop the process. Until then, locked definitions are complete. World-writable 777 fails. Gists of other people’s log paths fail.
5. Wrong vs right: stealing or wiping others’ logs vs reading YOUR clerk
Worked failure — same word “logs,” opposite owner. Right never needs a campus access_log or a wipe command to finish the lesson.
Wrong
Pull a shop’s error_log. Truncate campus nginx logs. Disable logging on a family site as a stunt. Gobuster a stranger so THEIR access log fills, then screenshot it as your lab. Paste tokens from production logs into a gist. chmod 777. Call it CEH.
Right
Define access vs error on a server YOU run. Prefer off-box copies. Refuse wipe/steal of others. Fill $HOME/cyberlium-lab/server-logs-notes.txt, chmod 600. Next: Lab — Harden a Local Static Server — HOST 127.0.0.1, no directory-listing homework on strangers, stop the server after.
6. Hands-on: lock server-logs-notes.txt — witness, not a wipe kit
On a computer you own, create cyberlium-lab if needed. Fill every ethics blank. Optionally note where a real daemon you administer would write access/error (path you are allowed to read) — observation only. Do not clear logs. Do not add a stranger hostname. chmod 600.
Command guide
server_logs_notes.sh — access vs error on MY server; never wipe / never steal
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install gobuster
macOS:
Command — copy this
brew install gobuster
Windows:
Command — copy this
go install github.com/OJ/gobuster/v3@latest
═══ COMMANDS ═══
Command — copy this
cd "$HOME/cyberlium-lab"
Command — copy this
{Mission: server-logs-notes.txt in cyberlium-lab (mode 600)
1) In your own words, define access vs error logs as defender memory on a server YOU run — not a wipe kit. 2) Fill $HOME/cyberlium-lab/server-logs-notes.txt with legal line, off-box sentence, and ethics. chmod 600. 3) Ethics: no stealing or wiping others’ logs, no stranger directory brute to fill their logs, no covering tracks.
Stuck? Ask Cyberlium AI Mentor
If “I cannot learn web logs without a live production access_log” still feels true, ask for a hint — not a path to steal. Try: "Hint only: what one access line records, why error lines are tickets on MY worker, why off-box copies matter, and why wiping others is out?" You still fill server-logs-notes.txt. No campus /var/log. No gobuster.
You now treat access and error logs as the first responder on a server YOU run — completed asks versus denied work — and you treat stealing, wiping, and covering tracks on someone else’s clerk as out of this course. Off-box copies survive a hostile disk. Notes are locked in cyberlium-lab. This is original Cyberlium teaching mapped to the CEH v13 web-servers domain — not official EC-Council training, not a cert, not exam dumps. Next — Lab — Harden a Local Static Server — HOST hardcoded 127.0.0.1, no directory-listing homework on strangers, ceh-webserver-lab.txt chmod 600, then stop the server.
Knowledge Check
APPLY: A teammate wants to screenshot a shop’s access_log “for CEH log analysis,” then truncate it so they are not caught. What are logs here, and what do you do?
Multiple choice
Knowledge Check
APPLY: True or False: Gobustering a classmate Pages site is ethical if you only want to generate lines in THEIR access log for your notes.
True or False
Knowledge Check
APPLY: Which pairing matches this lesson’s artifact and the next lab?
Multiple choice
Knowledge Check
APPLY: curl of http://192.168.0.1/ shows a home router login (TP-Link / Netgear / Huawei / "Router Admin"). Is that DEMO in scope as a hacking target?
Multiple choice