Firewall and Intrusion Detection Log Analysis
Firewall and IDS/IPS logs are the primary record of attacker movement across a network perimeter, capturing connection attempts, rule matches, and anomaly alerts. This topic covers how to read and correlate those logs, triage alerts, and distinguish genuine intrusions from benign traffic noise.
Last updated:
Firewall and intrusion detection system (IDS) log analysis is the process of examining the automated records generated at network control points to determine what traffic crossed the perimeter, which rule or signature triggered an alert, and what sequence of events constitutes an attack. A firewall log entry captures the five-tuple of a connection attempt (source IP, source port, destination IP, destination port, protocol), the action taken (permit or deny), and metadata such as bytes transferred and session duration. An IDS alert adds a signature match or anomaly score to the same traffic, naming the technique the engine believes it detected. Proxy logs record application-layer detail for web traffic that the packet-level logs omit. Together, these three log types allow an investigator to reconstruct attacker movement from initial contact through lateral spread to data exfiltration.
The fundamental challenge in log analysis is volume versus signal. A mid-size enterprise firewall can generate several million log lines per day. An IDS tuned to a default signature set fires thousands of alerts daily in a busy network. Most of that volume is either legitimate traffic or low-fidelity noise. The investigator's task is to apply a structured triage methodology: correlate alerts across sources, filter out alerts on traffic the firewall blocked (the attack did not reach the host), and focus attention on confirmed connections to vulnerable hosts that match a known attack pattern. This approach reduces tens of thousands of alerts to tens of actionable items.
Log analysis sits within a broader legal framework. In the United States, the Stored Communications Act and the Electronic Communications Privacy Act govern access to network logs held by third parties, while the Computer Fraud and Abuse Act criminalises the underlying intrusions the logs capture. In the United Kingdom, the Investigatory Powers Act 2016 covers retention and lawful access. The European Union's NIS2 Directive (2022/2555) mandates incident logging and reporting for essential services. In India, the Information Technology Act 2000 and the Digital Personal Data Protection Act 2023 together govern both the evidential use of logs and the retention of data about users whose traffic is logged. Regardless of jurisdiction, logs collected for forensic purposes should be preserved with cryptographic hash verification as soon as they are identified as potentially relevant.
By the end of this topic you will be able to:
- Read a firewall log entry and identify the five-tuple, rule matched, action taken, and session metadata.
- Interpret IDS/IPS alert fields including signature ID, severity, classification, and the distinction between detection and prevention mode.
- Apply a structured triage hierarchy to separate true positives from false positives and benign noise in a high-volume alert environment.
- Correlate firewall logs, IDS alerts, and proxy records to reconstruct an attacker timeline including initial access, lateral movement, and data exfiltration.
- Identify common attacker evasion techniques visible in firewall and IDS logs and explain why each can reduce detection fidelity.
- Five-tuple
- The five fields that uniquely identify a network flow: source IP address, source port, destination IP address, destination port, and transport protocol (TCP or UDP). Every firewall log entry records at least the five-tuple plus the action taken.
- Signature-based IDS
- An intrusion detection system that compares network traffic against a database of known attack patterns (signatures). Snort and Suricata are the dominant open-source implementations. High precision on known attacks; blind to novel techniques.
- Anomaly-based IDS
- An intrusion detection system that models normal traffic behaviour and alerts when observed traffic deviates significantly from that baseline. Detects novel attacks but generates more false positives than signature engines on the same traffic.
- True positive / false positive
- A true positive is an alert that correctly identifies malicious activity. A false positive is an alert that fires on legitimate traffic. Alert triage aims to resolve which category each alert belongs to before any investigative resources are committed.
- Proxy log
- A record generated by a forward proxy server for each HTTP or HTTPS request made by an internal client. Contains the URL, user-agent string, HTTP method, response code, and bytes exchanged. The primary source for detecting web-based command-and-control and data exfiltration over HTTP.
- Lateral movement
- Attacker activity after initial access, in which the attacker moves from a compromised host to other internal systems. Visible in firewall logs as permit entries for connections originating from an internal source that was not a known client of the destination service.
Anatomy of a Firewall Log
Firewall log formats vary by vendor but share a common information model. A Cisco ASA syslog entry and a Palo Alto Networks traffic log entry contain the same semantic fields even though the text representation differs. Understanding the model lets an analyst read any vendor's log without memorising each product's syntax.
| Field | Meaning | Forensic value |
|---|---|---|
| Timestamp | Date and time of the event in the firewall's clock | Establishes connection sequence; verify against NTP sync status |
| Source IP / port | Initiating address and ephemeral port | Identifies the client or attacker host; port reveals session context |
| Destination IP / port | Receiving address and service port | Identifies the target and the service being accessed |
| Protocol | TCP, UDP, ICMP, or other | ICMP tunnelling and unusual protocols are attacker evasion signals |
| Action | Permit, deny, drop, reset | Denied traffic did not reach the host; permitted traffic did |
| Bytes in / out | Data volume in each direction | Large outbound byte counts on permitted connections indicate exfiltration |
| Rule / policy name | The firewall rule that triggered the action | Maps the traffic to the intended security policy or reveals a policy gap |
| Session duration | Connection lifetime in seconds | Very long sessions or beaconing patterns show attacker persistence |
The action field is the first triage filter. Traffic that was denied never reached the destination host. Alerts generated by an IDS on denied traffic are lower priority than alerts on permitted traffic, because denied traffic cannot have resulted in compromise unless the firewall rule is misconfigured or has been bypassed by a second path. Investigators should confirm that the firewall log and the IDS alert agree on whether the connection completed before escalating.
Reading IDS and IPS Alerts
An IDS alert record contains more semantic information than a firewall log entry. A Snort or Suricata alert includes a signature ID (SID), a message describing the detected technique, a severity classification (1 to 3 in Snort convention, where 1 is high), a protocol, the five-tuple, a payload excerpt or packet count, and a reference list pointing to CVE entries or published exploit descriptions. The message field is the most immediately useful field in triage: it names the attack technique in plain language.
IDS systems operate in two modes. In detection mode (IDS), the engine reads traffic passively and generates alerts without altering the traffic. In prevention mode (IPS), the engine sits inline and can block, reset, or modify matching traffic in real time. The mode matters for log interpretation: in IDS mode, an alert means the traffic was seen; it says nothing about whether the firewall also permitted it. In IPS mode, an alert may indicate that the traffic was blocked at the IPS before the firewall ever forwarded it.
Anomaly-based detection generates a different alert format. Rather than a named signature, the alert reports a deviation score or a behavioural description such as 'internal host scanning 30 distinct destination ports in 60 seconds'. These alerts require different triage logic: the question is not 'does this match a known attack?' but 'is this deviation explained by authorised activity?' A scheduled vulnerability scanner produces the same port-scan signature as an attacker performing reconnaissance. The triage step is to check whether the source IP belongs to an authorised scanner.
Alert Triage: True Positive from Noise
Alert triage is a four-step filter applied to every alert before investigative resources are committed. The steps are ordered by cost: cheaper checks come first, so expensive manual analysis is reserved for alerts that survive the earlier filters.
- Step 1: Was the connection permitted? Cross-reference the alert's five-tuple with the firewall log. If the firewall denied or dropped the connection, the traffic never reached the host. The alert is low priority unless the firewall rule is itself suspect.
- Step 2: Is the source on an allowlist? Internal vulnerability scanners, monitoring agents, and penetration test sources generate signature matches that are expected and authorised. Suppress alerts from these sources after verifying the schedule and source IP are consistent with the authorised activity.
- Step 3: Is the target host vulnerable? An alert for a Windows exploit targeting a Linux host is a false positive regardless of whether the connection was permitted. Check the asset inventory to confirm the destination host runs the service and operating system the signature targets.
- Step 4: Is there supporting evidence of impact? Review subsequent log entries from the target host for anomalous outbound connections, authentication events, or privilege escalation indicators. An alert that is followed by a new outbound connection from the target is a strong true-positive signal.
This triage sequence is tool-agnostic. It applies whether the analyst is working in a SIEM like Splunk or IBM QRadar, a dedicated IDS console like Security Onion, or raw log files on a forensic workstation. The SIEM accelerates the correlation at steps 1 and 4 by allowing multi-source queries, but it does not change the logic.
Proxy Logs and Application-Layer Evidence
A forward proxy log records what firewall logs cannot: the application-layer content of web requests. Where a firewall log shows 'permit TCP 10.1.2.5:49201 -> 203.0.113.44:443', the proxy log for the same session shows the full URL, the HTTP method (GET, POST, PUT), the user-agent string, the HTTP response code, and the number of bytes the client sent and received. This detail is available even when the connection uses HTTPS, because the proxy performs TLS termination and re-encryption.
Three proxy log patterns are particularly relevant in network forensic investigation. First, command-and-control beaconing: malware checking in with its controller produces regular outbound HTTP or HTTPS requests to the same destination at fixed or jittered intervals. The proxy log shows a pattern of short GET requests to the same URL, with small inbound payloads and consistent timing. Second, data exfiltration over HTTP: large POST requests from an internal host to an external address, especially if the user-agent string is absent or unusual, indicate data being sent out. Third, malware downloads: a GET request returning an executable MIME type or a very large binary payload, particularly from a newly registered or low-reputation domain.
Proxy logs also authenticate the user. If the proxy requires Kerberos or NTLM authentication, the log records the domain username alongside the source IP. This breaks the usual ambiguity of network log analysis, where an IP address may be shared by multiple users on a dynamic DHCP network. Matching the proxy username to Active Directory account records is a standard step in attributing an incident to a specific employee or compromised credential.
Reconstructing Attacker Activity: Timeline and Path
Reconstructing an attacker's path from logs is a pivoting exercise. An investigator starts with the earliest known indicator, typically an IDS alert or an anomalous firewall entry, and uses the source and destination IPs as search keys to find all related entries across every log source within the relevant time window. Each new entry may introduce additional IPs or domains, which become the next search keys. The process continues until the chain of activity is fully mapped or a dead end is reached.
A typical attacker path visible across log sources follows a recognisable sequence. Initial access appears as an inbound permitted connection to an externally facing service, often accompanied by an IDS alert for a known exploitation technique. Post-exploitation lateral movement appears as new permitted connections originating from the initially compromised internal host to other internal addresses, particularly on ports associated with administrative protocols (SMB on 445, RDP on 3389, SSH on 22, WMI on 135). Data staging and exfiltration appear in the proxy log as large outbound POST requests or in the firewall log as high byte-count sessions to external addresses on ports 80, 443, or non-standard ports.
Gaps in the log record are themselves forensic evidence. If the firewall logs show a permitted connection but the IDS has no alert for that session, either the traffic did not match any signature (the attack technique is novel or obfuscated), the IDS was not positioned to see that traffic segment, or the IDS was offline or saturated during that window. Documenting the gap and its possible explanations is part of the reconstruction. An attacker who knows where the IDS sensors are may deliberately route traffic to avoid them.
Attacker Evasion Techniques in Logs
Experienced attackers modify their behaviour to reduce log visibility. Understanding the common evasion techniques allows an analyst to recognise their signatures in the logs and adjust the investigation accordingly.
- Low-and-slow scanning: Instead of scanning all ports in seconds (which triggers anomaly alerts), an attacker sends one probe per hour over days. The firewall log contains the events but they are far apart in time. Correlation across a long time window rather than a short burst is required to detect this pattern.
- Protocol tunnelling: DNS tunnelling, ICMP tunnelling, and HTTP tunnelling move data within protocols that the firewall permits. The firewall log shows permitted DNS or ICMP traffic; the IDS may detect the encoding if a specific signature exists, but many tunnelling implementations are not captured by default signature sets.
- Fragmentation and padding: IP fragmentation splits an attack payload across multiple packets, so no single packet matches the full signature. Some IDS engines reassemble fragments before matching signatures; others do not. Checking whether the IDS in question performs fragment reassembly is a prerequisite for interpreting the absence of a signature alert.
- Mimicking legitimate traffic: Command-and-control traffic that uses real browser user-agent strings, established TLS certificates, and HTTP response codes that mimic CDN traffic is difficult to distinguish from legitimate web use without content inspection or behavioural analysis. The proxy log is the primary detection point; firewall logs alone will not flag it.
- Using permitted services: Exfiltrating data through cloud storage services (Dropbox, OneDrive, Google Drive) or code repositories that the organisation's firewall permits to legitimate users. The firewall log shows a permitted HTTPS connection to a known-good domain; only the proxy log (with SSL inspection) reveals the volume and direction of the data transfer.
Each evasion technique produces a characteristic gap or distortion in the log record. Recognising the distortion tells the analyst where to look for compensating evidence from a different log source. The principle is that no attacker can simultaneously evade every log source. An attacker who hides from the IDS through fragmentation still appears in the firewall log; one who hides from the firewall by using permitted ports still appears in the proxy log if application-layer inspection is enabled.
An IDS alert fires for a known SQL injection signature against an internal database server. The firewall log for the same five-tuple and timestamp shows a DENY action. What is the correct triage conclusion?
Key Takeaways
- Firewall logs record every connection attempt at the five-tuple level and its outcome; the action field (permit or deny) is the first triage filter, because IDS alerts on denied traffic are lower priority than alerts on connections that reached the target host.
- IDS alert triage follows a four-step hierarchy: confirm the connection was permitted, exclude allowlisted sources, verify the target host is vulnerable to the flagged technique, and look for supporting post-exploitation evidence before escalating to full investigation.
- Proxy logs provide application-layer evidence that packet-level logs cannot: full URLs, user-agent strings, HTTP methods, and byte volumes for both directions of a web session, making them the primary source for detecting C2 beaconing and HTTP-based exfiltration.
- Attacker path reconstruction is a pivoting exercise: start with the earliest known indicator, use its IPs as search keys across all log sources, and extend the chain until the full timeline from initial access through lateral movement to exfiltration is mapped.
- Common evasion techniques (low-and-slow scanning, protocol tunnelling, fragmentation, and traffic that mimics legitimate services) each produce a characteristic gap in one log source that is compensated by evidence in another; no attacker can simultaneously evade every log type.
What is the difference between a firewall log and an IDS alert?
How do investigators reconstruct an attacker's path from firewall logs?
What is a true positive in IDS alert triage?
What do proxy logs contribute to a network forensic investigation?
How do analysts separate genuine intrusion alerts from noise in a high-volume IDS environment?
Test yourself on Mobile and Network Forensics with free, timed mocks.
Practice Mobile and Network Forensics questionsSpotted an error in this page? Report a correction or read our editorial standards.