Inside Job: Detecting Insider Reconnaissance Through Apache Logs
2026-11-10 · 3 min read
On November 3rd, 2026, I conducted a security assessment from the perspective of an insider threat. The assessment involved multiple network scans against a company web server, followed by an audit of the web server’s logs. The goal was to confirm that logging was functioning correctly and to demonstrate what traces the reconnaissance phase of an attack leaves behind for defenders to catch.
The Environment
The target ran an Apache web server on Ubuntu with the IP 10.2.1.200/24. All scans were launched from Parrot OS at 10.2.1.25/24. This simulates an insider threat, so both machines sit in the same subnet.

Methodology: Nmap and Nikto
Two scanning tools were used against the target. Nmap is an open-source network scanner for service and host discovery. Nikto is an open-source web server vulnerability scanner.
The first pass was an aggressive Nmap scan for service discovery. It revealed multiple open ports, including insecure services such as Telnet. The scan also confirmed Apache as the underlying web server, which justified a second pass with Nikto to enumerate Apache-specific vulnerabilities.
Findings from the Scans
The Nikto scan exposed multiple vulnerabilities:
- An outdated version of Apache
- CVE-2003-1418
- Missing
X-Frame-OptionsandContent-Security-Policyheaders in the web service responses
Combined with the open Telnet port found by Nmap, the host presented a large attack surface to anyone already inside the network.
The Other Side: What the Logs Saw
Scanning gives the attacker’s perspective. Detection gives the defender’s. Apache records every request in /var/log/apache2/access.log, but the raw file is hard to read and difficult to interpret without filtering. Formatting the logs with grep and awk brings the story of the attack into focus.
Traces of the Nmap Scan
Filtering the log for entries referencing Nmap showed clear signs of the scan. The HTTP methods themselves are revealing:
OPTIONS: asks the server which methods it supports without doing anything elsePOST: normally a legitimate method (form submissions, logins, uploads)PROPFIND: stands out. This is a WebDAV method used by clients to list file properties on the server, and it has no place in normal web traffic
Traces of the Nikto Scan
Changing the grep pattern from “Nmap” to “Nikto” surfaces the Nikto entries. One of them shows a file called nikto-test-A0oHxQrx.html attempting to upload to the web server via PUT, denied with a 405 status code. The upload failed, but the attempt sits in the log as a fingerprint of an automated scanner.
Tools Used: grep, head, tail, and awk
Part of this exercise was showing how standard command-line utilities turn raw logs into readable output:
grep: search tool for filtering text, with many switches for pattern matching and output controlhead: retrieves the first few lines of a filetail: retrieves the last few lines of a fileawk: a formatting tool giving control over printed output
For this assessment I used awk to extract three fields from each matching line: the source IP, the HTTP method, and the target path.
Conclusion and Remediation
This assessment shows why internal threat detection is not just about finding malware or suspicious binaries. It is often about recognizing the signals that precede an attack. The Nmap and Nikto traffic was noisy, deliberate, and clearly aligned with reconnaissance activity, and the Apache access log preserved that behavior in plain text. In other words, the attacker left breadcrumbs behind, and the defenders had the evidence needed to identify both the tooling and the intent.
The most important takeaway is that log analysis is a force multiplier for defenders. An attacker may be able to probe a system from inside the network without triggering a dramatic alert, but the HTTP requests, method patterns, and target paths still reveal what they were looking for. The access log did not just confirm that scanning happened. It showed how it happened, what was targeted, and what the attacker likely attempted next.
The remediation priorities are straightforward:
- Upgrade Apache to a supported version to address the exposed vulnerabilities and reduce the overall attack surface.
- Disable insecure services such as Telnet and FTP, replacing them with secure alternatives like SSH and SFTP.
- Add the missing security headers, including
X-Frame-OptionsandContent-Security-Policy, to harden the web service against abuse.
In the end, this exercise highlights a core security truth: attackers may think they are operating quietly, but reconnaissance almost always leaves a trail. The challenge is not whether the evidence exists. It is whether defenders know where to look and how to interpret it.