---
title: "CAPEC-81: Web Server Logs Tampering"
url: https://radicalnotion.ai/capec/capec-81
type: capec
description: "Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to \"Log Injection-Tampering-Forging\" except that in this case, the attack is targeting the logs of the web server and not the application."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-81: Web Server Logs Tampering

- **Abstraction:** Detailed
- **Status:** Draft
- **Typical severity:** High
- **Likelihood of attack:** Medium
- **CAPEC catalog version:** 3.9

## Description

Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.

## Execution flow

### Step 1: Explore

\[Determine Application Web Server Log File Format\] The attacker observes the system and looks for indicators of which logging utility is being used by the web server.

- Determine logging utility being used by application web server (e.g. log4j), only possible if the application is known by the attacker or if the application returns error messages with logging utility information.

### Step 2: Experiment

\[Determine Injectable Content\] The attacker launches various logged actions with malicious data to determine what sort of log injection is possible.

- Attacker triggers logged actions with maliciously crafted data as inputs, parameters, arguments, etc.

### Step 3: Exploit

\[Manipulate Log Files\] The attacker alters the log contents either directly through manipulation or forging or indirectly through injection of specially crafted request that the web server will receive and write into the logs. This type of attack typically follows another attack and is used to try to cover the traces of the previous attack.

- Directly through log file or database manipulation, modify existing log entries.

## Prerequisites

- Target server software must be a HTTP server that performs web logging.

## Skills required

- **Low:** To input faked entries into Web logs

## Resources required

- Ability to send specially formatted HTTP request to web server

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Modify Data | - |

## Mitigations

- Design: Use input validation before writing to web log
- Design: Validate all log data before it is output

## Example instances

Most web servers have a public interface, even if the majority of the site is password protected, there is usually at least a login site and brochureware that is publicly available. HTTP requests to the site are also generally logged to a Web log. From an attacker point of view, standard HTTP requests containing a malicious payload can be sent to the public website (with no other access required), when those requests appear in the log (such as http://victimsite/index.html?\< malicious script\> if they are followed by an administrator this may be sufficient to probe the administrator's host or local network.

## Related weaknesses (CWE)

- [CWE-20](https://radicalnotion.ai/cwe/cwe-20): Improper Input Validation
- [CWE-75](https://radicalnotion.ai/cwe/cwe-75): Failure to Sanitize Special Elements into a Different Plane
- [CWE-93](https://radicalnotion.ai/cwe/cwe-93): Improper Neutralization of CRLF Sequences
- [CWE-96](https://radicalnotion.ai/cwe/cwe-96): Improper Neutralization of Directives in Statically Saved Code
- [CWE-116](https://radicalnotion.ai/cwe/cwe-116): Improper Encoding or Escaping of Output
- [CWE-117](https://radicalnotion.ai/cwe/cwe-117): Improper Output Neutralization for Logs
- [CWE-150](https://radicalnotion.ai/cwe/cwe-150): Improper Neutralization of Escape, Meta, or Control Sequences
- [CWE-221](https://radicalnotion.ai/cwe/cwe-221): Information Loss or Omission
- [CWE-276](https://radicalnotion.ai/cwe/cwe-276): Incorrect Default Permissions
- [CWE-279](https://radicalnotion.ai/cwe/cwe-279): Incorrect Execution-Assigned Permissions

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-268](https://radicalnotion.ai/capec/capec-268) | Audit Log Manipulation |

## Frequently asked questions

### What is CAPEC-81?

Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.

### How does a Web Server Logs Tampering attack work?

It typically unfolds over 3 phases. It begins with: \[Determine Application Web Server Log File Format\] The attacker observes the system and looks for indicators of which logging utility is being used by the web server.

### How do you prevent CAPEC-81?

Design: Use input validation before writing to web log

### What weaknesses does CAPEC-81 target?

CAPEC-81 exploits 10 CWE weaknesses, including CWE-20 (Improper Input Validation), CWE-75 (Failure to Sanitize Special Elements into a Different Plane), CWE-93 (Improper Neutralization of CRLF Sequences) and CWE-96 (Improper Neutralization of Directives in Statically Saved Code).

### How severe is CAPEC-81?

MITRE rates CAPEC-81 as High severity with medium likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/81.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-81). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
