🧾 Logs Fundamentals – Complete Guide with Answers

 


🧾 Logs Fundamentals – Complete Guide with Answers

Logs are the digital footprints left behind by activities inside a system. Just like footprints help investigators solve crimes in the real world, logs help cybersecurity professionals trace attacks in digital environments.

In this blog, we’ll cover:

  • What logs are

  • Types of logs

  • Windows Event Log analysis

  • Web Server Access Log analysis

  • ✅ All answers (before the conclusion)


πŸ” Introduction to Logs

Logs contain records of activities performed in a system. These activities can be:

  • Normal user actions

  • System operations

  • Application events

  • Malicious activities

Security teams rely heavily on logs for:

  • Incident investigation

  • Root cause analysis

  • Monitoring suspicious behavior

  • Compliance and auditing


πŸ“‚ Types of Logs

Logs are categorized based on the information they provide.

Log TypePurpose
System LogsOS activities (startup, shutdown, hardware events)
Security LogsAuthentication & authorization events
Application LogsApplication-specific events
Audit LogsSystem & user activity tracking
Network LogsIncoming & outgoing network traffic
Access LogsResource access information

✅ Answers – Types of Logs Section

1️⃣ Which type of logs contain information regarding incoming and outgoing traffic?
πŸ‘‰ Network Logs

2️⃣ Which type of logs contain authentication and authorization events?
πŸ‘‰ Security Logs


πŸͺŸ Windows Event Logs Analysis

Windows stores logs inside a built-in tool called:

πŸ–₯️ Event Viewer

It contains three major log categories:

  • Application Logs

  • System Logs

  • Security Logs


πŸ”’ Important Windows Event IDs

Event IDDescription
4624Successful login
4625Failed login
4634Logoff
4720User account created
4722Account enabled
4724Password reset attempt
4725Account disabled
4726Account deleted

Security analysts often filter logs using Event ID to quickly find specific activities.


πŸ§ͺ Windows Investigation Exercise – Answers

1️⃣ What is the name of the last user account created on this system?
πŸ‘‰ hacked

2️⃣ Which user account created the above account?
πŸ‘‰ Administrator

3️⃣ On what date was this user account enabled?
πŸ‘‰ 6/7/2024

4️⃣ Did this account undergo a password reset as well?
πŸ‘‰ Yes


🌐 Web Server Access Logs Analysis

Web servers log every request made to them.

Most Apache web servers store logs at:

/var/log/apache2/access.log

πŸ—️ Structure of an Apache Log Entry

Example:

172.16.0.1 - - [06/Jun/2024:13:58:44] "GET /products HTTP/1.1" 404 "-" "Mozilla/5.0..."

Important Fields:

  • IP Address

  • Timestamp

  • HTTP Method (GET / POST)

  • Requested URL

  • Status Code (200, 404, 500, etc.)

  • User Agent


πŸ› ️ Useful Linux Commands for Log Analysis

πŸ“Œ cat

Displays entire file contents.

πŸ“Œ grep

Searches for specific patterns inside logs.

Example:

grep "192.168.1.1" access.log

πŸ“Œ less

Allows page-by-page viewing of large logs.

  • Space → Next page

  • b → Previous page

  • /pattern → Search


πŸ§ͺ Web Log Investigation – Answers

1️⃣ What is the IP which made the last GET request to URL: “/contact”?
πŸ‘‰ 10.0.0.1

2️⃣ When was the last POST request made by IP: “172.16.0.1”?
πŸ‘‰ 06/Jun/2024:13:55:44

3️⃣ To which URL was the POST request made?
πŸ‘‰ /contact


🎯 Conclusion

In this room, we learned:

  • Logs are critical digital evidence

  • Different types of logs serve different purposes

  • How to analyze Windows Event Logs using Event Viewer

  • How to manually analyze Apache Web Server logs

  • How to extract attacker activity from logs

Logs are one of the most powerful tools in cybersecurity investigations. Mastering log analysis is a foundational skill for:

  • SOC Analysts

  • Incident Responders

  • Digital Forensics Investigators

  • Blue Team Professionals

Comments

Popular Posts