Skip to main content

Technical information leak

Description

It is possible to obtain technical information such as:

  • System component versions (HTTP headers, service banner, etc.)
  • Specific information about the configuration of server components (php.ini, web.config)

Impact

Obtain technical information to create new attack vectors.

Recommendation

  • Eliminate the services banner with information leakage.
  • Verify that HTTP headers do not display any name or version.

Threat

Authenticated attacker from the Internet.

Expected Remediation Time

⌚ 60 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: H
  • Privileges required: N
  • User interaction: N
  • Scope: U
  • Confidentiality: L
  • Integrity: N
  • Availability: N

Temporal

  • Exploit code madurity: U
  • Remediation level: U
  • Report confidence: C

Result

  • Vector string: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N/E:U/RL:U/RC:C
  • Score:
    • Base: 3.7
    • Temporal: 3.4
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

Avoid the use of those functions in a production environment

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

public class Test {
private static Logger logger = LogManager.getLogger(Log4jExample.class);

public static void main(String[ ] args) {
try {
int[] myNumbers = {1, 2, 3};
System.out.println(myNumbers[10]);
} catch (IndexException e) {
if (e.toString() == "Error"){
System.out.println("Error");
}
}
}
}

Non compliant code

The system potentially exposes technical information through the use of functions like printStackTrace

import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

public class Test {
private static Logger logger = LogManager.getLogger(Log4jExample.class);

public static void main(String[ ] args) {
try {
int[] myNumbers = {1, 2, 3};
System.out.println(myNumbers[10]);
} catch (IndexException e) {
if (e.toString() == "Error"){
System.out.println("Error");
}
e.printStackTrace();
}
}
}

Requirements