Nature | Type | ID | Name |
---|---|---|---|
ChildOf | S | 268 | Audit Log Manipulation |
CanPrecede | D | 592 | Stored XSS |
Determine Application's Log File Format
The first step is exploratory meaning the attacker observes the system. The attacker looks for action and data that are likely to be logged. The attacker may be familiar with the log format of the system.
Technique |
---|
Determine logging utility being used by application (e.g. log4j) |
Gain access to application's source code to determine log file formats. |
Install or obtain access to instance of application and observe its log file format. |
Manipulate Log Files
The attacker alters the log contents either directly through manipulation or forging or indirectly through injection of specially crafted input that the target software will write to the logs. This type of attack typically follows another attack and is used to try to cover the traces of the previous attack.
Technique |
---|
Use carriage return and/or line feed characters to start a new line in the log file, and then, add a fake entry. For example:
"%0D%0A[Thu%20Nov%2012%2011:22]:Info:%20User%20admin%20logged%20in"
may add the following forged entry into a log file:
"[Thu Nov 12 12:11:22]:Info: User admin logged in"
Different applications may require different encodings of the carriage return and line feed characters. |
Insert a script into the log file such that if it is viewed using a web browser, the attacker will get a copy of the operator/administrator's cookie and will be able to gain access as that user. For example, a log file entry could contain The script itself will be invisible to anybody viewing the logs in a web browser (unless they view the source for the page). |
This attack can be as simple as adding extra characters to the logged data (e.g. username). Adding entries is typically easier than removing entries.
A more sophisticated attack can try to defeat the input validation mechanism.
Scope | Likelihood | Impact | Note |
---|---|---|---|
Integrity | N/A | Modify Data | N/A |
Taxonomy Name | Entry ID | Entry Name |
---|