Skip to main content

Insecure service configuration - LDAP

Description

Internal service information should not be stored in the source code, especially AD configurations, as it is obtained from the admon-chanel configuration file.

Impact

Use these insecure service configurations to gain access to the AD and collect all kinds of information that will be useful in later attacks, such as internal network architecture recognition or employee information.

Recommendation

Service configurations and credentials must be in protected environments.

Threat

Internal attacker with access to service configurations.

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: A
  • Attack complexity: L
  • Privileges required: N
  • User interaction: N
  • Scope: U
  • Confidentiality: L
  • Integrity: N
  • Availability: N

Temporal

  • Exploit code madurity: X
  • Remediation level: O
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N/E:X/RL:O/RC:X
  • Score:
    • Base: 4.3
    • Temporal: 4.1
  • Severity:
    • Base: Medium
    • Temporal: Medium

Code Examples

Compliant code

Sensitive resources do not have their credentials stored in the source code

using System;
class cipher{
public void Encrypt() {
DirectoryEntry thrdDirectoryEntry = new DirectoryEntry(adPath, "u", "p", AuthenticationTypes.Secure);
}
}

Non compliant code

There is sensitive information store as plain text

using System;
class cipher{
public void Encrypt() {
DirectoryEntry myDirectoryEntry = new DirectoryEntry(adPath);
myDirectoryEntry.AuthenticationType = AuthenticationTypes.None;
DirectoryEntry sndDirectoryEntry = new DirectoryEntry(adPath, "u", "p", AuthenticationTypes.None);
}
}

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.