S4E

Security Misconfiguration

Security misconfiguration is the name given to all security weaknesses caused by missing or incorrect configurations on applications or servers. This could result from incorrect default configurations, outdated software versions, or insufficient testing procedures. Any of these mistakes could lead to an exploitable gap in the security system and make it easier for hackers to gain unauthorized access to sensitive data.

They increase the risks of an attack vector by providing additional information or access to the attacker. In some cases, they can also create vulnerabilities themselves (making management pages publicly accessible with default passwords). Proper configurations can prevent it from being triggered even if there is a weakness in the system.

Opening unnecessary services to the Internet, using the default pages, default settings on the apps, listing unnecessary files/folders, forgetting the debug mode, and missing HTTP headers on the webserver side can be shown as examples of these vulnerabilities.

To prevent misconfiguration, it is crucial to follow secure configuration standards provided by hardening guides.

This ensures that default settings are not left untouched and are customized according to the organization's needs. Additionally, regular software updates and patches must be installed to address any known security issues.


For the security misconfiguration category, the following topics should be taken into consideration (precedence of the case might change to vulnerability state and application's specifications).

  • In cases where additional hardening is required (for example, adding new HTTP headers), the relevant changes should be applied to the production environment after testing.
  • If the finding that causes security misconfiguration has a high-risk score (such as accessing the default administration pages), logs should be investigated, and it should be checked whether cyber attackers access them.
  • All unnecessary or unused services and pages should be removed from the system.

Furthermore, organizations should conduct thorough security audits to identify any potential misconfigurations. This will help in detecting and addressing any gaps in the security system before they can be exploited by hackers. Regular maintenance and monitoring of configurations is also essential to ensure continued security.

Common Weakness Enumeration (CWE) Regarding Misconfiguration

In the world of software and computer systems, there are common mistakes or weak spots that developers might accidentally introduce. These mistakes can make the software or system vulnerable to attacks or failures.

Common Weakness Enumeration (CWE)  is a big list of all these common mistakes, so that developers could check against it and avoid making the same errors.

CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag 

This vulnerability occurs when a cookie, which contains sensitive information, is not flagged with the 'HttpOnly' attribute. By not setting this attribute, the cookie becomes accessible to client-side scripts, making it susceptible to cross-site scripting (XSS) attacks. It is important to ensure that sensitive cookies are properly flagged with the 'HttpOnly' attribute to enhance security and protect user data.

CWE-756: Missing Custom Error Page 

When a web application encounters an error, it typically displays a generic error message to the user. This can provide valuable information to hackers, making it easier for them to exploit vulnerabilities in the system. To prevent this, organizations should have custom error pages set up that do not disclose sensitive information and instead provide helpful but non-specific messages.

CWE-526: Cleartext Storage of Sensitive Information in an Environment Variable 

In some cases, sensitive information such as passwords or API keys might be stored in environment variables. This poses a risk as these variables can be easily accessed by anyone with access to the system. It is important to ensure that all sensitive information is encrypted before being stored in environment variables.

CWE-315: Cleartext Storage of Sensitive Information in a Cookie 

Similarly, sensitive information stored in cookies can also be accessed by unauthorized parties. This vulnerability is often exploited in cross-site scripting (XSS) attacks. To prevent this, organizations should ensure that sensitive data stored in cookies is encrypted and not easily accessible.

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor 

One of the most common vulnerabilities is exposing sensitive information to unauthorized actors. This can happen through misconfigured servers, insecure APIs, or unprotected databases. To prevent this, organizations should regularly conduct security audits and ensure that sensitive information is properly encrypted and protected at all times.

CWE-15: External Control of System or Configuration Setting  

Another vulnerability that can lead to security misconfiguration is having external entities control the system or configuration settings. This can happen through weak authentication methods or unsecured network connections. To prevent this, organizations should implement strong authentication measures and regularly review their network security.

CWE-209: Information Exposure Through an Error Message  

Error messages can also be a source of vulnerability as they can reveal sensitive information to attackers. To prevent this, organizations should ensure that error messages only provide necessary and non-sensitive information to users. They should also conduct regular testing and review of their systems to identify any potential vulnerabilities.

CWE-112: Missing XML Validation 

This means that the XML input is not properly validated, which can lead to security risks such as XML injection attacks. It is important to ensure proper validation of XML data to prevent these vulnerabilities and protect the integrity and security of the system.

CWE-392: Missing Report of Error Condition 

When errors occur, it is important for organizations to have a system in place that reports these errors. Without proper reporting, vulnerabilities can go unnoticed and unaddressed, leaving the system open to potential attacks. By regularly reviewing error logs and addressing any reported errors, organizations can mitigate this vulnerability.

CWE-353: Missing Support for Integrity Check 

Integrity checks are important in ensuring that data has not been tampered with or altered. Without this support, organizations may be vulnerable to attacks such as data manipulation and unauthorized access. By implementing integrity checks and regularly monitoring them, organizations can detect any potential vulnerabilities and take necessary actions to secure their systems.

CWE-549: Missing Password Field Masking

When users enter their passwords, it is important to have the field masked or hidden to prevent others from seeing their sensitive information. This is particularly important in shared environments where multiple people may have access to the same screen. By implementing password masking in their systems, organizations can protect user privacy and reduce the risk of unauthorized access.

CWE-306: Missing Authentication for Critical Function 

Critical functions, such as administrative privileges or high-level system access, should always require authentication to prevent unauthorized access. Without this measure in place, organizations are at risk of malicious actors gaining access to sensitive data or systems. By implementing strong authentication protocols, organizations can significantly reduce the likelihood of a security breach.

CWE-862: Missing Authorization 

Authorization is essential for controlling access to confidential information and ensuring that users have only the necessary level of access. Without proper authorization measures in place, organizations are vulnerable to unauthorized data breaches or system compromises. By implementing robust authorization protocols based on user roles and permissions, organizations can greatly enhance their cyber security posture.

 

The Top 16 Security Misconfiguration Scanning Tools 

The Top 16 security misconfiguration scanning tools that is used by our members:

Get started to protecting your Free Full Security Scan