Coders Conquer Security OWASP Top 10 API Series - Insufficient Logging and Monitoring
The insufficient logging and monitoring flaw mostly happens as a result of a failed cybersecurity plan in regards to logging all failed authentication attempts, denied access, and input validation errors. It can occur at other points in the production environment, but is most associated with a failure to stop invalid login attempts.
It's a dangerous vulnerability because it means that cybersecurity teams won't respond to attacks because they don't know about them. This gives attackers a big advantage, letting them remain unnoticed while they try and further penetrate a system or upgrade their credentials. In fact, without proper logging and monitoring, it becomes very difficult or even impossible to detect and stop attacks before they can do significant damage.
Ready to test your skills with a challenge right now? Check this out:
How do attackers exploit insufficient logging and monitoring?
Any API is vulnerable to insufficient logging and monitoring if the logging level is not set correctly, if it is set too low, if error messages do not include enough detail or if no logging function is present at all.
An interesting example would be if a hacker obtained a large list of compromised user names for a website or service. Through experimentation, they could figure out that it takes three failed login attempts before they are locked out of the system, and before cybersecurity personnel are notified.
Armed with this information, instead of trying to brute force single accounts, they instead could write a script to try and log in as every name on their compromised list using common passwords like "123456" or "password." The trick is that they only try each user name once, or perhaps twice, keeping below the threshold for lockouts and alerts. If they get lucky, they will compromise at least a few passwords right off the bat. After that, they simply wait a day for the login counter to reset and run the process again using different passwords like "qwerty" or "god." If admins never detect what they are doing, attackers can go through the list many times and eventually compromise most accounts with weak passwords.
This happened in the OWASP supplied example where a video sharing platform was attacked using a credential stuffing attack that exploited the insufficient logging and monitoring vulnerability. Until the company started to get user complaints, it had no idea that the attack was happening. Eventually, they found evidence in the API logs, and had to issue a forced password change notification to all of their users, as well as report the attack to regulatory authorities.
Eliminating the insufficient logging and monitoring vulnerability
Automation and constant monitoring can help put an end to this vulnerability. To start, all failed authentication attempts should be logged. And that log should be put into a format that is machine-readable like STIX and TAXII so that it can be ingested into a security information and event management (SIEM) system that is trained to look for attacks regardless of the thresholds used.
You should also protect your log files. Treat them as sensitive information and protect them from deletion or modification by attackers. A good policy is to both backup the log files and also encrypt them.
Finally, create custom dashboards and alerts so that any suspicious activities can be detected and responded to as quickly as possible. If you eliminate an attacker's time with the system, you remove their ability to use low and slow attack techniques to remain undetected.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.
The insufficient logging and monitoring flaw mostly happens as a result of a failed cybersecurity plan in regards to logging all failed authentication attempts, denied access, and input validation errors.
Matias Madou, Ph.D. is a security expert, researcher, and CTO and co-founder of Secure Code Warrior. Matias obtained his Ph.D. in Application Security from Ghent University, focusing on static analysis solutions. He later joined Fortify in the US, where he realized that it was insufficient to solely detect code problems without aiding developers in writing secure code. This inspired him to develop products that assist developers, alleviate the burden of security, and exceed customers' expectations. When he is not at his desk as part of Team Awesome, he enjoys being on stage presenting at conferences including RSA Conference, BlackHat and DefCon.
Secure Code Warrior is here for your organization to help you secure code across the entire software development lifecycle and create a culture in which cybersecurity is top of mind. Whether you’re an AppSec Manager, Developer, CISO, or anyone involved in security, we can help your organization reduce risks associated with insecure code.
Book a demoMatias Madou, Ph.D. is a security expert, researcher, and CTO and co-founder of Secure Code Warrior. Matias obtained his Ph.D. in Application Security from Ghent University, focusing on static analysis solutions. He later joined Fortify in the US, where he realized that it was insufficient to solely detect code problems without aiding developers in writing secure code. This inspired him to develop products that assist developers, alleviate the burden of security, and exceed customers' expectations. When he is not at his desk as part of Team Awesome, he enjoys being on stage presenting at conferences including RSA Conference, BlackHat and DefCon.
Matias is a researcher and developer with more than 15 years of hands-on software security experience. He has developed solutions for companies such as Fortify Software and his own company Sensei Security. Over his career, Matias has led multiple application security research projects which have led to commercial products and boasts over 10 patents under his belt. When he is away from his desk, Matias has served as an instructor for advanced application security training courses and regularly speaks at global conferences including RSA Conference, Black Hat, DefCon, BSIMM, OWASP AppSec and BruCon.
Matias holds a Ph.D. in Computer Engineering from Ghent University, where he studied application security through program obfuscation to hide the inner workings of an application.
The insufficient logging and monitoring flaw mostly happens as a result of a failed cybersecurity plan in regards to logging all failed authentication attempts, denied access, and input validation errors. It can occur at other points in the production environment, but is most associated with a failure to stop invalid login attempts.
It's a dangerous vulnerability because it means that cybersecurity teams won't respond to attacks because they don't know about them. This gives attackers a big advantage, letting them remain unnoticed while they try and further penetrate a system or upgrade their credentials. In fact, without proper logging and monitoring, it becomes very difficult or even impossible to detect and stop attacks before they can do significant damage.
Ready to test your skills with a challenge right now? Check this out:
How do attackers exploit insufficient logging and monitoring?
Any API is vulnerable to insufficient logging and monitoring if the logging level is not set correctly, if it is set too low, if error messages do not include enough detail or if no logging function is present at all.
An interesting example would be if a hacker obtained a large list of compromised user names for a website or service. Through experimentation, they could figure out that it takes three failed login attempts before they are locked out of the system, and before cybersecurity personnel are notified.
Armed with this information, instead of trying to brute force single accounts, they instead could write a script to try and log in as every name on their compromised list using common passwords like "123456" or "password." The trick is that they only try each user name once, or perhaps twice, keeping below the threshold for lockouts and alerts. If they get lucky, they will compromise at least a few passwords right off the bat. After that, they simply wait a day for the login counter to reset and run the process again using different passwords like "qwerty" or "god." If admins never detect what they are doing, attackers can go through the list many times and eventually compromise most accounts with weak passwords.
This happened in the OWASP supplied example where a video sharing platform was attacked using a credential stuffing attack that exploited the insufficient logging and monitoring vulnerability. Until the company started to get user complaints, it had no idea that the attack was happening. Eventually, they found evidence in the API logs, and had to issue a forced password change notification to all of their users, as well as report the attack to regulatory authorities.
Eliminating the insufficient logging and monitoring vulnerability
Automation and constant monitoring can help put an end to this vulnerability. To start, all failed authentication attempts should be logged. And that log should be put into a format that is machine-readable like STIX and TAXII so that it can be ingested into a security information and event management (SIEM) system that is trained to look for attacks regardless of the thresholds used.
You should also protect your log files. Treat them as sensitive information and protect them from deletion or modification by attackers. A good policy is to both backup the log files and also encrypt them.
Finally, create custom dashboards and alerts so that any suspicious activities can be detected and responded to as quickly as possible. If you eliminate an attacker's time with the system, you remove their ability to use low and slow attack techniques to remain undetected.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.
The insufficient logging and monitoring flaw mostly happens as a result of a failed cybersecurity plan in regards to logging all failed authentication attempts, denied access, and input validation errors. It can occur at other points in the production environment, but is most associated with a failure to stop invalid login attempts.
It's a dangerous vulnerability because it means that cybersecurity teams won't respond to attacks because they don't know about them. This gives attackers a big advantage, letting them remain unnoticed while they try and further penetrate a system or upgrade their credentials. In fact, without proper logging and monitoring, it becomes very difficult or even impossible to detect and stop attacks before they can do significant damage.
Ready to test your skills with a challenge right now? Check this out:
How do attackers exploit insufficient logging and monitoring?
Any API is vulnerable to insufficient logging and monitoring if the logging level is not set correctly, if it is set too low, if error messages do not include enough detail or if no logging function is present at all.
An interesting example would be if a hacker obtained a large list of compromised user names for a website or service. Through experimentation, they could figure out that it takes three failed login attempts before they are locked out of the system, and before cybersecurity personnel are notified.
Armed with this information, instead of trying to brute force single accounts, they instead could write a script to try and log in as every name on their compromised list using common passwords like "123456" or "password." The trick is that they only try each user name once, or perhaps twice, keeping below the threshold for lockouts and alerts. If they get lucky, they will compromise at least a few passwords right off the bat. After that, they simply wait a day for the login counter to reset and run the process again using different passwords like "qwerty" or "god." If admins never detect what they are doing, attackers can go through the list many times and eventually compromise most accounts with weak passwords.
This happened in the OWASP supplied example where a video sharing platform was attacked using a credential stuffing attack that exploited the insufficient logging and monitoring vulnerability. Until the company started to get user complaints, it had no idea that the attack was happening. Eventually, they found evidence in the API logs, and had to issue a forced password change notification to all of their users, as well as report the attack to regulatory authorities.
Eliminating the insufficient logging and monitoring vulnerability
Automation and constant monitoring can help put an end to this vulnerability. To start, all failed authentication attempts should be logged. And that log should be put into a format that is machine-readable like STIX and TAXII so that it can be ingested into a security information and event management (SIEM) system that is trained to look for attacks regardless of the thresholds used.
You should also protect your log files. Treat them as sensitive information and protect them from deletion or modification by attackers. A good policy is to both backup the log files and also encrypt them.
Finally, create custom dashboards and alerts so that any suspicious activities can be detected and responded to as quickly as possible. If you eliminate an attacker's time with the system, you remove their ability to use low and slow attack techniques to remain undetected.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.
Click on the link below and download the PDF of this resource.
Secure Code Warrior is here for your organization to help you secure code across the entire software development lifecycle and create a culture in which cybersecurity is top of mind. Whether you’re an AppSec Manager, Developer, CISO, or anyone involved in security, we can help your organization reduce risks associated with insecure code.
View reportBook a demoMatias Madou, Ph.D. is a security expert, researcher, and CTO and co-founder of Secure Code Warrior. Matias obtained his Ph.D. in Application Security from Ghent University, focusing on static analysis solutions. He later joined Fortify in the US, where he realized that it was insufficient to solely detect code problems without aiding developers in writing secure code. This inspired him to develop products that assist developers, alleviate the burden of security, and exceed customers' expectations. When he is not at his desk as part of Team Awesome, he enjoys being on stage presenting at conferences including RSA Conference, BlackHat and DefCon.
Matias is a researcher and developer with more than 15 years of hands-on software security experience. He has developed solutions for companies such as Fortify Software and his own company Sensei Security. Over his career, Matias has led multiple application security research projects which have led to commercial products and boasts over 10 patents under his belt. When he is away from his desk, Matias has served as an instructor for advanced application security training courses and regularly speaks at global conferences including RSA Conference, Black Hat, DefCon, BSIMM, OWASP AppSec and BruCon.
Matias holds a Ph.D. in Computer Engineering from Ghent University, where he studied application security through program obfuscation to hide the inner workings of an application.
The insufficient logging and monitoring flaw mostly happens as a result of a failed cybersecurity plan in regards to logging all failed authentication attempts, denied access, and input validation errors. It can occur at other points in the production environment, but is most associated with a failure to stop invalid login attempts.
It's a dangerous vulnerability because it means that cybersecurity teams won't respond to attacks because they don't know about them. This gives attackers a big advantage, letting them remain unnoticed while they try and further penetrate a system or upgrade their credentials. In fact, without proper logging and monitoring, it becomes very difficult or even impossible to detect and stop attacks before they can do significant damage.
Ready to test your skills with a challenge right now? Check this out:
How do attackers exploit insufficient logging and monitoring?
Any API is vulnerable to insufficient logging and monitoring if the logging level is not set correctly, if it is set too low, if error messages do not include enough detail or if no logging function is present at all.
An interesting example would be if a hacker obtained a large list of compromised user names for a website or service. Through experimentation, they could figure out that it takes three failed login attempts before they are locked out of the system, and before cybersecurity personnel are notified.
Armed with this information, instead of trying to brute force single accounts, they instead could write a script to try and log in as every name on their compromised list using common passwords like "123456" or "password." The trick is that they only try each user name once, or perhaps twice, keeping below the threshold for lockouts and alerts. If they get lucky, they will compromise at least a few passwords right off the bat. After that, they simply wait a day for the login counter to reset and run the process again using different passwords like "qwerty" or "god." If admins never detect what they are doing, attackers can go through the list many times and eventually compromise most accounts with weak passwords.
This happened in the OWASP supplied example where a video sharing platform was attacked using a credential stuffing attack that exploited the insufficient logging and monitoring vulnerability. Until the company started to get user complaints, it had no idea that the attack was happening. Eventually, they found evidence in the API logs, and had to issue a forced password change notification to all of their users, as well as report the attack to regulatory authorities.
Eliminating the insufficient logging and monitoring vulnerability
Automation and constant monitoring can help put an end to this vulnerability. To start, all failed authentication attempts should be logged. And that log should be put into a format that is machine-readable like STIX and TAXII so that it can be ingested into a security information and event management (SIEM) system that is trained to look for attacks regardless of the thresholds used.
You should also protect your log files. Treat them as sensitive information and protect them from deletion or modification by attackers. A good policy is to both backup the log files and also encrypt them.
Finally, create custom dashboards and alerts so that any suspicious activities can be detected and responded to as quickly as possible. If you eliminate an attacker's time with the system, you remove their ability to use low and slow attack techniques to remain undetected.
Check out the Secure Code Warrior blog pages for more insight about this vulnerability and how to protect your organization and customers from the ravages of other security flaws. You can also try a demo of the Secure Code Warrior training platform to keep all your cybersecurity skills honed and up-to-date.
Table of contents
Matias Madou, Ph.D. is a security expert, researcher, and CTO and co-founder of Secure Code Warrior. Matias obtained his Ph.D. in Application Security from Ghent University, focusing on static analysis solutions. He later joined Fortify in the US, where he realized that it was insufficient to solely detect code problems without aiding developers in writing secure code. This inspired him to develop products that assist developers, alleviate the burden of security, and exceed customers' expectations. When he is not at his desk as part of Team Awesome, he enjoys being on stage presenting at conferences including RSA Conference, BlackHat and DefCon.
Secure Code Warrior is here for your organization to help you secure code across the entire software development lifecycle and create a culture in which cybersecurity is top of mind. Whether you’re an AppSec Manager, Developer, CISO, or anyone involved in security, we can help your organization reduce risks associated with insecure code.
Book a demoDownloadResources to get you started
Benchmarking Security Skills: Streamlining Secure-by-Design in the Enterprise
The Secure-by-Design movement is the future of secure software development. Learn about the key elements companies need to keep in mind when they think about a Secure-by-Design initiative.
DigitalOcean Decreases Security Debt with Secure Code Warrior
DigitalOcean's use of Secure Code Warrior training has significantly reduced security debt, allowing teams to focus more on innovation and productivity. The improved security has strengthened their product quality and competitive edge. Looking ahead, the SCW Trust Score will help them further enhance security practices and continue driving innovation.
Resources to get you started
Reactive Versus Preventive Security: Prevention Is a Better Cure
The idea of bringing preventive security to legacy code and systems at the same time as newer applications can seem daunting, but a Secure-by-Design approach, enforced by upskilling developers, can apply security best practices to those systems. It’s the best chance many organizations have of improving their security postures.
The Benefits of Benchmarking Security Skills for Developers
The growing focus on secure code and Secure-by-Design principles requires developers to be trained in cybersecurity from the start of the SDLC, with tools like Secure Code Warrior’s Trust Score helping measure and improve their progress.
Driving Meaningful Success for Enterprise Secure-by-Design Initiatives
Our latest research paper, Benchmarking Security Skills: Streamlining Secure-by-Design in the Enterprise is the result of deep analysis of real Secure-by-Design initiatives at the enterprise level, and deriving best practice approaches based on data-driven findings.
Deep Dive: Navigating the Critical CUPS Vulnerability in GNU-Linux Systems
Discover the latest security challenges facing Linux users as we explore recent high-severity vulnerabilities in the Common UNIX Printing System (CUPS). Learn how these issues may lead to potential Remote Code Execution (RCE) and what you can do to protect your systems.