Apache Directory Traversal Attack Detection

WebServerErrors Apache Directory Traversal / LFI

What This Means

Detect directory traversal attacks in Apache access logs. Identify path traversal sequences targeting sensitive files and learn mitigation strategies for Apache web servers.

Example Log

198.51.100.88 - - [08/Mar/2026:18:30:15 +0000] "GET /images/../../../etc/passwd HTTP/1.1" 400 380 "-" "curl/7.68.0"

Indicators of Suspicious Activity

How to Investigate

  1. Search Apache access logs for path traversal patterns using regex
  2. Decode URL-encoded characters to reveal actual traversal paths
  3. Check if any traversal attempts received 200 responses (successful exploitation)
  4. Identify the specific files the attacker is targeting
  5. Review mod_security logs for corresponding rule triggers
  6. Verify that Apache AllowOverride and Directory directives are restrictive

Recommended Mitigations

Scan This Log Instantly

Paste a suspicious log line below and get an instant AI-powered security assessment.

0 / 2000

Need a Full Investigation?

Scan entire log files, detect attack patterns, reconstruct timelines, and generate a full investigation report.

Run Smart Scan

Related Log Types

Related Attack Patterns

Frequently Asked Questions

How does directory traversal work against Apache?
Attackers send requests with ../ sequences in the URL to navigate outside the web root directory. If Apache or the application does not properly validate the path, the attacker can read arbitrary files on the server.
Does mod_security protect against directory traversal?
Yes. The OWASP ModSecurity Core Rule Set includes rules that detect and block directory traversal patterns, including encoded and double-encoded variations. Ensure mod_security is running in blocking mode.
What is the difference between LFI and directory traversal?
Directory traversal is the technique of navigating the file system using ../ sequences. Local File Inclusion (LFI) is a vulnerability where the application includes a file based on user input. LFI often uses directory traversal as the exploitation method.