Skip to content

Hands-on cybersecurity lab focused on analyzing HTTP traffic using Splunk and Zeek-style JSON logs to detect errors, anomalies, and suspicious web activity.

Notifications You must be signed in to change notification settings

GauravGhandat-23/HTTP-Log-Analysis-using-Splunk

Repository files navigation

🌐 HTTP Log Analysis using Splunk

image

Splunk Cybersecurity Logs Zeek Status

A hands-on SIEM project for analyzing HTTP traffic, detecting anomalies, and identifying suspicious web activity using Splunk.


🎯 Objective

This project aims to:

  • Ingest and analyze HTTP logs using Splunk
  • Detect client-side (4xx) and server-side (5xx) HTTP errors
  • Identify suspicious User-Agents and URI access attempts
  • Detect large file transfers that may indicate data exfiltration
  • Gain practical experience using Splunk SPL (Search Processing Language)

🧰 Tools & Technologies

  • SIEM Tool: Splunk Enterprise
  • Log Format: Zeek-style HTTP logs (JSON)
  • Index: http_lab
  • Sourcetype: json or zeek:http

🖥️ Lab Setup

✅ Prerequisites

  • Splunk installed and accessible via Splunk Web
  • HTTP log file in JSON format (http_logs.json)

📥 Data Ingestion Steps

  1. Open Splunk Web
1
  1. Navigate to Settings → Add Data
2
  1. Select Upload
3 4
  1. Upload the file http_logs.json
5 6
  1. Configure the following:
    • Source type: json (or create zeek:http)
    • Index: http_lab (recommended)
7 8 9 10 11 12
  1. Complete the upload and confirm that data is indexed
13 14

🔍 Lab Tasks & SPL Queries

🔹 Task 1: Find the Top 10 Endpoints Generating Web Traffic

index=http_lab
| stats count by "id.orig_h"
| sort -count
| head 10

Purpose: Identifies the most active client IPs generating HTTP traffic. 15


🔹 Task 2: Count the Number of Server Errors (HTTP 5xx)

index=http_lab status_code>=500 status_code<600
| stats count as server_errors

Purpose: Detects backend or server-side application errors. 16


🔹 Task 3: Identify Suspicious / Scripted User-Agents

index=http_lab 
user_agent IN ("sqlmap/1.5.1", "curl/7.68.0", "python-requests/2.25.1", "botnet-checker/1.0")
| stats count by user_agent

Purpose: Identifies automated tools often used for scanning, exploitation, or bot activity. 17


🔹 Task 4: Detect Large File Transfers (> 500 KB)

index=http_lab resp_body_len>500000
| table ts "id.orig_h" "id.resp_h" uri resp_body_len
| sort -resp_body_len

Purpose: Helps identify abnormal data transfers that may indicate data leakage or exfiltration. 18


🔹 Task 5: Detect Suspicious URI Access Attempts

index=http_lab 
uri IN ("/admin","/shell.php","/etc/passwd")
| stats count by uri, "id.orig_h"

Purpose: Detects attempts to access sensitive files, admin panels, or web shells. 19


🚨 Security Insights

Using this lab, you can:

  • Detect malicious web reconnaissance activity
  • Identify brute-force or vulnerability scanning tools
  • Monitor abnormal HTTP behavior
  • Spot potential data exfiltration attempts
  • Build detection logic used in real SOC environments

📊 Future Enhancements

  • Create Splunk alerts for:

    • Repeated HTTP 5xx errors
    • Large file transfers
    • Suspicious User-Agents
  • Build dashboards for:

    • HTTP status trends
    • Top URIs and IPs
  • Integrate threat intelligence feeds


🧠 Learning Outcomes

By completing this project, you have:

  • Learned how to ingest and analyze HTTP logs in Splunk
  • Gained hands-on experience with SPL queries
  • Improved skills in web traffic monitoring and threat detection
  • Strengthened SIEM and SOC analyst fundamentals

⭐ Conclusion

This project demonstrates how Splunk can be used to analyze HTTP traffic and detect security anomalies using log data. It is ideal for students and professionals pursuing careers in Cybersecurity, SOC Analysis, and Blue Team Operations.


🚀 A strong portfolio project for cybersecurity and SIEM-focused roles.




About

Hands-on cybersecurity lab focused on analyzing HTTP traffic using Splunk and Zeek-style JSON logs to detect errors, anomalies, and suspicious web activity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published